Submit your use case or success story to the 2023 edition of the Dataiku Frontrunner Awards ENTER YOUR SUBMISSION

Macro run with api

Solved!
benbeckerfr
Level 1
Macro run with api

Hello, 

I am using Dataiku 9.0 version.

I develop a plugin to run a macro. This macro gets a folder from a managed_folder param that we indicate manually when we launch (with 'MANAGED_FOLDER' param in the Runnable.json). 

I am trying to launch it from the pythonapi, and do not know how to fill the param dict in DSSMacro.run(params={}) to precise the managed folder needed for the param. 

Does anyone had this issue for params in macro.run ? 

Thanks for your help.


Operating system used: linux

0 Kudos
1 Solution
ZachM
Dataiker

Hi @benbeckerfr,

The "params" kwarg is a dict of parameters that will be passed to the macro. For MANAGED_FOLDER parameters, the value should be set to the ID of the managed folder.

Here's an example:

run_id = my_macro.run(
    params={"my_folder": "9UQMRQ9O"}
)

 

Thanks,

Zach

View solution in original post

1 Reply
ZachM
Dataiker

Hi @benbeckerfr,

The "params" kwarg is a dict of parameters that will be passed to the macro. For MANAGED_FOLDER parameters, the value should be set to the ID of the managed folder.

Here's an example:

run_id = my_macro.run(
    params={"my_folder": "9UQMRQ9O"}
)

 

Thanks,

Zach

Labels

?
Labels (2)
A banner prompting to get Dataiku