named_struct

本文介绍了如何在CSDN博客中使用`named_struct`类型进行HadoopSQL查询,涉及到了从`adm_intltrn_res_global_domestic_line_hotdata`表中提取数据并以ORCFILE格式导出的过程,重点在于结构化数据的处理和实时更新通知的配置。
摘要由CSDN通过智能技术生成

参考:named_struct类型怎么用-CSDN博客

set -eu
sh datax_run.sh \
  -src hdfs \
  -srcdb ads_trnintldb \
  -srctblnames adm_intltrn_res_global_domestic_line_hotdata \
  -querys "select  to_json(named_struct(
    
    'data_domain',data_domain   
    ,'type',type      
    ,'period'  ,period
    ,'channel' ,channel
    ,'departure_location_code_country_code'  ,departure_location_code_country_code
    ,'departure_location_name' ,departure_location_name
    ,'arrival_location_code_country_code'  ,arrival_location_code_country_code  
    ,'arrival_location_name',arrival_location_name
    ,'id_cnt' ,id_cnt
    ,'rank_no'  ,rank_no
    ,'departure_location_code'  ,departure_location_code
    ,'arrival_location_code'    ,arrival_location_code
    
    
    )) as body from adm_intltrn_res_global_domestic_line_hotdata WHERE d = '${zdt.format("yyyy-MM-dd")}' " \
  -tar qmq \
  -writer_subject "train.triptrain.line.station.order.update.notify" \
  -tarcolorders "body" \
  -qps 100 \
 -exportfileformat ORCFILE

  • 6
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值