ProjectId in parameter python script

Patrik
Patrik Registered Posts: 5 ✭✭✭✭

Hi,

I am trying to develop macro for projects which can read project related resources.

How can I inside the python script in do function:

def do(payload, config, plugin_config, inputs):

get projectId where from is the macro running?


Operating system used: Linux

Tagged:

Best Answer

  • HarizoR
    HarizoR Dataiker, Alpha Tester, Registered Posts: 138 Dataiker
    edited July 17 Answer ✓

    Hi Patrik,

    The get_default_project() method of the dataikuapi.DSSClient class can help you:

    import dataiku
    client = dataiku.api_client()
    current_project_key = client.get_default_project().project_key

    Best,

    Harizo

Setup Info
    Tags
      Help me…