摘要: 说明: 读取$HOME/shell_code/control/zw/下面的bst_bas_sqoop2hive_zw.txt和bst_agg_sqoop2hive_zw.txt,分别执行txt文件中的shell脚本,并输出日志到log下对应目录中 #!/bin/bash # corntab执行时需要 阅读全文
posted @ 2019-12-04 17:54 楔子 阅读(2571) 评论(0) 推荐(0)
摘要: ①one.sh #!/bin/bash begin_date=$1end_date=$2 v_dt_year=${begin_date:0:4}v_dt_month=${begin_date:4:2}v_dt_date=${begin_date} while [ ${begin_date} -lt 阅读全文
posted @ 2019-12-04 17:45 楔子 阅读(685) 评论(0) 推荐(0)
摘要: mysql_jdbc.py# -*- coding:UTF-8 -*-import pymysqlclass MYSQL: def __init__(self,host,port,user,pwd,db): self.host = host self.port = port self.user = 阅读全文
posted @ 2019-12-04 11:37 楔子 阅读(724) 评论(0) 推荐(0)
摘要: 说明:使用shell脚本增量调度至hive表。 操作步骤 1、使用sqoop蒋mysql数据调度到hive临时表tmp_bst_bas_dy_orders 2、将临时表中的数据覆盖写如hive对应分区内 临时表数据未压缩,以传统txt方式存取,hive表采用orc压缩,均为外部表,按年月日进行分区。 阅读全文
posted @ 2019-12-04 11:18 楔子 阅读(181) 评论(0) 推荐(0)
摘要: 1)从mysql中导入数据至hdfs指定目录 sqoop import --connect jdbc:mysql://${db_ip}:${db_port}/${db_database}?serverTimezone=Asia/Shanghai --username ${db_user} --pas 阅读全文
posted @ 2019-12-04 11:08 楔子 阅读(217) 评论(0) 推荐(0)