Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to load only field contains ID. How can I do this in the load script.
Where Clause would work but could take a longer time to load. It would be great if you suggest other options.
T1:
LOAD Distinct
ID,
Key,
Parameter;
SQL SELECT *
FROM "Server"."Prod".table1;
You can use Resident Load:
T1:
LOAD Distinct
ID,
Key,
Parameter;
SQL SELECT *
FROM "Server"."Prod".table1;
T2:
Load
If(len(ID)>0,ID,Null())as ID,
If(len(ID)>0,Key,Null())as Key,
If(len(ID)>0,Parameter,Null())as Parameter
Resident T1; DROP Table T1;
maybe like that:
tmp0:
LOAD * INLINE [
Field1, Field2, Field3
213, sd, hj
436, ggrer, uzt
5467, sdf, uzk
76, ght, fr
687, dd, rr
, trh, jzt
, rzt, ziu
, , olöoi
];
NoConcatenate
tmp1:
Load If(len(Field1)>0,Field1,Null()) as Field1,
If(len(Field1)>0,Field2,Null()) as Field2,
If(len(Field1)>0,Field3,Null()) as Field3
Resident tmp0; DROP Table tmp0;
Thanks for the response, can you help me within the sql load statement?
You can use Resident Load:
T1:
LOAD Distinct
ID,
Key,
Parameter;
SQL SELECT *
FROM "Server"."Prod".table1;
T2:
Load
If(len(ID)>0,ID,Null())as ID,
If(len(ID)>0,Key,Null())as Key,
If(len(ID)>0,Parameter,Null())as Parameter
Resident T1; DROP Table T1;
Thanks Frank