Powered By Blogger

Saturday, November 2, 2019

sqoop non numeric fields

_________________________________________________
Dealing with  non numeric fields
_________________________________________________

Its not the ideal way of use
allow_text_splitter=true

sqoop import \
-Dorg.****.allow_text_splitter=true

We can use nummappers as 1 if we dont have primary key.


We can auto rest to one mapper.
If there are no primary key then it defaults to 1 mapper else uses the configured
number of mappers


We can also specify the delimiter.
--fields-terminated-by '|'
--lines-terminated-by ';'


sqoop import --connect jdbc:mysql://quickstart.cloudera:3306/retail_db --username root --password cloudera --table order_items --warehouse-dir /user/training/sqoop_import/retail_db --delete-target-dir --fields-terminated-by '|' --lines-terminated-by ';'

No comments:

Post a Comment