How to access partitions
![Marie](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar22.png)
Marie
Registered Posts: 3 ✭✭✭✭
Hello,
i want to add a variable which comes from partitioning to the table.
So I am using the function in my python script:
dataiku.dku_flow_variables["DKU_DST_id"]
but getting the error
AttributeError: 'module' object has no attribute 'dku_flow_variables'
How to access the variable from which the partitioned are made?
Thanks.
Answers
-
Hi,
Is this happening in a preparation recipe ? These variables are only available in regular Python recipes. -
It is a normal python recipe with a Input dataset and an output dataset. I can add the variable code by manually clicking on the variable on the left side after I validated the code successfully.
-
Hello,
I have the same problem. Did you finally find a solution. If yes, can you please share it with me?
Any solutions from another person would be great
Thanks in advance -
Hello, I am also wondering if there is a working solution. I am using Dataiku 8.0.x, i have the same use case: trying to access partition information from within a python recipe. Getting the same error:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-51-a0ae99823750> in <module> 1 baseline_metric_tracker=[] ----> 2 part_name= dataiku.dku_flow_variables["DKU_DST_partition"] AttributeError: module 'dataiku' has no attribute 'dku_flow_variables'
-
I think it depends on the version of dataiku