presto连接greenplum(亲测好用)

Presto配置
依据官网介绍(https://prestodb.io/docs/current/installation/deployment.html)按步骤配置并启动presto。

下载presto-server并解压重命名为presto,进入presto并新建etc、data文件夹;
依据官网介绍,在etc文件夹下增加并配置presto各配置文件。


    3. 增加postgresql的配置文件,配置文件路径为presto/etc/catalog/postgresql.properties,配置内容为

postgresql.properties

connector.name=postgresql

connection-url=jdbc:postgresql://192.168.1.40:5432/gisdb

connection-user=postgres

connection-password=123456

其中gisdb为IP为192.168.1.40的服务器已安装的postgresql数据库上建的库

启动presto
在presto文件夹下,执行如下命令启动presto

./bin/launcher start

./bin/launcher run

配置cli
Presto-cli下载路径为

https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.214/presto-cli-0.214-executable.jar

新建prestocli文件夹,将presto-cli-0.214-executable.jar移到该文件夹下,并将presto-cli-0.214-executable.jar重命名为presto。
执行如下命令连接presto server的postgresql数据库
./presto --server localhost:8080 --catalog postgresql --schema gisdb

其中gisdb为本机的数据库

参考执行查询命令

SHOW SCHEMAS FROM postgresql;

SHOW TABLES FROM postgresql.public;

其中postgresql和postgresql.public是本次postgresql建立的数据库

参考:
Deploying Presto

https://prestodb.io/docs/current/installation/deployment.html

PostgreSQL Connector

https://prestodb.io/docs/current/connector/postgresql.html
 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值