Demo entry 6783958

Datax 增量同步

   

Submitted by anonymous on Feb 25, 2019 at 10:45
Language: SQL. Code size: 991 Bytes.

set -eu
sh datax_run.sh \
  -src hdfs \
  -srcdb dw_jppkgdev \
  -srctblnames theme_product \
  -querys "select  productid,productname,producttype,recommend_reasons, 80 as score ,FROM_UNIXTIME(UNIX_TIMESTAMP()) as  datachange_lasttime,nvl(productpattern,'') as productpattern ,nvl(productcategoryid,-1) as productcategoryid ,nvl(rank_score,0) as rank_score, nvl(visitors,0) as visitors, nvl(destcityname,'') as destcityname,nvl(destcityid,-1) destcityid,nvl(departureproduct,-1) as departureproduct from dw_jppkgdev.theme_product  where d='2019-02-21' and productname is not null and producttype is not null and productid=1022043557 " \
  -tar mysqldal \
  -tarallinone touraitagshard01db_ETLZS_W_SH \
  -tardb touraitagshard01db \
  -tartblnames theme_product \
  -tarupdatecol "productname,producttype,recommend_reasons,score,datachange_lasttime,productpattern,productcategoryid,rank_score,visitors,destcityname,destcityid,departureproduct" \
  -mysqlmethodtype jdbc_duplicate

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).