Skip to main content
Solved

Сomplicated version of left join

  • Oct 22, 2022 5:33 AM UTC
  • 4 replies
  • 293 views

Forum|alt.badge.img+1

Hello,

How to write the following condition in Ataccama Desktop (Join step):

left join anl.productsjur p on (asd.creditpurpose = p.cp or coalesce(asd.creditpurpose, p.cp) is null)
                        and (asd.creditpurpose2 = p.cp2 or coalesce(asd.creditpurpose2, p.cp2) is null)
                        and (asd.creditobject = p.co or coalesce(asd.creditobject, p.co) is null)

The difficulty is that in the join step only one field for left key and right key is available for selection..

Best answer by DannyRyan

Hi FCB developer,

The Join step allows for join conditions of either a single column or an expression.
If required, this will allow you to define join conditions based on multiple columns.

I have attached an example of preparing a joining key which consists of more than one column.

 

 

View original

4 replies

DannyRyan
Ataccamer
Forum|alt.badge.img+2
  • Head of Technical Training
  • Answer
  • Oct 24, 2022 8:03 AM UTC

Hi FCB developer,

The Join step allows for join conditions of either a single column or an expression.
If required, this will allow you to define join conditions based on multiple columns.

I have attached an example of preparing a joining key which consists of more than one column.

 

 


Forum|alt.badge.img+1
  • Author
  • Data Pioneer
  • Oct 27, 2022 8:45 AM UTC

@DannyRyan thank you! 


Joeri
Data Pioneer
Forum|alt.badge.img+4
  • Data Pioneer
  • Dec 18, 2025 1:09 PM UTC

that’s a messy solution. You need to convert non-string fields to string first etc.

Ataccama should really grant us support to use a join on multiple key fields.. 


Joeri
Data Pioneer
Forum|alt.badge.img+4
  • Data Pioneer
  • Dec 18, 2025 1:12 PM UTC

For the record, the above solution is nothing more than a Column Assigner added to a stream, that then does a sum of the fields in between.

<assignment expression="src_id + &quot;|&quot; + src_name" column="pur_join_key">