Conditional textjoin in Dataiku help

yueykabuey
yueykabuey Registered Posts: 2

Hi all, I am trying to 'textjoin' in Dataiku, whereby I would like to concatenate all values in Column B (condition type) based on the value in column A (deal id), so I get the output below (highlighted yellow column) 

Screenshot 2024-03-08 at 10.30.51.png

Tagged:

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron
    Answer ✓

    A Group By recipe with concat on the column will give you the string concatenation:

    Screenshot 2024-03-08 at 11.08.52.png

    Screenshot 2024-03-08 at 11.10.07.png

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron

    Or if you prefer to keep the rows ungrouped you can use a Window recipe with a custom aggregation:

    Screenshot 2024-03-08 at 11.19.11.png

    Screenshot 2024-03-08 at 11.19.17.pngScreenshot 2024-03-08 at 11.19.29.png

    PS: Custom Aggregations are not supported in the DSS engine so make sure you have your datasets in a SQL database that supports string_agg aggregate function or consult with your database documentation on what function you can use.

  • yueykabuey
    yueykabuey Registered Posts: 2

    That was exactly what I was after, thank you so much! Spent quite a few hours trying to find a solution!!

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron

    Also see below for a solution that doesn't group the rows.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron

    And please mark the thread as acepted solution

Setup Info
    Tags
      Help me…