Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys
My script generate Duplicate row, here 's my script :
Dummy_bscs:
LOAD
ID,
"CUSTCODE",
"DN_NUM",
...
from
// after that i get all ID from the first table to get the KIT cooresponding to those ID's
ODBC CONNECT......; //connexion
temp2:
LOAD ID resident Dummy_bscs;
Dummy_DWH:
LOAD
ID,
KIT
where Exists(ID);
LOAD
'8921603'&id AS ID,
kit_code AS KIT;
SQL SELECT id_number AS id
, kit_code
FROM
;
join(Dummy_bscs)
LOAD *
Resident Dummy_DWH;
drop table temp2;
I there any thing wrong with my script, Do I have to do a left join?
Here's the result :
which table has ; Code_Bout ? you have multiple values for the same key causing the duplicate rows
Hi Wiem,
It seems table Dummy_bscs has two CODE_BOUT.. field records for same ID and other fields.
One record where CODE_BOUT... is I34 and another where CODE_BOUT.. is NULL.
Based on the information you have shared, I can suggest following for now,
Put Where clause to eliminate Null from Dummy_bscs table.
Like,
Dummy_bscs:
LOAD
ID,
"CUSTCODE",
"DN_NUM",
...
from
WHERE len(trim(CODE_BOUTFIELD))>0;
OR
WHERE not IsNull(CODE_BOUTFIELD);
Please share sample data or application, in case if above suggestion doesn't resolve your case.
Check if your load script generates synthetic keys too. I had some issues with double rows and after I fixed the load script the problems went away. Just a thought.