About dkuGetProjectVariables function in R API
Hi,
What is ”variables” at dkuGetProjectVariables function in R API?
I try this function at my code,but I can't get any infomation.
# I'm hoping to get infomation of project or dataset name in project.
https://doc.dataiku.com/dss/api/8.0/R/dataiku/reference/dkuGetProjectVariables.html
dkuGetProjectVariables() $standard $local
Is there something wrong with it?
Best regards,
Aya Yoshizawa
Best Answer
-
Tuong-Vi Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Neuron 2020, Dataiku DSS Adv Designer, Registered, Neuron 2021, Neuron 2022 Posts: 33 Partner
Hello,
Do you mean dynamic variables used in project ?
Ex: Syntax for R : var_prj <- dkuCustomVariable("projectKey")
In R recipie (or python), you can refresh dynamic variables used by clicking on 'validate' button and select variables available there :
Answers
-
aya Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 18 Partner
Hi,
Thank you for your reply.
I didn't understand project variable well. I thought it was an element such as a dataset.
I could get return value after I setted project variable.
Can I get the dataset information in my project from the R API like project variables? -
Tuong-Vi Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Neuron 2020, Dataiku DSS Adv Designer, Registered, Neuron 2021, Neuron 2022 Posts: 33 Partner
Hello @aya
,Thanks to project variables, you can refresh dynamically a dataset. For example, in a spark sql recipie, instead of this :
you can write this :
by specifying the project variable in menu > variables :
There is post about this in the community there : https://community.dataiku.com/t5/Using-Dataiku-DSS/Dynamic-Global-variables-in-DSS/m-p/2279,
other source in reference documentation : https://doc.dataiku.com/dss/latest/scenarios/variables.html
Hope it helps,
edit : good tutorial in dss academy about variables : https://academy.dataiku.com/path/advanced-designer/variables-101/616220
-
aya Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 18 Partner
Hi Tuong-Vi,
Thank you about Project variables.
It's very useful infomation.
I try tutorial of variables.