Reputation: 89
I have following command for transferring data from my SQL database to my Azure Data Lake:
sqoop-import --connect "jdbc:sqlserver://MYDB.database.windows.net:1433;username=MYUSERNAME@MYDB;password=MYPW;database=MYDb" --table TABLENAME --target-dir adl://TESTTT.azuredatalakestore.net/Sqoop/TABLENAME
The result is fine except the fact that it doesn't include column names, is there a way to include these column names?
Upvotes: 2
Views: 2743
Reputation: 8000
Typically Sqoop import doesn't support column name while importing data into HDFS. If you want to carry the schema with the data then you might consider having Sqoop to import data into Avro file format.
Other work around is that, you can use Sqoop Hive import to import the entire table as Hive table on your Hadoop Environment.
Here is good read reference for Hive import.
Upvotes: 3