Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I WANT TO CONCATENATE THE TWO DATA SETS..!! (JUST LIKE UNION FUNCTION IN QLIKVIEW)
Im having two dateset say DATA_SET A, DATA_SET B, DATA_SET_X
DATA_SET_A:
LOAD S_KEY as SKEY_NEW, COLUMNa, COLUMNb
Resident JOBS_TABLE
INNER JOIN (DATA_SET_A)
LOAD S_KEY as SKEY_NEW, STATUS
RESIDENT DATA_SET_X
DATA_SET_B:
LOAD S_KEY, COLUMNa, COLUMNb
Resident JOBS_TABLE
Where not exists (S_KEY, SKEY_NEW)
NOCONCATENATE
FINAL_OUTPUT:
LOAD * RESIDENT DATA_SET_A
CONCATENATE
LOAD * RESIDENT DATA_SET_B
But the issue is data_set_B is completely getting loaded(after keeping a filter(NOT EXISTS)
I WANT TO EXCLUDE THE ROWS IN DATA_SET_A
SO MY CRITERIA IS TO EXCLUDE ROWS... but full data set 2 is also getting loaded
DATA_SET_A - - > 5 LAKH RECORD
DATA,_SETS_B - - > 17Lakh records
So i want 17-5 =12 to 13 lakh record
Can you please help me to write an best code..!!
Thanks in advance..!!
It seems your Where exists key field not use properly can you check this did you get any error for this Where not exists ( SKEY_NEW , S_KEY )
DATA_SET_A:
LOAD S_KEY as SKEY_NEW, COLUMNa, COLUMNb
Resident JOBS_TABLE
INNER JOIN (DATA_SET_A)
LOAD S_KEY as SKEY_NEW, STATUS
RESIDENT DATA_SET_X
DATA_SET_B:
LOAD S_KEY, COLUMNa, COLUMNb
Resident JOBS_TABLE
Where not exists ( SKEY_NEW , S_KEY )
NOCONCATENATE
FINAL_OUTPUT:
LOAD * RESIDENT DATA_SET_A
CONCATENATE
LOAD * RESIDENT DATA_SET_B
hi
try with below code
Where not exists (SKEY_NEW,S_KEY)
What is your full script can you share if possible?
May be you need NOCONCATENATE before DATA_SET_A
NOCONCATENATE
DATA_SET_A:
LOAD S_KEY as SKEY_NEW, COLUMNa, COLUMNb
Resident JOBS_TABLE
INNER JOIN (DATA_SET_A)
LOAD S_KEY as SKEY_NEW, STATUS
RESIDENT DATA_SET_X
DATA_SET_B:
LOAD S_KEY, COLUMNa, COLUMNb
Resident JOBS_TABLE
Where not exists (SKEY_NEW, S_KEY)
NOCONCATENATE
FINAL_OUTPUT:
LOAD * RESIDENT DATA_SET_A
CONCATENATE
LOAD * RESIDENT DATA_SET_B
Hi,
You need to adjust your script like below
Where not exists (SKEY_NEW, S_KEY)
- First parameter previously existing column you want to compare with
- Second parameter current table column you want to match
Regards,
Jagan.