热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

本地执行sqoop和oozie上执行sqoop命令需要注意

-------------------------------------------本地sqoop命令,需要修改为\N、并且添加sqoop前缀--------------------------

-------------------------------------------本地sqoop命令,需要修改为'\N'、并且添加sqoop前缀-------------------------------------------
#采购订单
sqoop export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table A_JQZ_T_GAS_GET_ORDER_NUM_INFO_S  --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/a_jqz_t_gas_get_order_num_info_s  --input-null-string '\N' --input-null-non-string'\N' --fields-terminated-by ''\t'' --update-mode allowinsert --update-key order_num,times


#在途库存
sqoop export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table A_JQZ_T_GAS_TOTAL_STORAGE_INFO_S  --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/a_jqz_t_gas_total_storage_info_s  --input-null-string '\N' --input-null-non-string'\N' --fields-terminated-by ''\t'' --update-mode allowinsert --update-key  station_no,gather_time


#地区信息表
sqoop export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table A_JQZ_T_GAS_AREA_DATA_INFO_M      --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/a_jqz_t_gas_area_data_info_m  --input-null-string '\N' --input-null-non-string'\N' --fields-terminated-by ''\t'' --update-mode allowinsert --update-key  order_id,order_num


#当前销售额和销售单数
sqoop export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table A_YKT_T_GAS_ORDER_INFO_M          --export-dir  /user/hive/warehouse/origin_ennenergy_onecard_lng.db/a_ykt_t_gas_order_info_m     --input-fields-terminated-by ''\t'' --update-mode allowinsert --update-key FStationNo,FTradeDateTime


#平均消耗
sqoop export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table A_YKT_T_GAS_AVG_USED_INFO_S       --export-dir  /user/hive/warehouse/origin_ennenergy_onecard_lng.db/a_ykt_t_gas_avg_used_info_s  --input-fields-terminated-by '\t' --input-null-string '\N' --input-null-non-string'\N' --fields-terminated-by ''\t'' --update-mode allowinsert --update-key FStationNo,calculation_time


#【新增】导出custom对应站点关系
sqoop export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table C_NY_C_CUST_GAS_STATION_M         --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/c_ny_c_cust_gas_station_m    --input-null-string '\N' --input-null-non-string'\N' --fields-terminated-by ''\t'' --update-mode allowinsert --update-key  CUST_STATION_ID,CUSTOMER_ID




-----------------------------------------------oozie上则需要全部使用双引号--------------------------------------------
#采购订单
export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password 123456 --table A_JQZ_T_GAS_GET_ORDER_NUM_INFO_S  --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/a_jqz_t_gas_get_order_num_info_s  --input-null-string "\\N" --input-null-non-string "\\N" --fields-terminated-by "\t" --update-mode allowinsert --update-key order_num,times


#在途库存
export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456  --table A_JQZ_T_GAS_TOTAL_STORAGE_INFO_S  --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/a_jqz_t_gas_total_storage_info_s  --input-null-string "\\N" --input-null-non-string "\\N" --fields-terminated-by "\t" --update-mode allowinsert --update-key  station_no,gather_time


#地区信息表
export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table A_JQZ_T_GAS_AREA_DATA_INFO_M      --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/a_jqz_t_gas_area_data_info_m  --input-null-string "\\N" --input-null-non-string "\\N" --fields-terminated-by "\t" --update-mode allowinsert --update-key  order_id,order_num


#当前销售额和销售单数
export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table A_YKT_T_GAS_ORDER_INFO_M          --export-dir  /user/hive/warehouse/origin_ennenergy_onecard_lng.db/a_ykt_t_gas_order_info_m     --input-fields-terminated-by "\t" --update-mode allowinsert --update-key FStationNo,FTradeDateTime


#平均消耗
export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456  --table A_YKT_T_GAS_AVG_USED_INFO_S       --export-dir  /user/hive/warehouse/origin_ennenergy_onecard_lng.db/a_ykt_t_gas_avg_used_info_s  --input-fields-terminated-by "\t" --input-null-string "\\N" --input-null-non-string "\\N" --fields-terminated-by "\t" --update-mode allowinsert --update-key FStationNo,calculation_time


#【新增】导出custom对应站点关系

export --connect jdbc:mysql://192.168.1.109/testtests?characterEncoding=utf8 --username root --password123456 --table C_NY_C_CUST_GAS_STATION_M         --export-dir  /user/hive/warehouse/origin_ennenergy_energytrade.db/c_ny_c_cust_gas_station_m    --input-null-string "\\N" --input-null-non-string "\\N" --fields-terminated-by "\t" --update-mode allowinsert --update-key  CUST_STATION_ID,CUSTOMER_ID











推荐阅读
  • 阿,里,云,物,联网,net,core,客户端,czgl,aliiotclient, ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • 个人学习使用:谨慎参考1Client类importcom.thoughtworks.gauge.Step;importcom.thoughtworks.gauge.T ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • 如何自行分析定位SAP BSP错误
    The“BSPtag”Imentionedintheblogtitlemeansforexamplethetagchtmlb:configCelleratorbelowwhichi ... [详细]
  • 电话号码的字母组合解题思路和代码示例
    本文介绍了力扣题目《电话号码的字母组合》的解题思路和代码示例。通过使用哈希表和递归求解的方法,可以将给定的电话号码转换为对应的字母组合。详细的解题思路和代码示例可以帮助读者更好地理解和实现该题目。 ... [详细]
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • SpringBoot uri统一权限管理的实现方法及步骤详解
    本文详细介绍了SpringBoot中实现uri统一权限管理的方法,包括表结构定义、自动统计URI并自动删除脏数据、程序启动加载等步骤。通过该方法可以提高系统的安全性,实现对系统任意接口的权限拦截验证。 ... [详细]
  • IhaveconfiguredanactionforaremotenotificationwhenitarrivestomyiOsapp.Iwanttwodiff ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • [大整数乘法] java代码实现
    本文介绍了使用java代码实现大整数乘法的过程,同时也涉及到大整数加法和大整数减法的计算方法。通过分治算法来提高计算效率,并对算法的时间复杂度进行了研究。详细代码实现请参考文章链接。 ... [详细]
  • 本文介绍了南邮ctf-web的writeup,包括签到题和md5 collision。在CTF比赛和渗透测试中,可以通过查看源代码、代码注释、页面隐藏元素、超链接和HTTP响应头部来寻找flag或提示信息。利用PHP弱类型,可以发现md5('QNKCDZO')='0e830400451993494058024219903391'和md5('240610708')='0e462097431906509019562988736854'。 ... [详细]
  • 前景:当UI一个查询条件为多项选择,或录入多个条件的时候,比如查询所有名称里面包含以下动态条件,需要模糊查询里面每一项时比如是这样一个数组条件:newstring[]{兴业银行, ... [详细]
  • 本文详细介绍了如何使用MySQL来显示SQL语句的执行时间,并通过MySQL Query Profiler获取CPU和内存使用量以及系统锁和表锁的时间。同时介绍了效能分析的三种方法:瓶颈分析、工作负载分析和基于比率的分析。 ... [详细]
  • PDO MySQL
    PDOMySQL如果文章有成千上万篇,该怎样保存?数据保存有多种方式,比如单机文件、单机数据库(SQLite)、网络数据库(MySQL、MariaDB)等等。根据项目来选择,做We ... [详细]
author-avatar
mobiledu2502885053
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有