[英]Native Table creation on top of GCS failed in Bigquery
I tried to create a Big query native table on top of GCS bucket.我试图在 GCS 存储桶之上创建一个大查询本机表。 The native table creation works, when the table is created from the UI, But when I tried to run DDL for creating a native table on top of GCS it Failed当从 UI 创建表时,本机表创建有效,但是当我尝试运行 DDL 以在 GCS 之上创建本机表时失败
Below is the query used and error produced:以下是使用的查询和产生的错误:
create table sample_ds_001.native
options ( format='csv',uris=["gs://test-bucket-003/File_Folder/sample.txt"] )创建表sample_ds_001.native
选项 ( format='csv',uris=["gs://test-bucket-003/File_Folder/sample.txt"] )
Error: Unknown option: format at [4:3]错误:未知选项:[4:3] 处的格式
You can create an external table for your requirement using the csv file stored in the gcs bucket, below query can be considered:您可以使用存储在 gcs 存储桶中的 csv 文件为您的要求创建一个外部表,可以考虑以下查询:
Create EXTERNAL table `project-id.dataset.table`
options (format='csv' ,uris=["gs://file-location.csv"])
CSV Data: CSV 资料:
A,B,C,D,E,F,G
47803,000000000020030263,629,785,2021-01-12 23:26:37,986,2022-01-12 23:26:37
Output: Output:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.