Apache Seatunnel-Source plugin : Hive [Spark]

作者: Apache Seatunnel

从hive中获取数据

Options

name type required default value
[pre_sql] pre_sql-string
[common-options] common-options-string
pre_sql [string]

进行预处理的sql, 如果不需要预处理,可以使用select * from hive_db.hive_table

common options [string]

Source 插件通用参数,详情参照 [Source Plugin]
注意:使用hive source必须做如下配置:


## seatunnel 配置文件中的spark section中:
env {
  ...
  spark.sql.catalogImplementation = "hive"
  ...
}

Example

env {
  ...
  spark.sql.catalogImplementation = "hive"
  ...
}
source {
  hive {
    pre_sql = "select * from mydb.mytb"
    result_table_name = "myTable"
  }
}
...

Notes

必须保证hive的metastore是在服务状态。启动命令 hive --service metastore 服务的默认端口的9083
cluster、client、local模式下必须把hive-site.xml置于提交任务节点的HADOOP_CONF目录下(或者放在SPARK_HOME/conf下面),IDE本地调试将其放在resources目录

文章列表

更多推荐

更多
这里什么都没有

近期文章

更多
文章目录

    推荐作者

    更多