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

jdbc sink: add user/password option #140

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion integrations/destinations/cockroachdb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ CREATE SINK sink1
FROM mv1
WITH (
connector = 'jdbc',
jdbc.url = 'jdbc:postgresql://cockroachdb:26257/defaultdb?user=root',
jdbc.url = 'jdbc:postgresql://cockroachdb:26257/defaultdb',
user = 'root',
password = '...',
table.name = 'target_count',
type = 'upsert',
primary_key = 'target_id'
Expand Down
14 changes: 8 additions & 6 deletions integrations/destinations/mysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ WITH (

### Parameters

All `WITH` options are required.

| Parameter or clause | Description |
| Parameter or clause | Description |
| :------------------ | :------------- |
| sink\_name | Name of the sink to be created. |
| sink\_from | A clause that specifies the direct source from which data will be output. `sink_from` can be a materialized view or a table. Either this clause or a SELECT query must be specified. |
| AS select\_query | A SELECT query that specifies the data to be output to the sink. Either this query or a FROM clause must be specified. See [SELECT](/sql/commands/sql-select) for the syntax and examples of the SELECT command. |
| connector | Sink connector type must be `jdbc` for MySQL sink. |
| jdbc.url | The JDBC URL of the destination database necessary for the driver to recognize and connect to the database. |
| jdbc.url | Required. The JDBC URL of the destination database necessary for the driver to recognize and connect to the database. |
| user | The user name for the database connection. |
| password | The password for the database connection. |
| jdbc.query.timeout | Specifies the timeout for the operations to downstream. If not set, the default is 10 minutes. |
| table.name | The table in the destination database you want to sink to. |
| table.name | Required. The table in the destination database you want to sink to. |
| type | Data format. Allowed formats: <ul><li>`append-only`: Output data with insert operations.</li><li>`upsert`: Output data as a changelog stream.</li></ul> |
| primary\_key | Required if type is upsert. The primary key of the downstream table. |

Expand All @@ -145,7 +145,9 @@ CREATE TABLE personnel (

CREATE SINK s_mysql FROM personnel WITH (
connector='jdbc',
jdbc.url='jdbc:mysql://<aws_rds_endpoint>:<port>/test_db?user=<username>&password=<password>',
jdbc.url='jdbc:mysql://<aws_rds_endpoint>:<port>/test_db',
user='<username>',
password='<password>',
table.name='personnel',
type = 'upsert',
primary_key = 'id'
Expand Down
14 changes: 8 additions & 6 deletions integrations/destinations/postgresql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ WITH (

### Parameters

All `WITH` options are required unless noted.

| Parameter or clause | Description |
| :------------------ | :-------------- |
| sink\_name | Name of the sink to be created. |
| sink\_from | A clause that specifies the direct source from which data will be output. `sink_from` can be a materialized view or a table. Either this clause or a SELECT query must be specified. |
| AS select\_query | A SELECT query that specifies the data to be output to the sink. Either this query or a FROM clause must be specified. See [SELECT](/sql/commands/sql-select) for the syntax and examples of the SELECT command. |
| connector | Sink connector type must be `jdbc` for PostgresQL sink. |
| jdbc.url | The JDBC URL of the destination database necessary for the driver to recognize and connect to the database. |
| jdbc.url | Required. The JDBC URL of the destination database necessary for the driver to recognize and connect to the database. |
| user | The user name for the database connection. |
| password | The password for the database connection. |
| jdbc.query.timeout | Specifies the timeout for the operations to downstream. If not set, the default is 10 minutes. |
| table.name | The table in the destination database you want to sink to. |
| schema.name | Optional. The schema in the destination database you want to sink to. The default value is public. |
| table.name | Required. The table in the destination database you want to sink to. |
| schema.name | The schema in the destination database you want to sink to. The default value is public. |
| type | Sink data type. Supported types: <ul><li>`append-only`: Sink data as INSERT operations.</li><li>`upsert`: Sink data as UPDATE, INSERT and DELETE operations.</li></ul> |
| primary\_key | Required if type is upsert. The primary key of the sink, which should match the primary key of the downstream table. |

Expand Down Expand Up @@ -151,7 +151,9 @@ Use the following query to sink data from the materialized view to the target ta
```sql
CREATE SINK target_count_postgres_sink FROM target_count WITH (
connector = 'jdbc',
jdbc.url = 'jdbc:postgresql://postgres:5432/mydb?user=myuser&password=123456',
jdbc.url = 'jdbc:postgresql://postgres:5432/mydb',
user = 'myuser',
password = '123456',
table.name = 'target_count',
type = 'upsert',
primary_key = 'target_id'
Expand Down
4 changes: 3 additions & 1 deletion integrations/destinations/supabase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ The following SQL command creates a sink, `promotion_update`, that sinks data fr
```sql
CREATE SINK promotion_update FROM product_calc_mv WITH (
connector='jdbc',
jdbc.url='jdbc:postgresql://xxxx.supabase.co:5432/postgres?user=postgres&password=xxx',
jdbc.url='jdbc:postgresql://xxxx.supabase.co:5432/postgres',
user = 'postgres',
password = 'xxx',
table.name = 'promotions',
type = 'upsert'
);
Expand Down
Loading