postgres-sink
demo in the integration_test directory of the RisingWave repository.
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 for the syntax and examples of the SELECT command. |
connector | Sink connector should be jdbc . To switch from jdbc to postgres , set stream_switch_jdbc_pg_to_native = true under [streaming.developer] . |
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 60s. |
jdbc.auto.commit | Controls whether to automatically commit transactions for JDBC sink. If not set, the default is false. |
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:
|
primary_key | Required if type is upsert. The primary key of the sink, which should match the primary key of the downstream table. |
stream_switch_jdbc_pg_to_native = true
under [streaming.developer]
.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 for the syntax and examples of the SELECT command. |
connector | Sink connector must be postgres . |
user | The user name for the database connection. |
password | The password for the database connection. |
database | Required. The database in the destination database you want to sink to. |
table | Required. The table in the destination database you want to sink to. |
schema | The schema in the destination database you want to sink to. The default value is public. |
type | Sink data type. Supported types:
|
primary_key | Required if type is upsert. The primary key of the sink, which should match the primary key of the downstream table. |
ssl_mode | The ssl.mode parameter determines the level of SSL/TLS encryption for secure communication with Postgres. Accepted values are disabled , preferred , required , verify-ca , and verify-full . The default value is disabled .
|
ssl_root_cert | Specify the root certificate secret. You must create secret first and then use it here. |
target_id
. Note that the materialized view and the target table share the same schema.
jdbc_url
is accurate and reflects the PostgreSQL database that you are connecting to. See CREATE SINK for more details.
target_count
in PostgreSQL.
varchar
column in RisingWave can be sinked to a uuid
column in Postgres.smallint
, integer
, bigint
, real
, double precision
, and varchar
type now.