Default project: How is it set? When is it not valid?

MarkPundurs Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 26 ✭✭✭✭ says dataiku.get_default_project() "gets a handle to the current default project, if available (i.e. if dataiku.default_project_key() is valid)".

How is the default project set? When is dataiku.default_project_key() NOT valid? Can I rely on the default project being the project from within which I call get_default_project()?

Best Answer

  • Sergey
    Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 366 Dataiker
    Answer ✓

    Hi @MarkPundurs

    Yes, "get_default_project()" will return the "DSSPoject object" of the current project from where you are executing the code. If "default_project_key()" is not valid for some reason, the "get_default_project()" function will not return the DSSPoject object.

    In case you want to access another project from the current one, please use:

    client = dataiku.api_client()client.get_project("<PROJECT_KEY>")

    Hope this helps.

Setup Info
      Help me…