DSS available variables
Hi,
I don't find any documentations about DSS availables variables like ${projectKey}
My need is very easy, I just want to configure a filesystem connector with ROOT PATH = /users/${USERNAME}
=> I try several variable $username, $userid etc ... but it doesn't work
So what is the DSS variable to catch the "user login", and where is describe the availables variables.
I understand that we can setup our proper variables, for for this use case, I just need the "user login"
Thanks in advance
regards
Answers
-
Hi @francescod
,
There isn't a user variable that can be used in the path prefix in this way to create user subfolders. This is because this would allow the flow to be inconsistent across users. For example, if a user_a was able to create a dataset at the path /users/user_a/MY_PROJECT/my_dataset, then if some user_b attempted to view this dataset in the flow, it would "not exist", because that user would be attempting to access a different path: /users/user_b/MY_PROJECT/my_dataset. So this particular setup would not work.Additional variables are available in specific contexts in DSS. For recipes, you will see the available variables on the lefthand sidebar of a recipe. The available variables will also depend on the recipe itself. In certain contexts you can also view the available variables using the python API endpoint get_custom_variables().So for example in a scenario, you can pull the available variables using get_custom_variables():{u'dip.home': u'/Users/ehabash/Downloads/dataiku-versions/dataiku-dss-9.0.3',
u'scenarioTriggerTime': u'1622136544847',
u'scenarioTriggerParams': u'{}',
u'scenarioTriggerState': u'null',
u'scenarioTriggerRunId': u'2021-05-27-10-29-04-848',
u'projectKey': u'DKU_HAIKU_STARTER'}Or from a notebook:{u'dip.home': u'/Users/ehabash/Downloads/dataiku-versions/dataiku-dss-9.0.3', u'projectKey': u'DKU_HAIKU_STARTER'}