Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

LOAD Statement

Hi,

I came across this code in a dashboard and can someone explain how it work.  Why is there 2 load statements and only 1 from statement ? What is the source of the first LOAD ?

SLA:

LOAD

  state as sla_state,

priority as sla_priority;

Directory;

LOAD

state,

priority

FROM [task.qvd] (qvd);

1 Solution

Accepted Solutions
kji
Employee
Employee

A load preceding another load (or select) will take the second part as input.

View solution in original post

9 Replies
PradeepReddy
Specialist II
Specialist II

Instead of code you mentioned, we can write in single Load statement...

SLA:

LOAD

state as sla_state,

priority as sla_priority

FROM [task.qvd] (qvd);

kji
Employee
Employee

A load preceding another load (or select) will take the second part as input.

its_anandrjs

Its a preceding load statement and by first statement state, priority fields are get renamed to new name. You can directly renamed it

SLA:

LOAD

state as sla_state,

priority as sla_priority

FROM [task.qvd] (qvd);

Or

SLA:

LOAD

state,

state as sla_state,

priority,

priority as sla_priority

FROM [task.qvd] (qvd);

hic
Former Employee
Former Employee

The Preceding load is explained in this article: Preceding Load.

HIC

Anonymous
Not applicable
Author

Thanks everyone for the quick answer.

So in my example, the final SLA table have sla_status and sla_priority.  Is the inner table still available or is it discarded ?

Anonymous
Not applicable
Author

Also can you achieve what preceding load does with resident load ?

TempTable:

Load

status,

priority;

from   ...

Load

status as sla_status,

priority as sla_priority;

resident TempTable;

hic
Former Employee
Former Employee

There is no "inner table". There is an inner Load and an outer Load that are executed together, and result in one table only. So, the outermost Load defines the content of this table.

HIC

Anonymous
Not applicable
Author

Understood. Thanks.

Anonymous
Not applicable
Author

I read in another thread is Preceding Load is more efficient than Resident load.