Different configs for microbatch models to use when the model is performing an increment or a full-refresh #12249
amauryfouville
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I didn't find a related topic.
We are using microbatch models in our dbt project, and one behavior hasn't been optimal so far.
The ideal scenario I have in mind would be to:
One asset of dbt is that it does not execute anything against the Warehouse during the parse, and the parse reads from the models configs. By order of operations, I can't use the Warehouse information for configuring my model, and so this behavior can not easily be achieved.
We've got 3 cases, with not-so-clean approaches to achieve my ideal scenario:
For 1., I can use the flag flags.FULL_REFRESH, and adapt the config, but still I would have a discrepancy between my manifest and the actual run with the flag (different batch_size and lookback).
Note: this interacts badly with what is recommended here: Also, https://docs.getdbt.com/docs/build/incremental-microbatch#full-refresh. --> the batch becomes a year for a single dayto reload
For 3., nothing to do really, this can the default behavior
For 2., I can not do anything really to split the behavior from 3.
And if we can find ways of achieving it, unless it's a super clean approach I missed, it doesn't feel appropriate.
And so the idea would be to define upfront in the configs different batch sizes and look-backs. One would be used when is_incremental() renders false and the other when it would render yes. This way all information would be available in the manifest whatever the state of the Warehouse is, and we would achieve more optimal microbatch runs.
The main impact I could anticipate would be on all products/use-cases consuming the dbt artifacts, and using the lookback and batch_size information.
Beta Was this translation helpful? Give feedback.
All reactions