Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am stuck on below :-
Data:
Load * where not isnull(tag_TrolleyID_mold);
Load *, Previous(tag_TrolleyID_paint1) as tag_TrolleyID_paint;
LOAD *,
IF( "tag_Color" = 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_mold,
IF( "tag_Color" <> 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_paint1
From....
I want to add sort the feild 'tag_TrolleyID_mold' using order by .
Since, i used preceding load, i cannot apply sort as it will need resident condition.
Can anyone please help me ?
I am not sure if we can apply preceding load and resident load at the same time.
Please help !!!
Thank You
Why use a preceding load at all? It might be slightly cleaner to look at, but it doesn't actually make a difference as far as I know. You can easily use Resident here, though:
TempTable:
Load *, Previous(tag_TrolleyID_paint1) as tag_TrolleyID_paint;
LOAD *,
IF( "tag_Color" = 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_mold,
IF( "tag_Color" <> 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_paint1
From....;
FinalTable:
NoConcatenate load *
Resident TempTable
WHERE not isnull(tag_TrolleyID_mold)
ORDER BY tag_TrolleyID_mold;
Drop table TempTable;
Why use a preceding load at all? It might be slightly cleaner to look at, but it doesn't actually make a difference as far as I know. You can easily use Resident here, though:
TempTable:
Load *, Previous(tag_TrolleyID_paint1) as tag_TrolleyID_paint;
LOAD *,
IF( "tag_Color" = 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_mold,
IF( "tag_Color" <> 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_paint1
From....;
FinalTable:
NoConcatenate load *
Resident TempTable
WHERE not isnull(tag_TrolleyID_mold)
ORDER BY tag_TrolleyID_mold;
Drop table TempTable;