[英]ACID transactions in HIVE table from pig script
Is it possible to perform ACID transactions in a Hive table from a Pig script? 是否可以通过Pig脚本在Hive表中执行ACID事务?
As per the below link we can execute DDL statements on a hive table from a pig script: https://issues.apache.org/jira/browse/PIG-2482 根据下面的链接,我们可以从猪脚本中的配置单元表上执行DDL语句: https : //issues.apache.org/jira/browse/PIG-2482
As of now only DDL command are allowed i have tested this in pig 0.16
version of HDP 2.5.3
到目前为止,仅允许使用DDL命令,我已经在HDP 2.5.3
的HDP 2.5.3
pig 0.16
版本中对此进行了测试
you can create tables using hcat from PIG Grunt / Script: 您可以使用PIG Grunt /脚本中的hcat创建表:
override the property on the fly while executing pig script 执行Pig脚本时即时覆盖属性
pig -Dhcat.bin=/usr/bin/hcat test.pig
or In your pig script or Grunt shell put this in the beginning 或在您的Pig脚本或Grunt shell中将此内容放在开头
set hcat.bin /usr/bin/hcat;
inside grunt shell or script give command like: 内部grunt shell或脚本中给出以下命令:
sql create table database_name.table_name (col1 int, col2 string);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.