Submit your inspiring success story or innovative use case to the 2022 Dataiku Frontrunner Awards! ENTER YOUR SUBMISSION

Embedded dynamic select

UgoD
Level 2
Embedded dynamic select

Hi,

 

I know that we can dynamicaly influence the SELECT dropdown of a plugin param, but when I'm trying to use it in a OBJECT_LIST param, it doesn't work.

 

My recipe.json looks like that

{
...
"paramsPythonSetup": "compute_custom_select.py",
"params": [
{
"name": "param1",
"label": "param1",
"type": "OBJECT_LIST",
"subParams": [
{
"name": "sub_param_1",
"label": "sub_param_1",
"type": "SELECT",
"selectChoices": [
{
"value": "a",
"label": "A"
},
{
"value": "b",
"label": "B"
}
]
},
{
"name": "sub_param_2",
"label": "sub_param_2",
"type": "SELECT",
"getChoicesFromPython": true
},
....
]
...
}
]
}

 

Here the error I get in backend.log, where utils is my plugin name

Plugin component  in utils doesn't declare python setup code

 

Is it normal ? Am I doing something wrong ?

PS: I'm using Dataiku 10.0.7 which should have fixed issue on OBJECT_LIST dynamic select.

 

Thanks for reading me

Best regards,

Ugo


Operating system used: Windows 10

0 Kudos
3 Replies
AmandineS
Dataiker
Dataiker

Hi Ugo,

Thank you for raising this point. Indeed, there is an issue while reading field paramsPythonSetting at recipe level when an OBJECT_LIST is used.

A ticket has been opened in our backlog to fix this issue and it will be tackled as soon as possible.

In the meantime, you can define the parameter paramsPythonSetting at plugin level in plugin.json file.

Would this workaround suit your needs?

Have a nice day!

0 Kudos
UgoD
Level 2
Author

Hi @AmandineS 

 

It seems to work fine with the paramsPythonSetup param in plugin.json! Thanks!

I'm just not sure of something, as it's the first time I'm trying to do this kind of thing and I'm not really finding any example anywhere,

Does the inputs parameter from do function in the file referenced by paramsPythonSetup should return all input dataset of the recipe? Because I can't find a way to get them and my inputs params is empty (even if I have several inputs dataset). 🙂

 

Thanks for your previous answer !

Have a nice day

Ugo

0 Kudos
AmandineS
Dataiker
Dataiker

Hi @UgoD,

Indeed, the input datasets should be present in the inputs parameter of the do function.

I added this information to the ticket and we will deal with it as soon as we can.

I will come back to you as soon as a fix is delivered.

Thanks again for reporting this to us and sorry for the inconvenience.

Have a nice day

Amandine

0 Kudos