Time-series agregation code duplication prevention⚓
- Status: proposed
- Deciders: Equip de Dades
- Date: 2022-10-06
Technical Story:
Context and Problem Statement⚓
Un dels motius de dbt és reduir code duplication per les agregacions (diaria, setmanal, mensual, trimestral, anual...), com ho podem fer a dbt?
As-is necessitem un model per cada agregació per cada taula final, que no ens evita la duplicació de codi tot perquè cada agregació necessita el seu model
Decision Drivers ⚓
- [driver 1, e.g., a force, facing concern, …]
- [driver 2, e.g., a force, facing concern, …]
- …
Considered Options⚓
- soft-linked macro on every data mart
- just repeat models with macros for aggregations
- use post-hooks to move tables 1
- other stuff
- dbt metrics support!
Decision Outcome⚓
- dbt metrics support (en discussió)
Positive Consequences ⚓
- [e.g., improvement of quality attribute satisfaction, follow-up decisions required, …]
- …
Negative Consequences ⚓
- [e.g., compromising quality attribute, follow-up decisions required, …]
- …
Pros and Cons of the Options ⚓
[option 1]⚓
[example | description | pointer to more information | …]
- Good, because [argument a]
- Good, because [argument b]
- Bad, because [argument c]
- …
[option 2]⚓
[example | description | pointer to more information | …]
- Good, because [argument a]
- Good, because [argument b]
- Bad, because [argument c]
- …
[option 3]⚓
[example | description | pointer to more information | …]
- Good, because [argument a]
- Good, because [argument b]
- Bad, because [argument c]
- …
Links ⚓
- [Link type] [Link to ADR]
- …