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

Add Snowflake JDBC Connector #10387

Closed

Conversation

yuuteng
Copy link
Contributor

@yuuteng yuuteng commented Dec 22, 2021

Hello, this is my first time to do a commit to an open source repository. I'm a bit nervous and excited. 😄

In fact, I would like to continue the work of #2551 to add the support of snowflake in trino. And I updated some import and fixed some code style problems.

@cla-bot
Copy link

cla-bot bot commented Dec 22, 2021

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: YU Teng.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@lhofhansl
Copy link
Member

Does Snowflake allow partitioning, or expose any partition information (like the Phoenix connector, which is also JDBC based).

Without partitioning you'll get a single split per query, which might work for small, highly selective, or aggregate queries (assuming pushdown is implemented, see below), but not if you are actually pulling a lot of data from Snowflake for example when you want to retrieve a large dataset or Trino is unable to push a predicate or aggregation into the connector.

Related... Trino base jdbc will automatically do most predicate pushdown, but you'll have to add aggregate pushdown (you can see in the Postgres connector how to do that).

@ebyhr
Copy link
Member

ebyhr commented Dec 23, 2021

Thanks for your contribution. As we mentioned in #2551, we need to add some tests.
You can refer to MariaDB work #10046 when adding tests.

@cla-bot cla-bot bot added the cla-signed label Dec 24, 2021
@findepi
Copy link
Member

findepi commented Jan 4, 2022

What is the relation between this PR and @pgagnon's #2551?

@yuuteng
Copy link
Contributor Author

yuuteng commented Jan 4, 2022

What is the relation between this PR and @pgagnon's #2551?

In fact, just as the first comment mentioned that I started to add the snowflake support to the trino repository with #2551 , but there are some function code which is out of date, so I restarted and updated it to the latest version with my colleague.

Currently, I'm still working on the test and facing some problems. Because Snowflake can't be dokerized, I can't learn the standard way with the library testcontainers as some other examples.

In fact, with my latest commit, it can pass my use case of snowflake on trino by deploying a custom plugin. So it lacks of tests to be merged in trino. 😄 I would be grateful if you could help me with the test.

@yuuteng yuuteng force-pushed the feature/2551-add-snowflake-connector branch 2 times, most recently from acb1500 to b4c11f4 Compare January 9, 2022 21:42
@yuuteng
Copy link
Contributor Author

yuuteng commented Jan 9, 2022

Hello team, I added the tests for the snowflake. It is ready for next review.😄
Because of the trail account of snowflake, currently, it can pass tests manually.

@yuuteng yuuteng force-pushed the feature/2551-add-snowflake-connector branch 2 times, most recently from 58e7b39 to 02a88af Compare January 10, 2022 17:53
@pgagnon
Copy link
Member

pgagnon commented Jan 10, 2022

@yuuteng Apologies for not chiming in here sooner; I started working on this connector a long time ago and my work priorities changed in the meantime so I never got the time to take it to a mergeable state. You have my blessing (not that you need it!) to take over this feature; I think it will be a great addition to the project. Thank you! 🙂

@yuuteng
Copy link
Contributor Author

yuuteng commented Jan 11, 2022

@pgagnon Thank you for your reply. Don't worry. I will get it right this time.😄 Thanks for your work, it really helps a lot.

@yuuteng yuuteng force-pushed the feature/2551-add-snowflake-connector branch from e35548d to 050bb8d Compare January 12, 2022 19:53
@yuuteng
Copy link
Contributor Author

yuuteng commented Jan 12, 2022

Hello, I just pushed my new commit for resolving all the point which you mentioned in the last review:微笑: I was struggled to make all the tests pass, but there were still some tests failed which I don’t well understand, so I left some TODO for them. And now all tests are passed or skipped. Ready for the next review 😄

Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check CI failure.

@yuuteng yuuteng force-pushed the feature/2551-add-snowflake-connector branch from 6ed326b to 3384b6c Compare January 21, 2022 10:38
@github-actions github-actions bot added the docs label Jan 21, 2022
@yuuteng yuuteng force-pushed the feature/2551-add-snowflake-connector branch 5 times, most recently from 9e8b282 to 4e0b811 Compare January 26, 2022 10:19
@yuuteng
Copy link
Contributor Author

yuuteng commented Jan 26, 2022

Hello, I just organized my commits. It is ready for the next review. 😄

Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some previous comments aren't yet addressed. Let me know once it's finished.

@yuuteng yuuteng force-pushed the feature/2551-add-snowflake-connector branch 4 times, most recently from 6cbdd0e to 5347936 Compare January 27, 2022 17:57
@mosabua
Copy link
Member

mosabua commented Apr 25, 2023

Given that a concerted effort is now in place .. should we close this PR?

@bitsondatadev
Copy link
Member

We were kind of waiting on @dprophet's new PR but no real reason to keep this open.

@yuuteng
Copy link
Contributor Author

yuuteng commented Apr 25, 2023

We were kind of waiting on @dprophet's new PR but no real reason to keep this open.

Ok, because this pull request has been merged with the branch of bloomberg.
Ref: https://github.com/bloomberg/trino/tree/snowflake

So I will close this pull request and wait the new pull request from the branch above.

@yuuteng yuuteng closed this Apr 25, 2023
@CapChrisCap
Copy link

Do we know when this feature MR will be created approx. by bloomberg or where is this currently blocked? My project would need to connect our Snowflake and this is blocking me right now. Or did you find another intermediate solution to connect to Snowflake?
Thank you! :)

@bitsondatadev
Copy link
Member

Do we know when this feature MR will be created approx. by bloomberg or where is this currently blocked? My project would need to connect our Snowflake and this is blocking me right now. Or did you find another intermediate solution to connect to Snowflake?

Thank you! :)

@dprophet are those tests almost complete? IIRC that's the only main blocker but it was a big one (not just fixing a some test code but getting Trino/Snowflake to work together well with some type conversion issues.

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

Successfully merging this pull request may close these issues.