Feature request : support for BigQuery non incremental materialized view
Closed this issue · 4 comments
otassel commented
We are unable to apply "max_staleness" and "allow_non_incremental_definition" options for BigQuery non incremental materialized views :
config {
type: "view",
materialized: true,
bigquery: {
additionalOptions: {
enable_refresh: "true",
refresh_interval_minutes: "60",
max_staleness = interval "4" hour,
allow_non_incremental_definition = true
}
}
}
Ekrekr commented
Hi Olivier,
Looking at that config, I suspect that compilation is failing because of the missing quotes in max_staleness = interval "4" hour
.
Updating this to:
config {
type: "view",
materialized: true,
bigquery: {
additionalOptions: {
enable_refresh: "true",
refresh_interval_minutes: "60",
max_staleness = `interval "4" hour`,
allow_non_incremental_definition = true
}
}
}
Should fix the issue.
otassel commented
Hi @Ekrekr,
Thanks for the help.
However it doesn't work. I got the following error message : "Invalid shorthand property initializer" when I add :
max_staleness = `interval "4" hour`,
allow_non_incremental_definition = true
Ekrekr commented
Ah, also the equals rather than using colons, allow_non_incremental_definition = true
-> allow_non_incremental_definition: true
.
config {
type: "view",
materialized: true,
bigquery: {
additionalOptions: {
enable_refresh: "true",
refresh_interval_minutes: "60",
max_staleness: 'interval "4" hour',
allow_non_incremental_definition: true
}
}
}
otassel commented
Yes, we're good with your code and double quote on allow_non_incremental_definition value :
additionalOptions: {
enable_refresh: "true",
refresh_interval_minutes: "60",
max_staleness: 'interval "4" hour',
allow_non_incremental_definition: "true"
}
Thanks a lot!