Reply
Explorer
Posts: 25
Registered: ‎04-26-2016

Sqoop import working but comma causing the text to float to next column

I am running sqoop import on the CLI unix, it gets the data from source database table and creates exact structure in target and loads data. but one issue causing due to comma, if there is a comma within a column value then it is automatically assuming ghe string after comma is of next column, how to contain all text for a column if there is comma also to take care.

 

Thanks a lot for the helpful info.

the below statement is creating a table on hadoop hive with exact structure and loading data to target.

 

sqoop import --connect jdbc:oracle:thin:@SVRDEVWHSEDB:1521:edw2dev --username hadooppsvc --P --query "SELECT * FROM edw2_stage.wh_cln_procedure WHERE \$CONDITIONS" --target-dir /user/hive/warehouse/research_stage.db/st_wh_cln_procedure --hive-import --hive-database research_stage --hive-table st_wh_cln_procedure --split-by procedure_key

Highlighted
Champion
Posts: 564
Registered: ‎05-16-2016

Re: Sqoop import working but comma causing the text to float to next column

Would you consider using mysql delimiters since you want comma 

--mysql-delimiters ,
Announcements
Unanswered Topics
No posts to display.