Skip to content

Implement Snowflake data source #524

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

Merged
merged 16 commits into from
Apr 18, 2024
Merged

Conversation

grieve54706
Copy link
Contributor

@grieve54706 grieve54706 commented Apr 12, 2024

Description

We implement the Snowflake data source. We also use sqlglot to help us handle some statement cases.

We don't use Snowflake recommend lib snowpark, because it has too many features we don't need. We use snowflake-jdbc instead it.

The snowflake-jdbc includes Apache-arrow with a compatibility problem(See https://arrow.apache.org/docs/java/install.html#java-compatibility). Must add arg --add-opens=java.base/java.nio=ALL-UNNAMED.

We found the Snowflake SQL if you make the identifiers not delimited, Snowflake will upper-case the identifier name.

The same as before, we don't pay for Snowflake to own an account to test. So we exclude the test cases about Snowflake.

TODO

  • Test case about Type

@grieve54706 grieve54706 force-pushed the feature/snowflake-data-source branch 5 times, most recently from 6583ef4 to 316540c Compare April 15, 2024 09:16
@grieve54706 grieve54706 force-pushed the feature/snowflake-data-source branch from 316540c to 851bc81 Compare April 18, 2024 09:34
@goldmedal goldmedal marked this pull request as ready for review April 18, 2024 10:19
{
try {
BigQueryMetadata metadata = getInstance(Key.get(BigQueryMetadata.class));
BigQueryClient bigQueryClient = metadata.getBigQueryClient();
Copy link
Contributor

@goldmedal goldmedal Apr 18, 2024

Choose a reason for hiding this comment

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

There are a bug. We will create a pg_catalog in BigQuery. We should remove it after test.

bigQueryClient.dropDatasetWithAllContent(DatasetId.of(getDefaultCatalog(), metadata.getPgCatalogName()));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was lost due to #528. I will add a commit to fix it.

@grieve54706 grieve54706 force-pushed the feature/snowflake-data-source branch from 725f5a6 to 0633f41 Compare April 18, 2024 10:39
@grieve54706 grieve54706 force-pushed the feature/snowflake-data-source branch from 0633f41 to c352db5 Compare April 18, 2024 10:48
Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

LGTM

@goldmedal goldmedal merged commit d1d25c5 into main Apr 18, 2024
3 checks passed
@goldmedal goldmedal deleted the feature/snowflake-data-source branch April 18, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants