Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Ayden
Contributor III
Contributor III

Generic load

hello 

am trying to join a table that uses the GENERIC LOAD FUNCTION to another table how can I achieve this.

 

 

 

load

part,

delivery_date,

next_delivery_date

from abc;

left join Generic Load

part,

Qty,

Location

From xyz ;

1 Solution

Accepted Solutions
MarcoWedel

 

table1:
LOAD part,
     delivery_date,
     next_delivery_date
From abc;

table2:
Generic
LOAD part,
     Qty,
     Location
From xyz;

FOR i = NoOfTables()-1 to 0 STEP -1
  LET vTable=TableName($(i));
  IF WildMatch('$(vTable)', 'table2.*') THEN
    LEFT JOIN (table1) LOAD * RESIDENT [$(vTable)];
    DROP TABLE [$(vTable)];
  ENDIF
NEXT i

 

 

hope this helps

Marco

View solution in original post

3 Replies
rubenmarin

Hi, Generic creates different tables, one for each attribute, wich should be the 2nd field of the load.

Take a look at this blog post to understand what generic does: https://community.qlik.com/t5/Qlik-Design-Blog/The-Generic-Load/ba-p/1473470

Instead on doing a left join with CombinedGenericTable, do the left join with your main table.

MarcoWedel

 

table1:
LOAD part,
     delivery_date,
     next_delivery_date
From abc;

table2:
Generic
LOAD part,
     Qty,
     Location
From xyz;

FOR i = NoOfTables()-1 to 0 STEP -1
  LET vTable=TableName($(i));
  IF WildMatch('$(vTable)', 'table2.*') THEN
    LEFT JOIN (table1) LOAD * RESIDENT [$(vTable)];
    DROP TABLE [$(vTable)];
  ENDIF
NEXT i

 

 

hope this helps

Marco

Ayden
Contributor III
Contributor III
Author

Thanks Marco