-
Notifications
You must be signed in to change notification settings - Fork 579
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
feat: add new option ignore_key
for debeizum format
#15304
Conversation
if source_schema.format == Format::Debezium { | ||
try_consume_string_from_options(&mut format_encode_options_to_consume, DEBEZIUM_IGNORE_KEY); | ||
} |
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.
@xiangjinwu I am not sure where to put this code, ignore_key seems the first format accepting options.
pub fn from(props: &BTreeMap<String, String>) -> Self { | ||
let ignore_key = props | ||
.get(DEBEZIUM_IGNORE_KEY) | ||
.map(|v| v.eq_ignore_ascii_case("true")) | ||
.unwrap_or(false); | ||
Self { ignore_key } | ||
} |
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.
Also note that format_endcode_options
are not tracked in with option checks (of course they are not in with clause).
I am wondering if we need another tool to track this options
kafka.brokers = 'message_queue:29092', | ||
kafka.scan.startup.mode = 'earliest') | ||
FORMAT DEBEZIUM ENCODE JSON ( | ||
ignore_key = 'true' |
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.
Is it possible to put this in the with
statement? This may happen for debezium avro as well.
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 is an option for format
rather than the connector, not suitable for putting it in with clause.
This may happen for debezium avro as well.
Yes, this option can also apply to debezium avro.
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.
Generally LGTM, thanks!
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.
LGTM, thanks!
resolve #15156 |
…5460) Signed-off-by: tabVersion <tabvision@bupt.icu>
ignore_option
for debeizum formatignore_key
for debeizum format
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
add a format spec option
ignore_key
forformat DEBEZIUM
. (acceptstrue
andfalse
, default tofalse
)The option controls whether to ignore the key part for given messages. If set to true, debezium format will work with only the payload part.
Note that in this case, RW cannot handle tombstone message. So users should guarantee that payload MUST NOT be empty.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.
as described above