Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
A load preceding another load (or select) will take the second part as input.
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);
A load preceding another load (or select) will take the second part as input.
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);
The Preceding load is explained in this article: Preceding Load.
HIC
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 ?
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;
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
Understood. Thanks.
I read in another thread is Preceding Load is more efficient than Resident load.