Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: support trino PostgreSQL connector #10021

Closed
wenym1 opened this issue May 26, 2023 · 2 comments
Closed

Tracking: support trino PostgreSQL connector #10021

wenym1 opened this issue May 26, 2023 · 2 comments

Comments

@wenym1
Copy link
Contributor

wenym1 commented May 26, 2023

The trino PostgreSQL uses PostgreSQL JDBC connector to access PostgreSQL.

However, when we are currently testing query RisingWave via trino PostgreSQL connector, we gets error when we do select from risingwave table.

The following are some blocking bugs and unsupported features

@wenym1
Copy link
Contributor Author

wenym1 commented May 29, 2023

Now we can support running a simple select * from table SQL statement via the trino PostgreSQL connector.

A demo with docker-compose

In the demo workspace, we have the following files:

  • docker-compose.yml
version: "3.5"
services:
  risingwave:
    image: risingwavelabs/risingwave:latest
    container_name: risingwave
    ports:
      - "4566:4566"
      - "5691:5691"
    command: ["playground"]
  trino:
    image: trinodb/trino:418
    container_name: trino
    volumes:
      - ./etc/risingwave.properties:/etc/trino/catalog/risingwave.properties
    ports:
      - "48080:8080"
  trino-client:
    image: trinodb/trino:418
    profiles: ["client"]
    entrypoint: ["trino", "--server", "trino:8080", "--catalog", "risingwave", "--schema", "public"]
networks:
  default:
    name: risingwave-bagel
  • etc/risingwave.properties
connector.name=postgresql
connection-url=jdbc:postgresql://risingwave:4566/dev
connection-user=root
connection-password=secret
case-insensitive-name-matching=true
  1. Run docker compose up -d to start the demo cluster.
  2. Create a demo table and insert test data via psql client
psql -h localhost -p 4566 -d dev -U root

# within the psql clent
dev=> create table test_table(id bigint);
CREATE_TABLE
dev=> insert into test_table values(1);
INSERT 0 1
dev=> flush;
FLUSH
  1. Query from trino client
docker compose run -it trino-client

# within the trino client
trino:public> show tables;
   Table    
------------
 test_table 
(1 row)

trino:public> select * from test_table;
 id 
----
  1 
(1 row)

@wenym1 wenym1 closed this as completed May 29, 2023
@wenym1
Copy link
Contributor Author

wenym1 commented Jun 8, 2023

A docker compose demo for both presto and trino is in #10201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant