Created 05-15-2017 04:43 PM
Hey everyone,
I'm new in Sqoop I'm trying to import from MySQL to a text file using a query , my sqoop command is:
sqoop import --connect jdbc:mysql://master/poc --username root --query 'SELECT * FROM table WHERE $CONDITIONS' --split-by field --target-dir /user/hdfs/mysql --as-textfile -m 1;
The problem is that , when y job finish i run hdfs dfs -ls /user/hdfs/mysql and i see just the file success and the part* but any txt so, I dont know what i'm missing. can some one give me a hand to complete my statement.
thanks so much
AU
Created 05-15-2017 06:06 PM
Actually guys i have realized in Sqoop documentation that this output file is the default so yeah this is the txt form. thanks so much. I'm going to close this thread. official info here https://sqoop.apache.org/docs/1.4.1-incubating/SqoopUserGuide.html
Created 05-15-2017 05:01 PM
Are you able to see any other files which starts with part_m_* in that folder? Those are the text files which you have imported from MySQL
Created 05-15-2017 05:35 PM
Hi buddy yes actually i got a file part-m-00000, then when i perform a -cat i get the results from my query but so that means that i will never get a .txt so is just convert this part to txt extention? thanks
Created 05-15-2017 06:06 PM
Actually guys i have realized in Sqoop documentation that this output file is the default so yeah this is the txt form. thanks so much. I'm going to close this thread. official info here https://sqoop.apache.org/docs/1.4.1-incubating/SqoopUserGuide.html
Created 10-26-2018 05:41 PM
Hi Andres,
Is your -cat result plain text? I'm getting un-readble characters. Hope you can share some info to correct my import command.
Thanks,
Andrew
Created 11-06-2018 11:06 PM
Can you cat the output file?