Get the partition variable in python recipe
Hi,
I have a dataset in dataiku which is partitioned, I am looking for tips on how I can get the partition value in python which is set as part of running the recipe.
See screenshot attached for reference. Basically i'm trying to access the partition variable in code
Answers
-
Hi Subhash,
In the python you can use:
dataiku.dku_flow_variables["DKU_DST_curr_date"]
You can see available variables on the left panel from the python recipe and click on it to insert the code.
-
Thanks @Mattsco
but the variables it's disabled and I can't figure out a way to add a variable. All I want is to pick the curr_date i set as partition to process.Thanks for your help
-
Hi Subhash,
It's not disabled, it says: "Validate your code to get the list of substitution variables."
So you must click on the validate button, on the left side of the RUN button, to get it.