Skip to content

BigQuery: Support CREATE SNAPSHOT TABLE statement #5778

@kzosabe

Description

@kzosabe

Search before asking

  • I searched the issues and found no similar issues.

What Happened

Currently, sqlfluff does not support BigQuery's CREATE SNAPSHOT TABLE statement.
When we execute sqlfluff to any BigQuery SQL contains that statement, a parse error occurs.

Expected Behaviour

Any BigQuery SQL containing CREATE SNAPSHOT TABLE statement can be parsed successfully.

Observed Behaviour

A parse error occurs.

How to reproduce

It can be reproduced by parsing SQL like the following.

CREATE SNAPSHOT TABLE `example-project.example_dataset.example_table_snapshot_20240101`
CLONE `example-project.example_dataset.example_table`;

Result:

L:   1 | P:   1 |  PRS | Line 1, Position 1: Found unparsable section: 'CREATE SNAPSHOT

Dialect

BigQuery

Version

3.0.4 with Python 3.8

Configuration

Can be reproduced with default settings

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bigqueryIssues relating to the BigQuery dialectbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions