Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
irmantas
Contributor III
Contributor III

Join (mapping) table in loading script

Hello, everyone,

Need help in joining tables, or mapping table for adjust some data. Situation: I am loading main table with a lot of columns from data source (.xls), and need join other (Adjustment) table of two colummns. If the key (ProdId) are in both tables need change Producer meaning in Main table.
Example:

irmantas_0-1638391550016.png

When does a script have to be written for the data to load properly?

1 Solution

Accepted Solutions
Or
MVP
MVP

This is easier to achieve using a mapping load, though you could join the tables and then make a second load pass to pick out the producer from Adjustment if you so prefer. For mapping:

Adjustment:

Mapping Load ProdId, Producer as Producer_For_Map

From AdjustmentTable;

Main:

Load ProdId, TransDate, QTY, applymap('Adjustment',ProdId,Producer) as Producer

From MainTable;

 

 

View solution in original post

2 Replies
Or
MVP
MVP

This is easier to achieve using a mapping load, though you could join the tables and then make a second load pass to pick out the producer from Adjustment if you so prefer. For mapping:

Adjustment:

Mapping Load ProdId, Producer as Producer_For_Map

From AdjustmentTable;

Main:

Load ProdId, TransDate, QTY, applymap('Adjustment',ProdId,Producer) as Producer

From MainTable;

 

 

irmantas
Contributor III
Contributor III
Author

Thank you, it's works