I can create native and external tables, as well as views in BigQuery using Deployment Manager, however, there doesn't seem to be any way to create a materialized view. Page at: https://cloud.google.com/bigquery/docs/materialized-views-intro says its still in beta - is it typical for GCP beta features to have no support in Deployment Manager?
Is there a workaround for this? Only thing I can think of is using a Job resource https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert and specifying a DDL query like: CREATE MATERIALIZED VIEW ...
but I don't think Deployment Manager will track and manage the resource correctly.
Edit: for anyone else, this works even though not documented:
- name: test-mv
type: bigquery.v2.table
properties:
datasetId: experiments
tableReference:
datasetId: experiments
tableId: test_mv
materializedView:
query: "select test, COUNT(*) as counter from experiments.test group by test"