postgres-sink
demo in the integration_test directory of the RisingWave repository.
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 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.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. |
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. |
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.