简体   繁体   English

Bigquery 中基于 GCS 的本机表创建失败

[英]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.

相关问题 如何将数据从 GCS 导入到 Vertica 原生表 - How to import data from GCS to Vertica native table SQL 数据库到 BigQuery 或 SQL 数据库到 GCS 到 BigQuery - SQL database to Bigquery or SQL database to GCS to BigQuery Bigquery - 更新 Bigquery 外部表的 GCS 路径 - Bigquery - Updating GCS path of Bigquery external tables 将文件名添加到 BigQuery 本机表中的列之一 - Add filename into one of the column in BigQuery native table BigQuery 中的 Bigtable“无法创建表:未找到” - Bigtable in BigQuery "Failed to create table: Not found" 我的 function 缺少什么参数来将表从 BigQuery 提取到 GCS 存储桶? - What parameter is missing from my function to extract a table from BigQuery to a GCS Bucket? 如何在 GCS 中的增量表之上创建 BQ 外部表并仅显示最新快照 - How to create an BQ external table on top of the delta table in GCS and show only latest snapshot 使用通配符选项从 BigQuery 导出到 GCS 时,有没有办法从大表中获取生成的文件列表? - Is there a way to get a list of the files that were generated, from a large table, when exporting from BigQuery to GCS using a wildcard option? 从 GCS 加载_Csv_data 到 Bigquery - Load_Csv_data from GCS to Bigquery 如何从 GCS 将数据加载到 BigQuery(使用 load_table_from_uri 或 load_table_from_dataframe)而不复制 BQ 表中的现有数据 - how to load data into BigQuery from GCS (using load_table_from_uri or load_table_from_dataframe) without duplicating existing data in the BQ table
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM