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

[api-draft][connector] Add SeaTunnel jdbc sink (#1946) #2009

Merged
merged 4 commits into from
Jun 13, 2022

Conversation

ic4y
Copy link
Contributor

@ic4y ic4y commented Jun 12, 2022

Purpose of this pull request

Check list

related to #1946

I have tested mysql and postgres on flink. Pass the test below

  • batch model open exactly_once
  • batch model close exactly_once
  • streaming model open exactly_once
  • streaming model close exactly_once

example mysql config:

sink {
    jdbc {

        url = "jdbc:mysql://localhost/test"
        driver = "com.mysql.cj.jdbc.Driver"
        connection_check_timeout_sec = 10
        max_retries = 0
        user = "root"
        password = "123456"
        query = "insert into test_table(name,age) values(?,?)"
        parallelism = "2"

        batch_size = 10
        batch_interval_ms = 10000

        is_exactly_once = "true"

        xa_data_source_class_name = "com.mysql.cj.jdbc.MysqlXADataSource"
        max_commit_attempts = 10
        transaction_timeout_sec = 1000
         }
} 

example postgres config:

sink {
    jdbc {
        url = "jdbc:postgresql://localhost:5432/test"
        driver = "org.postgresql.Driver"
        connection_check_timeout_sec = 10
        max_retries = 0
        user = "postgres"
        password = "123456"
        query = "insert into test_table(name,age) values(?,?)"
        parallelism = "2"

        batch_size = 10
        batch_interval_ms = 10000

        #Postgres needs to set this parameter : ALTER SYSTEM set max_prepared_transactions to 10;
        is_exactly_once = "true"

        xa_data_source_class_name = "org.postgresql.xa.PGXADataSource"
        max_commit_attempts = 10
        transaction_timeout_sec = 1000
    }
}```

@ic4y ic4y changed the title Add SeaTunnel jdbc sink (#1946) [api-draft][connector] Add SeaTunnel jdbc sink (#1946) Jun 12, 2022
@CalvinKirs CalvinKirs merged commit 890211c into apache:api-draft Jun 13, 2022
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.

3 participants