-
Notifications
You must be signed in to change notification settings - Fork 81
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
Conversation
6583ef4
to
316540c
Compare
wren-main/src/main/java/io/wren/main/connector/snowflake/SnowflakeClient.java
Outdated
Show resolved
Hide resolved
wren-main/src/main/java/io/wren/main/connector/snowflake/SnowflakeMetadata.java
Outdated
Show resolved
Hide resolved
wren-main/src/main/java/io/wren/main/connector/snowflake/SnowflakeRecordIterator.java
Outdated
Show resolved
Hide resolved
wren-main/src/main/java/io/wren/main/connector/snowflake/SnowflakeSqlConverter.java
Outdated
Show resolved
Hide resolved
wren-tests/src/test/java/io/wren/testing/TestConfigResource.java
Outdated
Show resolved
Hide resolved
wren-tests/src/test/java/io/wren/testing/snowflake/AbstractWireProtocolTestWithSnowflake.java
Outdated
Show resolved
Hide resolved
wren-tests/src/test/java/io/wren/testing/snowflake/AbstractWireProtocolTestWithSnowflake.java
Outdated
Show resolved
Hide resolved
wren-tests/src/test/java/io/wren/testing/snowflake/AbstractWireProtocolTestWithSnowflake.java
Show resolved
Hide resolved
316540c
to
851bc81
Compare
{ | ||
try { | ||
BigQueryMetadata metadata = getInstance(Key.get(BigQueryMetadata.class)); | ||
BigQueryClient bigQueryClient = metadata.getBigQueryClient(); |
There was a problem hiding this comment.
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()));
There was a problem hiding this comment.
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.
725f5a6
to
0633f41
Compare
0633f41
to
c352db5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
We implement the
Snowflake
data source. We also usesqlglot
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 usesnowflake-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