I have a partitioned, incremental, model that is configured to require a partition filter when queried. This works perfectly fine (on a daily schedule) until there are zero (0) rows to insert. When that happens I get the following error from BigQuery:
Cannot query over table ***** without a filter over column(s) 'session_date' that can be used for partition elimination at [25:5]
I assume it means that since there are no rows to insert, there are no dates that can be used for the filters. Hence, no filter is used, and the query fails.
Is this a flaw in dbt's incremental models, or can I change something to make it work (all I want is to avoid the error since zero rows is sometimes expected)? I'm using insert_overwrite strategy, which might have something to do with it.