Skip to content

fix: fix cdc stream query template #1498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/containers/Tenant/utils/schemaQueryTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading