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

Add timestamp metadata field to kafka connector #776

Merged
merged 4 commits into from
Oct 31, 2024
Merged

Conversation

mwylde
Copy link
Member

@mwylde mwylde commented Oct 31, 2024

This PR adds a metadata field for the timestamp to the Kafka source, such that this now works:

create table workflow (
    id TEXT,
    topic TEXT GENERATED ALWAYS AS (metadata('topic')) STORED,
    timestamp BIGINT GENERATED ALWAYS AS (metadata('timestamp')) STORED
) with (
    connector = 'kafka',
    bootstrap_servers = 'localhost:9092',
    topic = 'workflow-events',
    type = 'source',
    format = 'json'
);

This closes #631.

Also addresses an issue where metadata fields could not be added to sources with raw_string/raw_bytes/unstructured json formats.

@mwylde mwylde force-pushed the kafka_timestamp_field branch from 21b452d to a0bff68 Compare October 31, 2024 04:33
@mwylde mwylde merged commit 4f56baf into master Oct 31, 2024
6 checks passed
@mwylde mwylde deleted the kafka_timestamp_field branch October 31, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Kafka record timestamp column in Kafka Source Connector
1 participant