Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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()));
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()));
Thanks JohnW.
I did your first suggestions but wanted to get clarification
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.