Skip to content

dekaf: Add support for not_before and not_after #2052

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

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

jshearer
Copy link
Contributor

@jshearer jshearer commented Apr 7, 2025

Description:

Now that we have MaterializationSpec::Bindings, we can support not_before, not_after, and also partition selectors.


This change is Reviewable

@jshearer jshearer force-pushed the dekaf/support_notbefore_notafter branch from d027e76 to fc1d0b5 Compare April 8, 2025 20:14
…`MaterializationSpec::Binding` from which to pull them
@jshearer jshearer force-pushed the dekaf/support_notbefore_notafter branch from fc1d0b5 to 88af26b Compare April 8, 2025 20:16
@jshearer
Copy link
Contributor Author

jshearer commented Apr 8, 2025

With a binding of:

{
"bindings": [
    {
      "resource": {
        "topic_name": "wikichanges"
      },
      "source": {
        "name": "demo/wikipedia/recentchange-sampled",
        "notBefore": "2025-04-05T03:12:00Z",
        "notAfter": "2025-04-05T03:20:00Z"
      },
      "fields": {
        "recommended": true
      }
    }
  ]
}

Confirmed I only get data between 03:12:00Z and 03:20:00Z

$ kcat -o beginning -b dekaf-dev.estuary-data.com:9092 \
-X security.protocol=SASL_SSL \
-X sasl.mechanism=PLAIN \
-X sasl.username='estuary/jshearer/dekaf-notbefore-testing/dekaf-generic' \
-X sasl.password="..." -s value=avro -r 'https://estuary%2Fjshearer%2Fdekaf-notbefore-testing%2Fdekaf-generic:[email protected]' -e -G testing wikichanges | jq -c '.flow_published_at'

"2025-04-05T03:12:12.531248004Z"
"2025-04-05T03:12:13.542011704Z"
"2025-04-05T03:12:26.105103804Z"
"2025-04-05T03:12:27.193294404Z"
[...]
"2025-04-05T03:19:10.573997804Z"
"2025-04-05T03:19:39.380137004Z"
"2025-04-05T03:19:45.978076204Z"
"2025-04-05T03:19:55.043608104Z"

@jshearer jshearer marked this pull request as ready for review April 8, 2025 21:28
@jshearer jshearer requested a review from jgraettinger April 8, 2025 21:28
We just need to pass this through to the request to list all partitions, as that'll drive everything else.
Copy link
Member

@jgraettinger jgraettinger left a comment

Choose a reason for hiding this comment

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

LGTM

@jshearer jshearer merged commit f633e66 into master Apr 11, 2025
3 checks passed
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.

2 participants