brandon
brandon

Reputation: 353

Automatically materialize view from query

I want to automatically materialize a view based on a BigQuery query (all source tables are in BigQuery as well). Is there a lightweight solution for this in google cloud?

Upvotes: 0

Views: 465

Answers (1)

Deviling Master
Deviling Master

Reputation: 3113

BigQuery doesn't support materialized views, here is a feature request and here another one (that you can star to increase visibility)

You can create something from scratch executing a CRON at regular interval that will run a query job with output table as the one you want to produce.

Like with gcloud

bq query --destination_table project.dataset.materialized_view --use_legacy_sql=false --replace "SELECT * FROM `project.dataset.view_name`"

Or with the API as well

Upvotes: 2

Related Questions