The Dataiku Frontrunner Awards have launched to recognize your achievements! SUBMIT YOUR ENTRY

Best practice to call Parameter set for preset password

Solved!
NN
Level 4
Best practice to call Parameter set for preset password

Hi All,
I have a Parameter set (paramset1) where i have defined a preset password (presetpass). 
In my custom macros runnnable.json i define a parameter (preset_groups)
and assign the ParameterSetId to paramset1

{
"name": "preset_group",
"label": "Preset Details",
"type": "PRESET",
"parameterSetId": "paramset1",
"mandatory": true
}


I then call the presetPass in my runnable.py.

preset_params = self.config["preset_group"]
preset_password=preset_params.get("presetpass")


My question is, can the parameter (preset_groups ) be hidden in my runnable.json
The users donot need to change this password while running the Macro

or is there any other way to call the preset password in the python code without having to show it as a parameter in the runnable.json.

0 Kudos
1 Solution
Alex_Combessie
Dataiker
Dataiker

Hi,

Technically, you can hide the parameter by using a visibilityCondition. However, it means this parameter will no longer be editable, so all users will use the same password.

Note that you can disable the possibility for end-users to add their own preset here, by deactivating the "Definable inline" and "Definable at project level" buttons:

Screenshot 2021-05-03 at 13.39.03.png

Hope it helps,

Alex

View solution in original post

2 Replies
Alex_Combessie
Dataiker
Dataiker

Hi,

Technically, you can hide the parameter by using a visibilityCondition. However, it means this parameter will no longer be editable, so all users will use the same password.

Note that you can disable the possibility for end-users to add their own preset here, by deactivating the "Definable inline" and "Definable at project level" buttons:

Screenshot 2021-05-03 at 13.39.03.png

Hope it helps,

Alex

View solution in original post

NN
Level 4
Author

Visibility condition was such a simple solution. dont know why i was complicating things. 😞
Thanks Alex.

A banner prompting to get Dataiku DSS
Public