【问题标题】:Connect to Hive database tables using postgresql-fdw from postgresql server从 postgresql 服务器使用 postgresql-fdw 连接到 Hive 数据库表
【发布时间】:2020-01-07 16:16:48
【问题描述】:

无法从 postgresql 服务器连接到远程服务器上的 hive 数据库。

尝试使用以下查询但不起作用。连接已建立,但配置单元服务器没有响应。

--create extension postgres_fdw;
DROP USER MAPPING  IF EXISTS  FOR   CURRENT_USER  SERVER data_db;
drop server data_db;
create server data_db
foreign data wrapper postgres_fdw
options (host 'net.com' , port 'hiveport' , SSLMODE 'allow', dbname 'datah');

create user mapping for current_user
server data_db
options(user 'user', password 'password');

drop schema app;
create schema app;

import foreign schema public
from server data_db
into app; 

结果未知,期待来自服务器的身份验证请求(SQL 状态 08001)。

我希望能够使用来自 postgresql 的 fdw 建立与 hive 数据库集群的连接以导入选择性数据。

非常感谢您并致以最诚挚的问候!

【问题讨论】:

    标签: postgresql hive postgres-fdw


    【解决方案1】:

    postgres_fdw 用于连接到其他 PostgreSQL 实例。 Hive 不使用与 PostgreSQL 相同的有线协议,因此肯定不会期望 postgres_fdw 成功连接到它。或许你可以试试https://github.com/youngwookim/hive-fdw-for-postgresqlhttps://sourceforge.net/projects/hadoopfdw/

    【讨论】:

      猜你喜欢
      • 2016-04-26
      • 2021-03-13
      • 2017-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-26
      • 2021-02-14
      • 1970-01-01
      相关资源
      最近更新 更多