Oozie执行hive,传入参数
1. 新建一个workflow

2. 拖入一个hive2

3. hive脚本如下

CREATE TABLE IF NOT EXISTS spider_tmp.org_invest_fund_${date} (
`id` int,
`info_id` int,
`company` string,
`company_url` string,
`legal_person` string,
`reg_capital` string,
`establish_date` string,
`investor` string,
`update_time` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '`'
STORED AS TEXTFILE;

注意,此处${date}表示需要执行时传入的参数
4. 添加参数

5. 启动,填入参数即可

6.workflow.xml如下

<workflow-app name="Workflow_hive" xmlns="uri:oozie:workflow:0.5">
<start to=" hive-table_load_data "/>
<kill name="Kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<action name="hive-table_load_data" cred="hive2">
<hive2 xmlns="uri:oozie:hive2-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<jdbc-url>jdbc:hive2://hadoop1:10000/spider_tmp</jdbc-url>
<script>/user/fengz/xxxx.q</script>
<param>date=${date}</param>
</hive2>
<ok to="End"/>
<error to="Kill"/>
</action>
<end name="End"/>
</workflow-app>

HUE中Oozie执行Hive脚本的更多相关文章

  1. HUE中Oozie执行Sqoop

    Oozie执行Sqoop,传入参数(注意,在使用--query时,参数中一定不要带有空格,否则出错)1. 新建一个workflow 2. 拖入一个sqoop 3. sqoop抽取命令如下(建议先在命令 ...

  2. HUE中oozie执行shell

    Oozie执行Shell,传入参数1. 新建一个workflow 2. 拖入一个shell 3. shell脚本如下 #!/bin/sh sqoop import --connect jdbc:mys ...

  3. CDH中,执行HIVE脚本表联查权限问题。。

    文章来自http://www.cnblogs.com/hark0623/p/4174641.html 转发请注明 有时候执行表联查的时候总会出现没有权限写文件的情况. 这个时候使用sudo -H hi ...

  4. CDH hue下定时执行hive脚步

        今天在看oozie时发现能在hue中执行hive 脚本,主要是hue 和 oozie结合使用,下面介绍下怎么使用的,挺恶心的,哈哈(在这里就不哔哔了) 提交oozie定时作业 1.进入hue界 ...

  5. PL/SQL中批量执行SQL脚本(不可把所有的语句都复制到New SQL Windows)

    PL/SQL中批量执行SQL脚本,不可把所有的语句都复制到New SQL Window,因为这样会导致缓冲区过大而进程卡死! 最好的办法是将要执行的SQL脚本存放到指定文件中,如C:\insert.s ...

  6. Delphi 7 在程序中直接执行SQL脚本文件

    Delphi 7 在程序中直接执行SQL脚本文件 在处理MSDE一些操作中.需要执行一些SQL脚本.有的是从SQLServer 2000中生成的SQL为后缀的脚本.在MSDE中没有企业管理器,操作都是 ...

  7. inotify+rsync实现实时同步(附解决crontab中无法执行python脚本的问题)

    1.准备环境 # 系统支持的话,下面的目录就会存在 ls /proc/sys/fs/inotify/ rpm -qa inotify-tools yum -y install inotify-tool ...

  8. Beeline里面执行hive脚本 函数nvl2()与replace()报错

    Beeline里面执行hive脚本函数nvl2()与replace()报错 写脚本的时候是在impala里面执行的,都正常,但是转换为调度的时候是在beeline里面执行的 就会有问题了. 详情如下: ...

  9. 2-10 就业课(2.0)-oozie:4、通过oozie执行shell脚本

    oozie的配置文件job.properties:里面主要定义的是一些key,value对,定义了一些变量,这些变量往workflow.xml里面传递workflow.xml :workflow的配置 ...

随机推荐

  1. CodeForces 666A Reberland Linguistics(DP)

    A. Reberland Linguistics time limit per test 1 second memory limit per test 256 megabytes input stan ...

  2. python之MongoDB学习

    import pymongo as pm # 获取连接 client = pm.MongoClient('localhost', 27017) # 端口号是数值型 # 连接数据库 db = clien ...

  3. powershell Start-Sleep

    秒: Start-Sleep –s 10 ,毫秒) Start-Sleep –m 10000 语法 Start-Sleep [-seconds] <int> [<CommonPara ...

  4. time/datetime/random/string/os/sys/shutil/zipfile/tarfile - 总结

    time 模块: time.time() #时间戳 time.localtime() #当前时间对象元组 time.localtime(123123) #根据时间戳的时间对象 time.mktime( ...

  5. zookeer安装

    解压:tar xf zookeeper-3.4.9.tar.gz进入目录cd /opt/zookeeper-3.4.9/ 编辑配置文件:vim zoo.cfg# The number of milli ...

  6. corethink功能模块探索开发(十四)后台编辑按钮

    效果图: 1.添加下图55&58行代码 2.实现edit方法 位于Equip/Admin/DeviceRepaireAdmin.class.php中 public function edit( ...

  7. MySQL数据库Date型数据插入问题

    MySQL数据库中,Date型数据插入问题,总是提示如下错误: “java.util.Date cannot be cast to java.sql.Date” 解决办法: 1.首先,获取Date型数 ...

  8. PAT 1035 Password [字符串][简单]

    1035 Password (20 分) To prepare for PAT, the judge sometimes has to generate random passwords for th ...

  9. redis实现队列queue

    参考:<Redis入门指南>第4章进阶 http://book.51cto.com/art/201305/395461.htm 4.4.2 使用Redis实现任务队列 说到队列很自然就能想 ...

  10. Linux主从同步监测和利用sendMail来发邮件

    首先介绍下sendMail About SendEmailSendEmail is a lightweight, command line SMTP email client. If you have ...