How to change the delimiter in Sqoop

0 votes
How to change the delimiter in Sqoop?
Dec 18, 2018 in Big Data Hadoop by digger
• 26,740 points
10,582 views

3 answers to this question.

0 votes

You can change delimiter in SQOOP command.

By default, it takes delimiter as a tab but if you want to explicitly define it you need to use this command.

--fields-terminated-by <char>

Example

sqoop import \ 
      --connect jdbc:mysql://127.0.0.1:3306/GRHadoop \ 
      --username root \ 
      --password cloudera \ 
      --table sitecustomer \ 
      --fields-terminated-by '|' \ 
      --lines-terminated-by "\n" \ 
      --target-dir /user/cloudera/GR/Sqoop/sitecustomer_data \ 
      --m 1;
answered Dec 18, 2018 by Omkar
• 69,220 points
+1 vote
--fields-terminated-by <char>
answered Jun 25, 2019 by anonymous
0 votes

Hi,

You can also follow this following query below:

sqoop import-all-tables --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” 
–username retail_dba 
–password itversity 
–hive-import 
–hive-database rgex12 
–as-textfile 
–fields-terminated-by ‘|’
answered Aug 1, 2019 by Dhwani

Related Questions In Big Data Hadoop

0 votes
1 answer

How to change the replication factor of specific directory in Hadoop?

Yes, you can change the replication factor ...READ MORE

answered May 11, 2018 in Big Data Hadoop by Shubham
• 13,490 points
3,670 views
0 votes
1 answer

How to change the checkpointing duration in Hadoop

Answer: The default duration of checkpointing is 3600 ...READ MORE

answered May 11, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,507 views
0 votes
2 answers

How to change the location of a table in hive?

Changing location requires 2 steps: 1.) Change location ...READ MORE

answered Feb 12, 2020 in Big Data Hadoop by Saksham Sehrawet
9,069 views
0 votes
1 answer

How to change the default value and to alter a column in sql?

Hi, You can try this: ALTER TABLE foobar_data CHANGE ...READ MORE

answered Jun 24, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,519 views
0 votes
1 answer

How to change the default replication factor in Hadoop?

Hi@akhtar, You can change the default replication factor from the ...READ MORE

answered Oct 3, 2020 in Big Data Hadoop by MD
• 95,460 points
1,802 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,027 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,534 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,828 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,611 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP