JDBC producer creating data as empty in database instead of NULL
Hi Team
We were using
JDBCProducer_01 to load data previously and the load was working fine we were able to see NULL getting loaded instead of empty string but recently we moved to
JDBCQuery_01 and created insert statement but now we see all the NULL are replaced with empty string what can be the fix for same one we need NULL to be loaded into edw table
Page 1 / 1
@akanshajain6793 ,
In Streamsets ,for the string variable ,if no values from source then by default its value is null and if you are trying insert it into destination table ,it will insert null value.
If you are using jdbc query , then you can use explicitly null value like below.
INSERT INTO EMP VALUES ("123","xxx","Oslo",.12,NULL).
Kindly provide your insert query which is is replacing null value with empty string, so i can check it my data collector and will try to help you on the same.
If its possible if you can validate the null check before inserting data to destination DB then it will very helpful.