Reply
Contributor
Posts: 48
Registered: ‎05-30-2015

Sqoop csv to hive

Dear all,

 

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

 

 

Explorer
Posts: 13
Registered: ‎01-08-2016

Re: Sqoop csv to hive

Hi,

you can check with

sqoop import -help

 

you will find hive-import required parameters.

 

Explorer
Posts: 13
Registered: ‎02-08-2019

Re: Sqoop csv to hive

[ Edited ]

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. 

Posts: 1,892
Kudos: 431
Solutions: 302
Registered: ‎07-31-2013

Re: Sqoop csv to hive

@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.
Explorer
Posts: 13
Registered: ‎02-08-2019

Re: Sqoop csv to hive

[ Edited ]

@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
Posts: 1,892
Kudos: 431
Solutions: 302
Registered: ‎07-31-2013

Re: Sqoop csv to hive

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