Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request : support for BigQuery non incremental materialized view #1599

Closed
otassel opened this issue Dec 3, 2023 · 4 comments
Closed

Comments

@otassel
Copy link

otassel commented Dec 3, 2023

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
Copy link
Contributor

Ekrekr commented Apr 16, 2024

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.

@Ekrekr Ekrekr closed this as completed Apr 16, 2024
@otassel
Copy link
Author

otassel commented Apr 19, 2024

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
Copy link
Contributor

Ekrekr commented Apr 19, 2024

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
Copy link
Author

otassel commented Apr 19, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants