Commit 9a9391e
authored
Add max operator to get_relation_last_modified macro (#234)
### Summary
Metadata freshness checks were not working properly if `dbt source
freshness` was ran without using the `loaded_at_field` keyword. This is
because we were not reducing the amount of results to the max
commited_at value in our metadata select statement.
### Description
Added the max operator as suggested by @KingLommel. Also fixed the
relevant test to include more than one snapshot.
### Changelog
- [x] Added a summary of what this PR accomplishes to CHANGELOG.md
### Related Issue
#2291 parent 8a295da commit 9a9391e
3 files changed
Lines changed: 7 additions & 3 deletions
File tree
- dbt/include/dremio/macros/adapters
- tests/functional/adapter/relation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
0 commit comments