Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
KirstenKa
Creator II

Left join doesn't work

This is what I would like to establish with my joins

KirstenKa_0-1689801334549.png

 

 

I have 5 datasources and I would like to join all together. I have 1 main datasource (datasource 1) from which I would like to do a left join to all datasource. My code looks like this but it doesn’t return any data, though it doesn’t give an error when the script, and it creates 1 tables which contains all values from the different datasources . My script looks like this, what goes wrong. I already checked if I match with exactly the same columns but that is the case

Main datasource to which I join

KirstenKa_1-1689801334551.png

 

 

Joins to main datasource

KirstenKa_2-1689801334552.png

 

KirstenKa_3-1689801334554.png

 

KirstenKa_4-1689801334555.png

 

KirstenKa_5-1689801334556.png

 

KirstenKa_6-1689801334556.png

 

 

 

 

 

 

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
cristianj23a
Partner - Creator III

When you do a join, the data in your relationship fields (in this case "ItemColor_GlobalId") must be exactly the same.

In the images you send, they are not.
For example:

C8FT:
your data ends in "Global ID"

but in the other table (C8App) where you are doing Left Join, it ends in "Color Code", for them to match it must end in "Global ID".

 

Regarts.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.

View solution in original post

8 Replies
cristianj23a
Partner - Creator III

When you do a join, the data in your relationship fields (in this case "ItemColor_GlobalId") must be exactly the same.

In the images you send, they are not.
For example:

C8FT:
your data ends in "Global ID"

but in the other table (C8App) where you are doing Left Join, it ends in "Color Code", for them to match it must end in "Global ID".

 

Regarts.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
KirstenKa
Creator II
Author

Thanks that works @cristianj23a  however from 1 datasource to the other I really need global_id else I have missing data, and in other datafiles I don't have global_id and might need to join there on another unique third value, how can I deal with this/resolve this?

cristianj23a
Partner - Creator III

Play with relationships, I have a query.

For example, in C8FT, I see concatenated data, . Are those 3 data the concatenation of 3 fields to obtain %ItemColor_GlobalId?

If you have test data, send it to me and I'll figure it out for you.

 
https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
KirstenKa
Creator II
Author

@cristianj23a I have uploaded the files and the script. 

Are those 3 data the concatenation of 3 fields to obtain %ItemColor_GlobalId? -> yes

From C8 to Infa it is joined on Trading code, Color Code and Global ID

From C8 to other datafiles its is Trading code and Color Code -> different value names in the different files  

KirstenKa
Creator II
Author

Here is the load script

KirstenKa
Creator II
Author

@cristianj23a  eventually the problem was that I had 2 almost similar files. It was solved by using concatenate instead of left join

cristianj23a
Partner - Creator III

Hello KirstenKa, I'm glad that it has been solved, sorry for not responding on time, I was traveling because in my country we are on national holidays.

 

Regarts.

 
https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
KirstenKa
Creator II
Author

No problem @cristianj23a , thanks for thinking with me you brought me in the right direction. It is appreciated