Support Questions
Find answers, ask questions, and share your expertise

Sqoop Merge: Can't parse input data: '\N'

New Contributor

Hi All,

I am getting error at Sqoop merge as below, Sqoop import is working fine for this table.

Can you please help? Any help is appreciated.

Error: java.lang.RuntimeException: Can't parse input data: '\N'
at table.__loadFromFields(
at table.parse(
at org.apache.hadoop.mapred.MapTask.runNewMapper(
at org.apache.hadoop.mapred.YarnChild$
at Method)
at org.apache.hadoop.mapred.YarnChild.main(
Caused by: java.lang.NumberFormatException
at java.math.BigDecimal.<init>(
at java.math.BigDecimal.<init>(
at table.__loadFromFields(
... 11 more

and Sqoop import command is as follows-

<start to="SQOOP_IMPORT_TABLE" />
<action name="SQOOP_IMPORT_TABLE">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<error to="Email_failure" />



Rising Star

It looks like you have \n defined for null-non-string, but in the input it has a null as \N.

Changing the null-non-string to \\N should resolve the issue (unless you have both \n and \N in the source, in which case you need to cleanse your data).

Hopefully this helps!

New Contributor
I have tried using \\N as well, its still giving same error. Input data from Oracle DB either have some value in it or it is null.

Rising Star

My apologies, I misunderstood the question. You say the import is working for the table but sqoop-merge is failing. Are you running a merge against a dataset that had null defined as \N and one where null was defined as \n?

New Contributor

running a merge against a dataset that had null defined as \N.