zoukankan      html  css  js  c++  java
  • hiveF 函数解析时间问题

    #!/bin/bash
    source /etc/profile
    updatetime=`date --date='0 days ago' +“%Y-%m-%d %H:%M:%S"`
    echo "updatetime: "${updatetime}
    hiveF /auto_cron/cron-running/bidw/dms/hq_bi/11.sql -updatetime ${updatetime}  //传updatetime参数

    相应SQL文件

    select '${updatetime}' from dms.tracklog_5min where day='20161002' limit 1;

    报错:时分秒没有显示出来

    解决办法:

    使用

    hive -f /home/dp/1.sql -d updatetime="${updatetime}" //原始的传参数

    相应的Sql

    select "${updatetime}" from dms.tracklog_5min where day='20161002' limit 1;

  • 相关阅读:
    CSRF的安全问题
    preg_replace
    反汇编:虚函数表
    12.Proxy
    JS中的this
    11.Set 和 Map数据结构
    10.symbol
    9.对象的扩展
    test
    ES5支持的方法
  • 原文地址:https://www.cnblogs.com/sunt9/p/6670321.html
Copyright © 2011-2022 走看看