Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Why is Hive/Sqoop ignoring my --null-non-string argument?

Highlighted

Why is Hive/Sqoop ignoring my --null-non-string argument?

Contributor

I have a sqoop import job in which I tell it to use '\\N' for both the --null-string and --null-non-string values. It is importing from an SAP HANA database directly to hive. I noticed that for a particular table I import, there are two columns of type NUMC in SAP that are being converted to string automatically, but instead of having null values it is defaulting to a value of 00000000. Why would sqoop be ignoring the --null-non-string argument? Or am I doing it wrong?

2 REPLIES 2
Highlighted

Re: Why is Hive/Sqoop ignoring my --null-non-string argument?

Expert Contributor

I am not an expert for SAP. My guess is that deep down the NUMC type in SAP is actually not saving as null value if it is empty.

Highlighted

Re: Why is Hive/Sqoop ignoring my --null-non-string argument?

@Josh Persinger

As @Frank Lu indicated, SAP is likely not storing NULL as the value for null values. It may depend on how the table was created. Was it defined using initial values? That changes what can be written into the field. Check out this documentation:

https://help.sap.com/saphelp_nw73ehp1/helpdata/en/cf/21ebf0446011d189700000e8322d00/content.htm

Don't have an account?
Coming from Hortonworks? Activate your account here