Support Questions

Find answers, ask questions, and share your expertise

sqoop export command to export data from hdfs to sqlserver

Expert Contributor


i have HDInsight servie on azure. i have stored the hive query output in csv file on hdfs. i want to export this csv file to the sql server table.

i used the following command:

sqoop export -m 1 --connect jdbc:sqlserver:// --username aaa --password aaaa --table dbo.test --direct --export-dir /1test/data/ --driver

but i am getting following error:

ERROR tool.ExportTool: Encountered IOException running export job: No columns to generate for ClassWriter




What is dbo? Is that database or just fully table name?

Expert Contributor

dbo is schema and test is table


I think --table value should be only tableName like 'test'.

Dabatase is already defined in --connect jdbc........./Hadoopdb

So you can execute sqoop export, then connection like this 'Hadoopdb.test' or between Hadoopdb and dbo are different, then change connect database name '--connect jdbc........./dbo'


Additionally, where is the --columns parameter? You just want to insert all data in test table?

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.