Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sequence in Multiple Load Statements

Here is what I am doing.

Load * from Where ColName < XXX

//(

Load A, B, C From Table1 inner Join Load A, X, Y from Table 2

//)

I want the entire joining load to execute first before the top level load statement executes.

Currently the top level load executes after just the statement "Load A, B, C From Table1 "

Is there a way to make that happen?

Thanks in advance.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

The preceeding load syntax I believe only works with a single source load. So you'll just need to write the loads in a more linear sequence:

[MyTable]:
LOAD A, B, C FROM Table1;
INNER JOIN LOAD A, X, Y FROM Table2;
INNER JOIN LOAD DISTINCT Colname RESIDENT [MyTable] WHERE ColName < XXX;

If performance is a problem, something like this may be faster at the cost of complexity (not certain I have the syntax right):

[MyTable]:
LOAD A, B, C FROM Table1;
INNER JOIN LOAD A, X, Y FROM Table2;
INNER JOIN LOAD ColName WHERE ColName < XXX;
LOAD fieldvalue('ColName',iterno()) as "ColName"
AUTOGENERATE 1 WHILE len(fieldvalue('ColName',iterno()));

View solution in original post

3 Replies
johnw
Champion III
Champion III

The preceeding load syntax I believe only works with a single source load. So you'll just need to write the loads in a more linear sequence:

[MyTable]:
LOAD A, B, C FROM Table1;
INNER JOIN LOAD A, X, Y FROM Table2;
INNER JOIN LOAD DISTINCT Colname RESIDENT [MyTable] WHERE ColName < XXX;

If performance is a problem, something like this may be faster at the cost of complexity (not certain I have the syntax right):

[MyTable]:
LOAD A, B, C FROM Table1;
INNER JOIN LOAD A, X, Y FROM Table2;
INNER JOIN LOAD ColName WHERE ColName < XXX;
LOAD fieldvalue('ColName',iterno()) as "ColName"
AUTOGENERATE 1 WHILE len(fieldvalue('ColName',iterno()));

Not applicable
Author

Thanks JohnW.

I did your first suggestions but wanted to get clarification

johnw
Champion III
Champion III

Are you asking for clarification on what the fist bit of script I posted does? How it differs from using a preceeding load? I guess I need clarification on what you want clarification on.