presto icon indicating copy to clipboard operation
presto copied to clipboard

Support for new JDBC connector Snowflake

Open dmariamgeorge opened this issue 1 year ago • 5 comments

Description

Snowflake database is a cloud-hosted relational database that is used to build data warehouses and combines the functions of traditional databases with new capabilities. This PR implements support for the Snowflake connector in Presto by introducing a new module presto-snowflake.

Motivation and Context

Adding support to the Snowflake connector allows querying and creating tables in an external Snowflake database through Presto. This can be used to join data between different systems like Snowflake and Hive, or between two different Snowflake accounts.

Impact

Introduces a new module presto-snowflake. Allows users to connect to external Snowflake database and query through Presto. Following statements that are checked are supported by the Snowflake connector in Presto:

Screenshot 2024-02-02 at 8 05 42 PM Screenshot 2024-02-02 at 8 03 38 PM

Addresses the issue https://github.com/prestodb/presto/issues/21843.

Test Plan

Configured the Snowflake connector, by creating a catalog properties file in etc/catalog named snowflake.properties, to mount the Snowflake connector as the snowflake catalog. Tested the following SQL statements: queries.txt

Contributor checklist

  • [x] Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • [x] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • [x] Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • [x] If release notes are required, they follow the release notes guidelines.
  • [x] Adequate tests were added if applicable.
  • [x] CI passed.

Release Notes

== RELEASE NOTES ==

General Changes

* Add new Presto connector for Snowflake.

dmariamgeorge avatar Feb 02 '24 14:02 dmariamgeorge

As this draft develops, please add documentation by adding a new file about this connector to https://github.com/prestodb/presto/tree/master/presto-docs/src/main/sphinx/connector.

steveburnett avatar Feb 02 '24 14:02 steveburnett

Codenotify: Notifying subscribers in CODENOTIFY files for diff d4bdf97afefc4981f029dd9989ab97cfd84301c4...15474655da049cb4fd850695c88e138eb7ed50bb.

Notify File(s)
@steveburnett presto-docs/src/main/sphinx/connector.rst
presto-docs/src/main/sphinx/connector/snowflake.rst

github-actions[bot] avatar Feb 16 '24 09:02 github-actions[bot]

To add the new documentation page to the Connectors index page in the documentation, in addition to creating the new .rst page in the /connector directory, you must also edit the connectors index page

https://github.com/prestodb/presto/blob/master/presto-docs/src/main/sphinx/connector.rst

steveburnett avatar Feb 19 '24 21:02 steveburnett

This is an important connect for Presto as this will give us ability handle snowflake usecases

skairali avatar Feb 23 '24 06:02 skairali

@dmariamgeorge We need following before it to get merged

  1. Compre hensive UT
  2. Integration tests ( if possible with mocks)

skairali avatar Feb 23 '24 15:02 skairali