Guest User

Untitled

a guest
Jun 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. create table tmp_base
  2. (
  3. userid string
  4. ,name string
  5. ,sex string
  6. ,age int
  7. ,create_date TIMESTAMP
  8. )row format delimited
  9. fields terminated by 't'
  10. stored as textfile
  11. ;
  12.  
  13. create table tmp_base
  14. (
  15. userid varchar
  16. ,name varchar
  17. ,sex varchar
  18. ,age int8
  19. ,create_date TIMESTAMP
  20. )
  21.  
  22. sqoop export
  23. --connect
  24. jdbc:postgresql://192.168.20.40:5432/bankwarehouse?currentSchema=warehouse
  25. --username
  26. gpadmin
  27. --password
  28. changeme
  29. --table
  30. tb_user_base_property
  31. --update-key
  32. userid
  33. --columns
  34. userid,name,sex,age,create_date
  35. --export-dir
  36. /$HIVE_WAREHOUSE/db_test.db/tmp_base
  37. --input-fields-terminated-by
  38. "t"
  39. --input-null-string
  40. "\\N"
  41. --input-null-non-string
  42. "\\N"
Add Comment
Please, Sign In to add comment