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.

Sqoop csv to hive

Sqoop csv to hive

Rising Star

Dear all,

 

How is it possible to sqoop exported csv file from MS SQL server to Hive directly?

 

 

5 REPLIES 5

Re: Sqoop csv to hive

Explorer

Hi,

you can check with

sqoop import -help

 

you will find hive-import required parameters.

 

Re: Sqoop csv to hive

Explorer

You cannot. Sqooping is for moving data from RDBMS to HDFS and vice versa.

Doc 

http://sqoop.apache.org/docs/1.4.0-incubating/SqoopUserGuide.html#id1753935

 

You have to load the file to HDFS and then  create a table to HIVE. 

Re: Sqoop csv to hive

Master Guru
@eMazarakis: Not quite. You can certainly instruct Sqoop to load the
imported data directly into Hive as the previous poster has indicated. From
the same docs link, see this section:
http://sqoop.apache.org/docs/1.4.0-incubating/SqoopUserGuide.html#id1765770

There are some limitations towards usable formats in this feature, but for
text data it should work just fine.

Re: Sqoop csv to hive

Explorer

@Harsh J : I agrre with you.  You can certainly instruct Sqoop to load the
imported data directly into Hive. But If I am right  @yongie  asks how sqoop can read a csv file and then create a hive table. I did not find anything about that in Docs.

Highlighted

Re: Sqoop csv to hive

Master Guru
My bad - I misinterpreted the part that talked of a CSV file already
exported in his original Q.