Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Join Issue - Tables coming from different sources

Hi all,

I am having some trouble by joining infos from diferent sources.

I have 3 different sources:

The first one comes from the data base and has 5 fields, which are:

ID,

Supplier,

Line,

Alocated,

Brand.

The second one comes from a excel spreadsheet and it has 2 fields:

Supplier,

Cluster_Supplier

The third one comes from a excel spreadsheet as well and it has 2 fields:

Line,

Cluster_Line

My goal is adding the field "Cluster" in the first table, by the rule:

if the value in the field "Alocated" (first table) equals to "not", then I look at the Brand (first table). if its value is "4", then the value must be 4. If its not 4, I get the value from the field "Cluster_Line".

If the value in the field Alocated is different of "not", then i get the value in the field "Cluster_Supplier".

Can anyone get me a script structure of how doing it

Note: not all the possible existing values of "Line" are registeres in the field.

Thx in advance!

The file I have is attached. I believe this join is the issue why I am having trouble in calculating the number of backlog activities.

3 Replies
Clever_Anjos
Employee
Employee

Create 2 maps

a) Map1

Supplier,

Cluster_Supplier

b) Map2

Line,

Cluster_Line

And then when you´re loading your table

LOAD ID,

Supplier,

Line,

Alocated,

Brand,

If(Alocated = 'not',

     If( Applymap('Map1',Supplier) = 4,4,

      Applymap('Map2',Line))) as Cluster

Anonymous
Not applicable
Author

Life saver!

Clever_Anjos
Employee
Employee

?