risingwave icon indicating copy to clipboard operation
risingwave copied to clipboard

Add support to add headers to Kafka Sink

Open mbombonato opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

CREATE SINK kafka_sink AS SELECT
   "user_id", "user_name", "tenant_id"
FROM my_view
WITH (
    connector='kafka',
    properties.bootstrap.server = 'localhost:9092',
    topic='topic',
    primary_key='user_id,tenant_id',
    headers='X-Tenant-Id: tenant_id, X-User-Id: user_id',
    allow.auto.create.topics='true'
)
FORMAT UPSERT ENCODE JSON;

Describe alternatives you've considered

No response

Additional context

I'd also add the possibility to map a jsonb field to it. Like: "X-User-Id: user.id"

(That would also be great for the primary-key)

mbombonato avatar Jul 29 '24 19:07 mbombonato

This issue has been open for 60 days with no activity.

If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity label.

You can also confidently close this issue as not planned to keep our backlog clean. Don't worry if you think the issue is still valuable to continue in the future. It's searchable and can be reopened when it's time. 😄

github-actions[bot] avatar Oct 20 '24 02:10 github-actions[bot]

This is still relevant. The "Additional Context" is also relevant.

mbombonato avatar Oct 20 '24 12:10 mbombonato

Any update?

aminmokhtari94 avatar Jul 13 '25 09:07 aminmokhtari94