从 dbt 配置文件连接到 Spark EMR thrift 服务器

问题描述 投票:0回答:0

我有一个用例,我正在使用 dbt-core(数据构建工具)和 dbt-spark 适配器连接到 EMR 集群。

集群位于私有子网中,并接受使用我已经使用的 VPN 的连接。我已经确保在端口 10001 上的 EMR 集群上运行了一个 thrift 服务器,这是 dbt 需要接受 spark 连接的端口。我面临的问题是我能够使用 SQL 客户端配置并连接到 jdbc Hive,但我无法使用配置文件使 dbt 与 thrift 服务器本身对话。这是我目前使用的配置文件,

dbt_test:
  target: dev
  outputs:
    dev:
      type: spark
      method: thrift
      schema: default
      host: <EMR Master Node IP>
      port: 10001
      user: hadoop

我不明白我在这里缺少什么,任何帮助将不胜感激。

这是我每次运行

dbt debug
命令时看到的错误,

Connection:
  host: <EMR Master Node IP>
  port: 10001
  cluster: None
  endpoint: None
  schema: default
  organization: 0
  Connection test: [ERROR]

1 check failed:
dbt was unable to connect to the specified database.
The database returned the following error:

  >Runtime Error
  Database Error
    failed to connect

Check your database credentials and try again. For more information, visit:
https://docs.getdbt.com/docs/configure-your-profile
apache-spark amazon-emr dbt
© www.soinside.com 2019 - 2024. All rights reserved.