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

[FLINK-35314][cdc] Add Flink CDC pipeline transform user document #3308

Merged
merged 2 commits into from May 15, 2024

Conversation

aiwenmo
Copy link
Contributor

@aiwenmo aiwenmo commented May 9, 2024

This closes FLINK-35314.

@github-actions github-actions bot added the docs Improvements or additions to documentation label May 9, 2024
Copy link
Contributor

@yuxiqian yuxiqian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aiwenmo's great work! I just leave some minor comments, mostly trivial grammar issues, FYR.

@@ -28,5 +28,245 @@ under the License.
**Transform** module helps users delete and expand data columns based on the data columns in the table.
What's more, it also helps users filter some unnecessary data during the synchronization process.

# Parameters
To describe a transform, the follows are required:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To describe a transform, the follows are required:
To describe a transform rule, the following parameters can be used:

Comment on lines 39 to 40
| primary-keys | Sink table primary keys, it is separated by English commas | optional |
| partition-keys | Sink table partition keys, it is separated by English commas | optional |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| primary-keys | Sink table primary keys, it is separated by English commas | optional |
| partition-keys | Sink table partition keys, it is separated by English commas | optional |
| primary-keys | Sink table primary keys, separated by commas | optional |
| partition-keys | Sink table partition keys, separated by commas | optional |

| filter | Filter rule, supports syntax similar to the where clause in SQL | optional |
| primary-keys | Sink table primary keys, it is separated by English commas | optional |
| partition-keys | Sink table partition keys, it is separated by English commas | optional |
| table-options | Sink table options, when automatically creating a table, it is added to the configuration of the table creation statement | optional |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| table-options | Sink table options, when automatically creating a table, it is added to the configuration of the table creation statement | optional |
| table-options | Sink table options, used to the configure table creation statement when automatically creating tables | optional |

| primary-keys | Sink table primary keys, it is separated by English commas | optional |
| partition-keys | Sink table partition keys, it is separated by English commas | optional |
| table-options | Sink table options, when automatically creating a table, it is added to the configuration of the table creation statement | optional |
| description | Transform rule description(a default value provided) | optional |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| description | Transform rule description(a default value provided) | optional |
| description | Transform rule description (a default description will be used if not specified) | optional |

Does it mean if user didn't specify a transform description, CDC will generate a default one to indicate that transform rule?


# Metadata Fields
## Fields definition
There are three hidden columns used to describe metadata information. They only take effect when explicitly referenced in the transform rules.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There are three hidden columns used to describe metadata information. They only take effect when explicitly referenced in the transform rules.
There are some hidden columns used to access metadata information. They will only take effect when explicitly referenced in the transform rules.


# Problem
· Transform cannot be used with route in the current version, future versions will support it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
· Transform cannot be used with route in the current version, future versions will support it.
* Currently, transform doesn't work with route rules. It will be supported in future versions.

# Problem
· Transform cannot be used with route in the current version, future versions will support it.
· The computed column does not support referencing the trimmed original column in the current version, future versions will support it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
· The computed column does not support referencing the trimmed original column in the current version, future versions will support it.
* Computed columns cannot reference trimmed columns that do not present in final projection results. This will be fixed in future versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe copy this file content to Chinese version documents as well? Seems other docs lacking Chinese translation have English version fallback as well.

| table-options | Sink table options, when automatically creating a table, it is added to the configuration of the table creation statement | optional |
| description | Transform rule description(a default value provided) | optional |

A transform module can contain a list of source-table rules.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A transform module can contain a list of source-table rules.
Multiple rules can be declared in one single pipeline YAML file.

Comment on lines 52 to 54
| __namespace_name__ | String | Name of the namespace that contain the row. |
| __schema_name__ | String | Name of the schema that contain the row. |
| __table_name__ | String | Name of the table that contain the row. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| __namespace_name__ | String | Name of the namespace that contain the row. |
| __schema_name__ | String | Name of the schema that contain the row. |
| __table_name__ | String | Name of the table that contain the row. |
| __namespace_name__ | String | Name of the namespace that contains the row. |
| __schema_name__ | String | Name of the schema that contains the row. |
| __table_name__ | String | Name of the table that contains the row. |

Copy link
Contributor

@PatrickRen PatrickRen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aiwenmo Thanks for the PR! LGTM

@PatrickRen PatrickRen merged commit d0457f7 into apache:master May 15, 2024
3 checks passed
@PatrickRen
Copy link
Contributor

@aiwenmo Could you backport the commit to release-3.1? Thanks

PatrickRen pushed a commit to PatrickRen/flink-cdc that referenced this pull request May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants