When I run the query below on Datafrom, I encounter the following error message despite using ‘even_date’ for partition elimination. Has anyone else experienced this issue and found a solution? This error started occurring today so I think there is something to do with some dataform/bigquery updates recently.
——
reason:“invalidQuery” location:“query” message:“Error validating procedure body (add OPTIONS(strict_mode=false) to suppress): Query error: Query error: Cannot query over table ‘ga_events’ without a filter over column(s) ‘event_date’ that can be used for partition elimination at [8:15]”: invalid argument
config {
type: "incremental"
, schema: "dp_mart"
}
pre_operations {
declare event_date_checkpoint default (
${when(
incremental()
, `select max(event_date) from `
+ self()
+ ` where event_date >= date_sub(current_date(), interval 30 day)`
, `select date('2023-09-01')`
)}
)
}
select
session_id
, event_date
from
${ref("ga_events")}
where
event_date >= event_date_checkpoint
and event_name = "purchase"