从oracle导入hive

  1. sqoop import --connect jdbc:oracle:thin:@10.39.1.43:1521/rcrm --username bi_query --password ####################### --query " \
  2. select \
  3. item_id,\
  4. edit_id,\
  5. tenant_id,\
  6. create_date,\
  7. model_id,\
  8. parent_id,\
  9. create_id,\
  10. create_code,\
  11. edit_code,\
  12. edit_date,\
  13. item_order,\
  14. top_point,\
  15. middle_point,\
  16. item_name,\
  17. lower_point,\
  18. grade_explain,\
  19. must_grade,\
  20. to_char(SysDate,'YYYY-MM-DD HH24:mi:ss') as etl_in_dt from szdxcrm.CRM_QUALITY_ITEM where \$CONDITIONS " \
  21. --hcatalog-database S4 --hcatalog-table CRM_QUALITY_ITEM \
  22. --hcatalog-storage-stanza 'stored as ORC' --hive-delims-replacement " " -m 1
注意在shell中执行时,$CONDITIONS->\$CONDITIONS,加入转义\





posted on 2017-08-30 23:20  月饼馅饺子  阅读(687)  评论(0编辑  收藏  举报

导航