WrenAI icon indicating copy to clipboard operation
WrenAI copied to clipboard

Feature: Support Data Source - Trino

Open andreashimin opened this issue 1 year ago • 2 comments

Description This feature allows users to connect Trino as a data source in connection setup. In setup connection UI, it needs to provide these inputs below:

  • Display name
  • Host
  • Port
  • Catalog
  • Schema
  • Username
  • Password

Refer to: https://github.com/Canner/wren-engine/pull/662

Additional context

  • Trino's Logo (Please download this & put in ./public/images/dataSource/**) trino

  • UI Reference image

andreashimin avatar Jul 08 '24 10:07 andreashimin

Things to do in the Wren-UI Backend will be

Allow create Trino data source from the client-side

  • modify graphql schema
  • extend the datasource.ts to store connection info properly

Integrate with the Ibis server

  • extend the ibisAdaptor.ts to connect to ibis server

ClickHouse data source PR: https://github.com/Canner/WrenAI/pull/481

Things to do in the Wren-Engine will be

Implement (POST) /trino/metadata/tables API

This API should fetch all the tables in the schema specified by the user

Implement (POST) /trino/metadata/constraints API

This API should fetch all the constraints in the schema specified by the user Currently, we use constraints as our recommended relation between models (Note): Since the relation type (one-to-many, many-to-one, ...) can not be detected without fetching the user's data, we hard-code the relation type to one-to-many and let the user change it

ClickHouse data source PR: https://github.com/Canner/wren-engine/pull/648

onlyjackfrost avatar Jul 08 '24 10:07 onlyjackfrost

@andreashimin Can you assign it to me?

himanshu634 avatar Jul 08 '24 11:07 himanshu634

Completed in #535

andreashimin avatar Oct 01 '24 08:10 andreashimin