-
-
Notifications
You must be signed in to change notification settings - Fork 64
mssql: Incorrect syntax with table_ddl and primary table_keys #694
Copy link
Copy link
Closed
Description
Sling version:
1.5.4
What is the Operating System?
Windows
Do you have a CLI Pro/Platform subscription?
No
Description of the issue
Adding primary keys when using table_ddl or sqlserver.yml template that include table options (e.g., data_compression) yields incorrect DDL.
create table "schema"."table" (
"col1" nvarchar(10),
"col2" nvarchar(6)
) with (data_compression=page, primary key ("col1", "col2"))should generate
create table "schema"."table" (
"col1" nvarchar(10),
"col2" nvarchar(6),
primary key ("col1", "col2")
) with (data_compression=page)Replication Configuration
target_options:
table_ddl:
CREATE TABLE {object_name} ({col_types}) WITH (DATA_COMPRESSION = PAGE)
streams:
schema.table:
primary_key: [col1, col2]
target_options:
table_keys:
primary: [col1, col2]Log Output
~ Error executing: create table "schema"."table" ("col1" nvarchar(10),
"col2" nvarchar(6)) with (data_compression=page, primary key ("col1", "col2"))
--- transaction.go:139 ExecContext ---
--- transaction.go:139 ExecContext ---
mssql: Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels