Skip to content
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

improve error msg for CDC source with generated columns #14693

Closed
xxchan opened this issue Jan 19, 2024 · 0 comments · Fixed by #16636
Closed

improve error msg for CDC source with generated columns #14693

xxchan opened this issue Jan 19, 2024 · 0 comments · Fixed by #16636
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@xxchan
Copy link
Member

xxchan commented Jan 19, 2024

Describe the bug

I think this should be rejected, but the error message is very confusing.

dev=>  CREATE SOURCE pg_mydb (*, x timestamp as proctime()) WITH (
connector = 'postgres-cdc',
hostname = 'localhost',
port = '5432',
username = 'xxchan',
password = 'test',
database.name = 'postgres',
slot.name = 'mydb_slot'
);
ERROR:  Failed to run the query

Caused by:
  Protocol error: Row format for CDC connectors should be either omitted or set to `FORMAT PLAIN ENCODE JSON`, got: Debezium Json

If I add FORMAT PLAIN ENCODE JSON according to the error

dev=>  CREATE SOURCE pg_mydb (*, x timestamp as proctime()) WITH (
connector = 'postgres-cdc',
hostname = 'localhost',
port = '5432',
username = 'xxchan',
password = 'test',
database.name = 'postgres',
slot.name = 'mydb_slot'
) FORMAT PLAIN ENCODE JSON;
ERROR:  Failed to run the query

Caused by:
  sql parser error: Row format for CDC connectors should be either omitted or set to `FORMAT DEBEZIUM ENCODE JSON`

If I add FORMAT DEBEZIUM ENCODE JSON according to the error

dev=>  CREATE SOURCE pg_mydb (*, x timestamp as proctime()) WITH (
connector = 'postgres-cdc',
hostname = 'localhost',
port = '5432',
username = 'xxchan',
password = 'test',
database.name = 'postgres',
slot.name = 'mydb_slot'
) FORMAT DEBEZIUM ENCODE JSON;
ERROR:  Failed to run the query

Caused by:
  Protocol error: Row format for CDC connectors should be either omitted or set to `FORMAT PLAIN ENCODE JSON`, got: Debezium Json

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

latest main

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants