-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix(source): PostgreSQL/MySQL CDC source vs table relationship #2449
base: main
Are you sure you want to change the base?
Conversation
Btw is the |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
|
||
### Syntax | ||
|
||
Syntax for creating a CDC source. | ||
Syntax for creating a shared CDC source. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to clarify the logic first: need to create a source
before creating table
Syntax for creating a shared CDC source. | |
Before creating a table, you need to first create a source to the upstream MySQL database using the following syntax. This source can be shared by multiple tables from the same MySQL database. |
@@ -162,7 +162,7 @@ CREATE SOURCE [ IF NOT EXISTS ] source_name WITH ( | |||
); | |||
``` | |||
|
|||
Syntax for creating a CDC table. Note that a primary key is required and must be consistent with the upstream table. | |||
Syntax for creating a CDC table based on the shared source. Note that a primary key is required and must be consistent with the upstream table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use a complete sentence.
Syntax for creating a CDC table based on the shared source. Note that a primary key is required and must be consistent with the upstream table. | |
Below is the syntax for creating a CDC table based on the shared source. Note that a primary key is required and must be consistent with the upstream table. |
@@ -151,11 +151,11 @@ If you are running RisingWave locally from binaries and intend to use the native | |||
|
|||
## Create a table using the native CDC connector | |||
|
|||
To ensure all data changes are captured, you must create a table or source and specify primary keys. See the [`CREATE TABLE`](/sql/commands/sql-create-table.md) command for more details. | |||
To ensure all data changes are captured, you must create a shared source first and create tables based on that source. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok as of now in this PR, but I feel it would be more useful if we have a topic or section about "shared sources" that we can now point to. There are a few RisingWave-specific concepts that we may want to elaborate somewhere. In addition, the "Sources" term in Glossary should be updated. cc: @st1page @WanYixian
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. The shared source is still in development by @xxchan and it is expected to release in v2.1. I think we will add the doc that time.
Info
Description
table
but notsource
.table
directly, same as before.source
first, and thentable
based on the shared source.Fixes in this PR (using PostgreSQL as example but may apply to MySQL as well):
table or source
is never the case. It istable
(deprecated) orsource + table
(recommended).create table
syntax reference is useless. That page does not containFROM source_name TABLE
syntax for shared PostgreSQL/MySQL CDC.FROM source TABLE
is updated toFROM source_name TABLE
in the example, to keep consistent withCREATE SOURCE source_name
above.Notes
Related code PR
Related doc issue
Resolves [ Provide a link to the relevant doc issue here, if applicable. ]
For reviewers
Preview
Key points
Before merging
I have checked the doc site preview, and the updated parts look good.
I have acquired the approval from the owner (and optionally the reviewers) of the code PR and at least one tech writer (
emile-00
,hengm3467
, &WanYixian
).