Christoph Imler
01/22/2024, 12:05 PMfrom <package_name>.__main__ import main
from service import client
main(
["--pipeline", "__default__", client]
) # or simply main() if you don't want to provide any arguments
Nok Lam Chan
01/22/2024, 12:13 PMcatalog.yml
? Is this an object that can be pickled?Christoph Imler
01/22/2024, 12:30 PMdef get_client():
client = CogniteClient(
ClientConfig(
credentials=oauth_provider,
project=COGNITE_PROJECT,
base_url=f"https://{CDF_CLUSTER}.<http://cognitedata.com|cognitedata.com>",
client_name="test", # a name to identify your session
debug=False,
max_workers=100,
timeout=60 * 5, # 5 minutes
)
)
_ = client.iam.token.inspect()
return client
catalog.yml
### Pipeline 1
client:
type: MemoryDataset
Nok Lam Chan
01/22/2024, 12:49 PMprod
environment that everything runs in MemoryNok Lam Chan
01/22/2024, 12:49 PMkedro run --env=prod
Christoph Imler
01/22/2024, 12:51 PMNok Lam Chan
01/22/2024, 12:53 PMNok Lam Chan
01/22/2024, 12:54 PMclient
object in your node? or you just need to initialised some connections?Christoph Imler
01/22/2024, 12:55 PMNok Lam Chan
01/22/2024, 12:55 PMif env == prod:
from service import client
else:
from local import client
...
Nok Lam Chan
01/22/2024, 1:02 PMAbstractDataset
interface should be sufficient.
# catalog.yml in base
client:
type: LocalClientDataset
# Catalog.yml in prod
client:
type: ExternalClientDataset
Christoph Imler
01/22/2024, 5:05 PMNok Lam Chan
01/22/2024, 5:53 PMTakieddine Kadiri
01/22/2024, 8:29 PMChristoph Imler
01/22/2024, 8:55 PMChristoph Imler
01/24/2024, 1:00 PMImportError: cannot import name 'ConfigLoader' from 'kedro.config' (/opt/homebrew/Caskroom/miniforge/base/envs/cogniteds/lib/python3.11/site-packages/kedro/config/__init__.py)
Traceback (most recent call last):
According to the new release note, ConfigLoader has been replaced with OmniaConfigLoader, are you planning to release a new version. Can you open for pull requests to the repo?Takieddine Kadiri
01/25/2024, 9:15 AMChristoph Imler
01/25/2024, 9:25 AM