Advertisement
Guest User

Untitled

a guest
Jan 6th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. my question is can't we export the data which has space from hdfs to mysql usong sqoop export command?
  2.  
  3. The data which i used
  4. 1201, adi, sen manager, 30000, it
  5. 1201, pavan, jun manager, 5000, cs
  6. 1203, santhosh, junior, 60000, mech
  7.  
  8. i created table like
  9. create table emp(id BIGINT,name varchar(20),desg varchar(20),salary BIGINT,dept varchar(20));
  10.  
  11. sqoop command -- sqoop export
  12. --connect jdbc:mysql://127.0.0.1/mydb
  13. --username root
  14. --table emp
  15. --m 1
  16. --export-dir /mydir
  17. --input-fields-terminated-by ','
  18. --input-lines-terminated-by 'n'
  19.  
  20. result: numberformatexception input string:'1201'
  21. can't parse the data
  22.  
  23. i discussed in forum, they said trim the space but i wants to know that automatically trim the spaces while perform sqoop export.
  24.  
  25. can somebody give suggestions on this?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement