RUNNING
, then SQL Server Agent is running. If not, you can start it by running the following statement in the SQL Server container.
MSSQL_AGENT_ENABLED: "true"
.
If you are using Azure SQL Database, SQL Server Agent should be available be default. Otherwise, you can enable it following the guidance.
2. Enable CDC for the database, as it is disabled by default. Run the following statement to enable CDC for the database.
dbo
schema for table t1
.dbo
with the schema name and t1
with the table name.
sqlserver-cdc
as the source like mysql-cdc
and postgres-cdc
. You need to create a source first and then create tables from the source.
Field | Notes |
---|---|
hostname | Hostname of the database. |
port | Port number of the database. |
username | Username of the database. |
password | Password of the database. |
database.name | Name of the database. |
database.encrypt | Optional. Specify whether to enable SSL encryption. Currently, trustServerCertificate is enabled regardless of the value of database.encrypt . |
sqlserver_table_name | The identifier of SQL Server table in the format of database_name.schema_name.table_name . |
Field | Notes |
---|---|
snapshot | Optional. If false, CDC backfill will be disabled and only upstream events that have occurred after the creation of the table will be consumed. This option can only be applied for tables created from a shared source. |
snapshot.interval | Optional. Specifies the barrier interval for buffering upstream events. The default value is 1. |
snapshot.batch_size | Optional. Specifies the batch size of a snapshot read query from the upstream table. The default value is 1000. |
WITH
clause when creating a table or shared source. Add the prefix debezium.
to the connector property you want to include.
For instance, to skip unknown DDL statements, specify the schema.history.internal.skip.unparseable.ddl
parameter as debezium.schema.history.internal.skip.unparseable.ddl
.
Field | Notes |
---|---|
database_name | Name of the database. |
schema_name | Name of the schema. |
table_name | Name of the table. |
database_name
, schema_name
, table_name
) to provide contextual information about where the data resides within the SQL Server database.
FORMAT PLAIN ENCODE JSON
so it does not need to be specified.
tt3
in the schema dbo
. When specifying the SQL Server table name in the FROM
clause after the keyword TABLE
, the schema name must also be specified.
tt4
in the schema ods
.
SQL Server type | RisingWave type |
---|---|
BIT | BOOLEAN |
TINYINT, SMALLINT | SMALLINT |
INT | INTEGER |
BIGINT | BIGINT |
REAL | REAL |
FLOAT | DOUBLE PRECISION |
NUMERIC[(M[,D])], DECIMAL[(M[,D])] | numeric, numeric supports values with a precision of up to 28 digits, and any values beyond this precision will be treated as NULL. |
CHAR[(M)], VARCHAR[(M)], TEXT, NCHAR[(M)], NVARCHAR[(M)], NTEXT | CHARACTER VARYING |
BINARY[(M)], NBINARY[(M)] | BYTEA |
DATE | DATE |
TIME | TIME |
SMALLDATETIME, DATETIME, DATETIME2 | TIME WITHOUT TIME ZONE (assume UTC time zone) |
DATETIMEOFFSET | TIMESTAMP WITH TIME ZONE |
UUID | CHARACTER VARYING, uppercase |
XML | CHARACTER VARYING |
CURSOR, GEOGRAPHY, GEOMETRY, HIERARCHYID, JSON, ROWVERSION, SQL_VARIANT, TABLE, IMAGE, MONEY, SMALLMONEY | No support |
*
when creating a table to ingest all columns from the source table. Note that *
cannot be used if other columns are specified in the table creation process.
Below is an example to create a table that ingests all columns from the upstream table from the SQL Server database:
DESCRIBE supplier;
next_id
is not a column from the source SQL Server table. Instead, it is a generated column that RisingWave computes dynamically while ingesting data. The value of next_id
for each row is always equal to id + 1
:
name
, an upstream column, is placed after the generated column next_id
: