dbt-labs / dbt-labs/dbt

[Adaptive Job] Model freshness spec validation

Open
#11,124 0 comments 0 reactions 0 assignees View on GitHub
engine:v1 type:docs
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### Housekeeping

- [X] I am a maintainer of dbt-core

### Short description

User should not define models that have `build after period` models smaller than all models it depends on. dbt will raise Error during parsing if the follow happens:

example DAG: `model 1` -> `model 3`, `model 2` -> `model 3`

- `model 1`: 2h, `model 2`: 2h, `model 3`: 1 h
- `model 1`: 1h, `model 2`: 2h, `model 3`: 1 h, depends_on: all

For transitory dependencies:
example DAG: `model 1` -> `model 3`, `model 2` -> `model 3`, `model 3` -> `model 4`,
- if `model 1`: 1h, `model 2`: 2h, `model 3`: depends_on: all, then `model 3`'s implied frequency is 2h
- if `model 1`: 1h, `model 2`: 2h, `model 3`: depends_on: any, then `model 3`'s implied frequency is 1h

### Acceptance criteria

Proper error is raised during parsing time.

### Suggested Tests

Various valid and invalid model definitons with proper raise/not raise checked.

### Impact to Other Teams

No

### Will backports be required?

No

### Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.