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

[CT-3118] Design Core Changes for Metadata-Driven Freshness #8636

Closed
Tracked by #8316
peterallenwebb opened this issue Sep 12, 2023 · 1 comment
Closed
Tracked by #8316

[CT-3118] Design Core Changes for Metadata-Driven Freshness #8636

peterallenwebb opened this issue Sep 12, 2023 · 1 comment
Assignees
Labels
user docs [docs.getdbt.com] Needs better documentation

Comments

@peterallenwebb
Copy link
Contributor

peterallenwebb commented Sep 12, 2023

We would like to unblock work on the adapter changes necessary for supporting metadata-driven freshness checks. This will allow us to move forward more rapidly and in parallel with core and adapter implementations. To do so, we need to review the existing interface between core and adapters, as it relates to source freshness checks, and then specify a concrete set of interface changes that will allow core and adapters to work together to determine source freshness via metadata when a supporting mechanism is available in the DWH.

Acceptance Criteria

  • A written design document, describing in detail any adapter changes which will be necessary to support source freshness via metadata mechanisms.
  • The design should include complete details of any new macros that are needed, or changes to the adapter Python class implementations which are needed to support metadata-driven freshness.
  • The design should be specific and detailed enough to provide, at least in theory, all the information needed for adapter maintainers and core engineers to work together in parallel to complete changes, without further engineering design of the interface.
@peterallenwebb peterallenwebb added the user docs [docs.getdbt.com] Needs better documentation label Sep 12, 2023
@github-actions github-actions bot changed the title Design Core Changes for Metadata-Driven Freshness [CT-3118] Design Core Changes for Metadata-Driven Freshness Sep 12, 2023
@peterallenwebb
Copy link
Contributor Author

peterallenwebb commented Sep 22, 2023

There are only two adapter-related changes that will be necessary to support this work.

  1. We will add a new static boolean property to the base adapter called METADATA_FRESHNESS_SUPPORT. It will default to False.
  2. When an adapter implementation overrides this property and sets it to True, and the user has requested that freshness for a source be determined via metadata, dbt-core will look for a macro called collect_freshness_via_metadata(sources). The new macro will accept a List[BaseRelation] and return source, timestamp for the most recent modification of each relation.

Implementation will be done in #7012.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user docs [docs.getdbt.com] Needs better documentation
Projects
None yet
Development

No branches or pull requests

1 participant