Truncate a table in GBQ

前端 未结 4 910
粉色の甜心
粉色の甜心 2021-02-02 11:21

I am trying to truncate an existing table in GBQ but the below command fails when I run it. Is there any specific command or syntax to do that. I looked into GBQ documentation b

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-02 11:42

    Good news, TRUNCATE TABLE is supported by now: https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement

    TRUNCATE TABLE [[project_name.]dataset_name.]table_name
    

    However, please note that this will not work / is not supported, if a partition filter is required through your table definition.

提交回复
热议问题