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.

Getting an error in sqoop when importing data from MSSQL into Hive Table

Highlighted

Getting an error in sqoop when importing data from MSSQL into Hive Table

New Contributor

Hi,

I'm getting an error when executing the following command to import data from MSSQL into Hive table using Sqoop

sqoop import --connect "jdbc:sqlserver://10.5.55.55:1433;database=GOSALES;username=gosales;password=*******" -m 1 --hive-table test.tmp_sales_target --table SALES_TARGET --hive-import -- --schema gosales 2>&1| tee -a log

snippet of error which occurs with detailed error log attached.

17/12/12 08:38:38 INFO mapreduce.ImportJobBase: Publishing Hive/Hcat import job data to Listeners Exception in thread "main" java.lang.StackOverflowError at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72) at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at org.apache.atlas.sqoop.hook.SqoopHook.initialize(SqoopHook.java:75) at org.apache.atlas.sqoop.hook.SqoopHook.<init>(SqoopHook.java:40) at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at org.apache.atlas.sqoop.hook.SqoopHook.initialize(SqoopHook.java:75) at org.apache.atlas.sqoop.hook.SqoopHook.<init>(SqoopHook.java:40) at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown Source)sqooperror.txt

2 REPLIES 2

Re: Getting an error in sqoop when importing data from MSSQL into Hive Table

Expert Contributor
@Zarier Behardien

can you please run "show create table test.tmp_sales_target" and show the result?

Re: Getting an error in sqoop when importing data from MSSQL into Hive Table

Super Collaborator

hi @Zarier Behardien,

Looks the error is originated from Atlas Hooks for the sqoop, could you please disable the atlas Hook check?

if that resolved, we need to update the relevant configuration in sqoop-site.xml with and should ensure the relevent library is used to (relevent jar for sqoop campatability)

<property>  
	<name>sqoop.job.data.publish.class</name>    
	<value>org.apache.atlas.sqoop.hook.SqoopHook</value>
</property>

more on the configuring atlas for sqoop can be found at http://atlas.apache.org/Bridge-Sqoop.html

Hope this helps !!

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