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

[FLINK-33761][Connector/JDBC] Add Snowflake JDBC Dialect #118

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

borislitvak
Copy link

@borislitvak borislitvak commented Apr 30, 2024

Feature: New JBDC connector dialect - connect to Snowflake.

Testing: As Snowflake is a SAAS offering, I did not provide any tests for it. We don't want to incur any more expenses. Note that it's a new feature. Any potential breakages in this PR should not impact existing users.

Usage Example: This is how I use it in my sample code:

    public static Table getSnowflakeTable(StreamTableEnvironment tEnv, SnowflakeConfig config) {
        tEnv.createTemporaryTable(
                "XXX",
                TableDescriptor.forConnector("jdbc")
                        .schema(Schema.newBuilder()
                                .column("F1", DataTypes.BIGINT())
                                .column("F2", DataTypes.TIMESTAMP().bridgedTo(java.time.LocalDateTime.class))
                                .build()
                        )
                        .option("driver", config.getDriver())
                        // https://docs.snowflake.com/developer-guide/jdbc/jdbc-configure#connection-parameters
                        .option("url", config.getUrl() + "&CLIENT_TIMESTAMP_TYPE_MAPPING=TIMESTAMP_NTZ")
                        .option("table-name", "Snowflake-Sample-Table-Replace-This")
                        .build()
        );
        return tEnv.sqlQuery("SELECT * FROM XXX");
    }

Copy link

boring-cyborg bot commented Apr 30, 2024

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

@boris-snyk boris-snyk force-pushed the feat/snowflake-dialect branch from d5c7126 to 027afc6 Compare May 1, 2024 21:02
@borislitvak
Copy link
Author

@davidradl WDYT?

@EcaterinaL
Copy link

Hello all,

Is there any progress on this? will it be merged, if yes, when do you think this would be?

Thank you!

@borislitvak
Copy link
Author

borislitvak commented Nov 20, 2024

Hello all,

Is there any progress on this? will it be merged, if yes, when do you think this would be?

Thank you!

Ecaterina, I am still waiting for a months for a year. Using this in prod with 1.19.1. @EcaterinaL @davidradl

@EcaterinaL
Copy link

Thank you for your prompt answer!,
Do you actively use it?
Have you merge it with your master?

@borislitvak
Copy link
Author

borislitvak commented Nov 20, 2024 via email

@davidradl
Copy link
Contributor

Hi @borislitvak @EcaterinaL , thanks for the changes - I cannot merge this as I am not a committer.
I notice the branch has conflicts.
I have suggested this be included in the forthcoming JDBC connector for Flink 1.20.

@snuyanzin is this something you can help with reviewing/merging once the conflicts are resolved please?

@EcaterinaL
Copy link

@davidradl, I used this repo to try and create a connector myself, however I found that some of the methods(ex createInputSerializer()) are not available on flink 1.19 I have to refactor. Is it possible to resolve some of them in 1.20? And when do you think the new version will be available ? :)

Thank you!

@davidradl
Copy link
Contributor

davidradl commented Dec 3, 2024

@davidradl, I used this repo to try and create a connector myself, however I found that some of the methods(ex createInputSerializer()) are not available on flink 1.19 I have to refactor. Is it possible to resolve some of them in 1.20? And when do you think the new version will be available ? :)

Thank you!

Hi @EcaterinaL , I am not sure what you mean by "Is it possible to resolve some of them in 1.20?" I suggest checking the git history to see when the methods were removed and how callers now get this capability. At the moment it is early days in getting a JDBC connector out that works with 1.20; I initiated a conversation on the dev list to get this started. The release manager has not been agreed yet, so I do not have a timescale for you.

@EcaterinaL
Copy link

EcaterinaL commented Dec 3, 2024

Thank you @davidradl , I'll look at the history, good idea. I'm going to keep monitor this thread, for me is important to have this connector ready in coming months.

@davidradl
Copy link
Contributor

davidradl commented Dec 3, 2024

Thank you @davidradl , I'll look at the history, good idea. I'm going to keep monitor this thread, for me is important to have this connector ready in coming months.

no worries - I also suggest that you respond with your need to my dev list post - I proposed that we can get a 1.20 release of the Flink JDBC connector cut off main - then if your PR is merged this dialect will be included.

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

Successfully merging this pull request may close these issues.

4 participants