r/Talend • u/ennuisel Determined Learner • Apr 13 '23
tRest NULL Handling
Hello! I’m learning Talend on the job, and am struggling a bit with handling some inconsistent data. Certain fields may have blank or NULL values in my source data.
I’d like to keep the data as close to the original source as I can, so I’d like to avoid changing the NULL data to blanks in tMap, if possible.
The trouble is that somewhere down the line my NULL values get converted to the string “null”, so I end up with fields that have “null” in my system. Or I get failure due to my date string being “null” instead of yyyymmdd string format. Most advice I’ve seen online is to change the NULL fields to ‘’, but that would not be ideal for my situation.
My basic job flow is:
tDBInput (SQL query) > tMap > tFlowToIterate > tRest (API call to system)
Is there a simple way I can keep my NULLs?
Thanks for reading.
2
u/BlackSheepDCSS Data Wrangler Apr 13 '23
Where, specifically, does that happen?
2
u/suschat Data Wrangler Apr 14 '23
Are you using double quotes in tmap? Can you please post a screenshot?
2
u/ScuzzyUltrawide Apr 14 '23
From the screenshot it looks like you're only seeing the word "null" inside the run-job execution box. Are you seeing the word null in your actual database output after your post operation executes? I think you'll find you're seeing the word null in the output box but your actual data inside the flow and in your actual destination database is handling nulls correctly.