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

Allow configuring the format of EventTimeFilter #893

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

logicoffee
Copy link

@logicoffee logicoffee commented Mar 8, 2025

ref: dbt-labs/dbt-core#11331
docs dbt-labs/docs.getdbt.com/#

Problem

Currently, EventTimeFilter is formatted as YYYY-MM-DD HH:MM:SS+00:00. However this format is not suitable for the following cases:

  • referencing tables where event_time isn't of type timestamp (especially in BigQuery).
  • referencing sharded tables (especially in BigQuery).
    • Daily sharded tables are usually have a suffix like 'YYYYMMDD'.
    • It's better to filter referenced tables using _table_suffix > 'YYYY-MM-DD'.

Solution

Added format configuration to EventTimeFilter.
Interface will be updated by dbt-labs/dbt-core#11376.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@cla-bot cla-bot bot added the cla:yes The PR author has signed the CLA label Mar 8, 2025
@cla-bot cla-bot bot temporarily deployed to dbt-postgres March 8, 2025 10:35 Inactive
@cla-bot cla-bot bot temporarily deployed to dbt-athena March 8, 2025 10:35 Inactive
@cla-bot cla-bot bot temporarily deployed to dbt-bigquery March 8, 2025 10:35 Inactive
@cla-bot cla-bot bot temporarily deployed to dbt-redshift March 8, 2025 10:35 Inactive
@cla-bot cla-bot bot temporarily deployed to dbt-snowflake March 8, 2025 10:35 Inactive
Copy link
Contributor

github-actions bot commented Mar 8, 2025

Thank you for your pull request! We could not find a changelog entry for this change in the dbt-bigquery package. For details on how to document a change, see the Contributing Guide.

@logicoffee logicoffee marked this pull request as ready for review March 8, 2025 11:12
@logicoffee logicoffee requested a review from a team as a code owner March 8, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes The PR author has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant