Skip to content

feat: Extend view auto-materialization (#307) to the Table API #331

Description

@d-cole

#307 added support for reading BigQuery views by auto-materializing them into a temporary table before reading. That capability is currently exposed only through the DataStream API. The Table API / SQL path does not expose it, so a view referenced through SQL still fails the same way it did before #307.

Users should be able to use the connector in the following way,

CREATE TABLE my_view (
  -- view's schema
) WITH (
  'connector' = 'bigquery',
  'project'   = 'my-project',
  'dataset'   = 'my_dataset',
  'table'     = 'my_view',
  'read.views.enabled'            = 'true',
  'read.views.materialization-project'          = 'temp-project',
  'read.views.materialization-dataset'          = 'temp_dataset',
  'read.views.materialization-expiration-hours' = '6',
  'read.views.billing-project'                  = 'my-billing-project'
);

SELECT * FROM my_view;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions