From 84054666dae4df611a9657027b7be2bde84f153d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9C=D1=83=D1=84=D0=B0?= =?UTF-8?q?=D0=B7=D0=B0=D0=BB=D0=BE=D0=B2?= <67755036+artemmufazalov@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:09:31 +0300 Subject: [PATCH] fix: fix cdc stream query template (#1498) --- src/containers/Tenant/utils/schemaQueryTemplates.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/Tenant/utils/schemaQueryTemplates.ts b/src/containers/Tenant/utils/schemaQueryTemplates.ts index d7c8a5508..eb0f100a7 100644 --- a/src/containers/Tenant/utils/schemaQueryTemplates.ts +++ b/src/containers/Tenant/utils/schemaQueryTemplates.ts @@ -179,9 +179,9 @@ export const dropTableIndex = (params?: SchemaQueryParams) => { return `ALTER TABLE \`${path || '$path'}\` DROP INDEX \`${indexName || '$indexName'}\`;`; }; -export const createCdcStreamTemplate = () => { +export const createCdcStreamTemplate = (params?: SchemaQueryParams) => { return `-- docs: https://ydb.tech/docs/en/yql/reference/syntax/create_changefeed -ADD CHANGEFEED $name WITH ( +ALTER TABLE \`${params?.relativePath || '$path'}\` ADD CHANGEFEED $name WITH ( MODE = $mode, -- KEYS_ONLY, UPDATES, NEW_IMAGE, OLD_IMAGE, or NEW_AND_OLD_IMAGES FORMAT = $format, -- JSON or DEBEZIUM_JSON VIRTUAL_TIMESTAMPS = $virtualTimestamps, -- true or false