-
Notifications
You must be signed in to change notification settings - Fork 590
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
connector: support sinking jsonb as dynamic type #11699
Comments
19 tasks
9 tasks
This comment was marked as off-topic.
This comment was marked as off-topic.
Do we need this for DebeziumJson? |
According to Debezium the |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
As an analogy to #10772, there are 2 styles to sink a
jsonb
value out:Always as a JSON-encoded string:
1
->"1"
true
->"true"
null
->"null"
"foo"
->"\"foo\""
[1, true, "foo"]
->"[1, true, \"foo\"]"
{"k": 2}
->"{\"k\": 2}"
As different types based on
jsonb_typeof
:1
->1
true
->true
null
->null
"foo"
->"foo"
[1, true, "foo"]
->[1, true, "foo"]
{"k": 2}
->{"k": 2}
Currently the kafka sink uses the former style, because each RisingWave data type always maps to a single data type in output. But the latter form may be preferred in certain cases.
The latter style should report an error when the sink column is not dynamic type.
Describe the solution you'd like
Introduce a new sink option to switch between the 2 styles, similar to existing
TimestampHandlingMode
. The default can be used to retain backward compatibility.Describe alternatives you've considered
No response
Additional context
risingwave/src/connector/src/sink/utils.rs
Lines 355 to 357 in 26edff4
cc @StrikeW @tabVersion @BugenZhao
The text was updated successfully, but these errors were encountered: