The problem I’m having
I need to create a date spline from the batch start to to the batch end per batch
The context of why I’m trying to do this
I am working on a model that does per second calculations, we need to do them in 1 hour intervals for query performance.
What I’ve already tried
I tried using the variables the actual macro uses, for example
{{model.config.__dbt_internal_microbatch_event_time_start}}
For example
SELECT TIMEADD('second', seq4() ,{{model.config.__dbt_internal_microbatch_event_time_start}})
FROM TABLE(GENERATOR(ROWCOUNT => 3600)
order by activity_date asc, activity_time asc;
But this does not work just gives me a compilation error. I added a feature request to get official variables for these, in the mean time, how can I access these in my model code?