I am trying to import a large HDFS file into a mysql db. The data in the file is delimiter by a ‘^A’. How do I tell mysql to separate each column by ctrl-A? Also, is it possible for me to specify what fields I want to import.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See the documentation here:
http://dev.mysql.com/doc/refman/5.5/en/mysqlimport.html
You are looking for the
--fields-terminated-by=stringoption. There is not option to only select certain fields for import, though you can use--columns=column_listto map columns in your data to fields in the table.