Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I have a new error in my ETL job. I have posted several snapshots for easy reference.
This is my new error:
tMap_1 For input string: "NULL"
Exception in component tMap_1
java.lang.NumberFormatException: For input string: "NULL"
I believe it is due to the literal NULL values that are coming through on my input .txt file, but I've been known to be wrong.
There are 3 columns that will have NULL values. I am using a tmap for transformation to write to our idb2 table using a tas400output component.
Suggestions on why this error is being thrown? Any other information I can provide?
Thank you in advance!
Michelle
@mmiller32 , You need to handle for "NULL" sting value getting in the filed by using something like below.
"NULL".eqauls(row1.col)?null:row1.col
Probably because you are trying to do a data type conversion or formatting of data on one of those columns where the value is null. On the other hand if you can share your tmap design and file schema, it will help a bit
Hi Michelle,
I guess you are getting input data as "NULL" string instead of actual null. Could you please double check your input area of the job and how data is getting loaded?
Another chance is that you are trying to do a null comparison and instead of doing null check using Relational ISNULL function, you are trying to match "NULL" string. If you are looking to check NULL, you need to use below function.
Relational.ISNULL(row1.input_column) ? true_condition : false_condition
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
@mmiller32 in your tMap you might be using a Java function in expression builder for different columns.
For all these columns perform Null Handling before the actual java function. Also check the data types, Numeric may not accept Null values.
Cheers
@mmiller32 , You need to handle for "NULL" sting value getting in the filed by using something like below.
"NULL".eqauls(row1.col)?null:row1.col