linux下db2、oracle、hive过程调用数据的导入导出

db2:

db2 connect to database user username using pwd

db2 "CALL schema.procedure('入参',?,?)" > albert.log;

db2 load client from /table.del of del modified by anyorder CODEPAGE=1208 coldel0x01  insert into tablename nonrecoverable CPU_PARALLELISM 1 DISK_PARALLELISM 1 lock with force;

db2 "export to /table.del OF del MODIFIED BY COLDEL0X01 CODEPAGE =1208 NOCHARDEL DECPLUSBLANK STRIPLZEROS select trim(char(TIMEST)),trim(char(LD_DAY_USER)) from tablename with ur"

####db2编码格式多用1208、1386,0X01为分隔符,/table.del入库出库的文件名称路径位置这里是根目录。

db2 commits
db2 terminate

 

oracle:

sqlplus username/userpwd@tnsdatabase<<!
execute schema.procedure('入参',?,?);
exit;
!

oracle导入参考“将hive中的某张表的数据导入oracle的某张表中”https://blog.csdn.net/Albert0510/article/details/81206329

oracle导出参考https://www.cnblogs.com/huacw/p/3888807.html

 

Hive:

hive导入:先将导入文件上传到hdfs文件系统,然后通过load入库

hdfs dfs -put UPARAM.TD_LLB_PRODUCT.del /user/appuser_asjf/data

  load data inpath '/user/appuser_asjf/data/UPARAM.TD_LLB_PRODUCT.del' into table UPARAM.TD_LLB_PRODUCT PARTITION(stat_cycle='20190228');
hive导出:https://blog.csdn.net/Albert0510/article/details/81206329

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值