Replicate PATH() DAX function in Dataiku

Options
riri92
riri92 Registered Posts: 1

Hello everyone,

I want to replicate the path() dax function using visual recipes in Dataiku.

For example, I have this source table :

IDParent_ID
AB
BG
CA
DC
EF
FA
GB

I want to create a new Path column that returns a delimited text string with the identifiers of all the parents of the current identifier, starting with the oldest and continuing until current :

IDParent_IDPath
ABH|G|B|A
BGH|G|B
CAH|G|B|A|C
DCH|G|B|A|C|D
EFH|G|B|A|F|E
FAH|G|B|A|F
GHH|G

I tried to use a python recipe but I apparently have a memory problem. I don't know if it can be achieved through visual recipes and formulas.

Thank you for the help.

Answers

  • JordanB
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 293 Dataiker
    Options

    Hi @riri92
    ,

    Unfortunately, there isn't a built-in function in visual recipes that would achieve this. I would recommend going the Python route to generate an equivalent output. You could leverage the Dataiku Python API and libraries such as Pandas to read in the dataset, compute the path hierarchy and append the output of the parent-child relationship as a new column to the dataset.
    To reduce the memory overhead, you could try breaking up your data or break the work into batches. As a last resort, you could increase the "jek.xmx" setting to 3g, according to this procedure: https://doc.dataiku.com/dss/latest/operations/memory.html#the-jek
    Let me know if you have any further questions.
    Thanks!
    Jordan
Setup Info
    Tags
      Help me…