[英]How do you alter the description of a struct column on a BigQuery table?
如果您有一個帶有結構的表並希望 SQL 腳本更改元數據中列的描述? 例如,如果我想將下表中的 Location.Description 從“ Loc Desc ”更改為“ Location Description ”,我需要什么 SQL?
CREATE OR REPLACE TABLE MyDataset.MyTable
(
ID INT64 NOT NULL,
Location STRUCT<ID INT64 OPTIONS(description="Location ID for Event"),
Description STRING OPTIONS(description="Loc Desc")> OPTIONS(description="Event Location Record")
);
我試過這個但它不起作用:
ALTER TABLE MyDataset.MyTable
ALTER COLUMN Location.Description
SET OPTIONS(description="Location Description");
我認為這就是您需要在位置級別更改列的內容
ALTER TABLE MyDataset.MyTable
ALTER COLUMN Location
SET OPTIONS(description="Event Location Record",
fields="ID:INT64:NULLABLE:Location ID for Event,
Description:STRING:NULLABLE:Location Description");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.