Skip to content

Commit 8405466

Browse files
fix: fix cdc stream query template (#1498)
1 parent e85f70e commit 8405466

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/containers/Tenant/utils/schemaQueryTemplates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ export const dropTableIndex = (params?: SchemaQueryParams) => {
179179
return `ALTER TABLE \`${path || '$path'}\` DROP INDEX \`${indexName || '$indexName'}\`;`;
180180
};
181181

182-
export const createCdcStreamTemplate = () => {
182+
export const createCdcStreamTemplate = (params?: SchemaQueryParams) => {
183183
return `-- docs: https://ydb.tech/docs/en/yql/reference/syntax/create_changefeed
184-
ADD CHANGEFEED $name WITH (
184+
ALTER TABLE \`${params?.relativePath || '$path'}\` ADD CHANGEFEED $name WITH (
185185
MODE = $mode, -- KEYS_ONLY, UPDATES, NEW_IMAGE, OLD_IMAGE, or NEW_AND_OLD_IMAGES
186186
FORMAT = $format, -- JSON or DEBEZIUM_JSON
187187
VIRTUAL_TIMESTAMPS = $virtualTimestamps, -- true or false

0 commit comments

Comments
 (0)