我有一个通过oozie协调器运行的sqoop作业。在一次重大升级后,我们不能再使用hive cli,并被告知使用直线。我不知道该怎么做?下面是当前的流程:
我有一个配置单元文件: hive_ddl.hql
use schema_name;
SET hive.exec.dynamic.partition=true;
SET hive.exec.dynamic.partition.mode=nonstrict;
SET hive.exec.max.dynamic.partitions=100000;
SET hive.exec.max.dynamic.partitions.pernode=100000;
SET mapreduce.map.memory.mb=16384;
SET mapreduce.map.java.opts=-Xmx16G;
SET hive.exec.compress.output=true;
SET mapreduce.output.compression.codec=org.apache.hadoop.io.compress.SnappyCodec;
drop table if exists 'table_name_stg' purge;
create external table if not exists 'table_name_stg'
(
col1 string,
col2 string,
...
)
row format delimited
fields terminated by '\001'
stored as textfile
location 'my/location/table_name_stg';
drop table if exists 'table_name' purge;
create table if not exists 'table_name'
stored as parquet
tblproperties('parquet.compress'='snappy') as
select * from schema.tablename_stg
drop table if exists 'table_name_stg' purge;这是非常简单的,制作一个阶段表,然后用它来制作最终的表的东西…
然后在.sh文件中调用它,如下所示:
hive cli -f $HOME/my/path/hive_ddl.hql我对其中的大部分都是新手,不确定直线是什么,也找不到任何例子来说明如何使用它来完成我的hivecli所做的事情。我希望它像以不同方式调用hive_ddl.hql文件一样简单,而不是重写所有内容。
任何帮助都是非常感谢的。
发布于 2021-04-28 15:54:50
Beeline是配置单元中支持的命令行shell。在您的示例中,您可以在相同的.sh文件中使用beeline命令替换hive cli。粗略地看起来像下面给出的。
beeline -u hiveJDBCUrl和-f test.hql
您可以转到以下链接,了解有关beeline命令选项的更多信息
https://stackoverflow.com/questions/67131764
复制相似问题