简体   繁体   English

BigQuery:载入Excel档案

[英]BigQuery: loading excel file

Is there any way we can load direct excel file into BigQuery, instead of converting to CSV. 有什么方法可以将直接excel文件加载到BigQuery中,而不是转换为CSV。

I get the files every days in excel format and need to load into BigQuery. 我每天都以excel格式获取文件,并且需要加载到BigQuery中。 Right now converting into CSV manually and loading into BigQuery. 现在,手动将其转换为CSV并加载到BigQuery中。

Planning to schedule the job. 计划安排工作。

If not possible to load the excel files directly into BigQuery then I need to write a process(Python) to convert into CSV before loading into BigQuery. 如果无法将excel文件直接加载到BigQuery中,那么在加载到BigQuery中之前,我需要编写一个流程(Python)将其转换为CSV。

Please let me know if any better options are there. 请让我知道是否有更好的选择。

Thanks, 谢谢,

I think you could achieve above in a few clicks, without any code. 我认为您只需单击几下即可实现上述目标,而无需任何代码。 You need to use Google Drive and external (federated) tables. 您需要使用Google云端硬盘和外部(联合)表。

1) You could upload manually you excel files to Google Drive or synchronise them 1)您可以将excel文件手动上传到Google云端硬盘或进行同步

2) In Google Drive Settings find: 2)在Google云端硬盘设置中找到:

"**Convert uploads** [x] Convert uploaded files to Google Docs editor format" 

and check it. 并检查一下。

To access above option go to https://drive.google.com/drive/my-drive , click on the Gear settings icon and then choose Settings. 要访问以上选项,请访问https://drive.google.com/drive/my-drive ,单击Gear设置图标,然后选择Settings。

Now you excel files will be accessible by Big Query 现在,您的excel文件将可以通过Big Query访问

3) Last part: https://cloud.google.com/bigquery/external-data-drive You could access you excel file by URI: https://cloud.google.com/bigquery/external-data-drive#drive-uri and then create table manually using above uri. 3)最后一部分: https : //cloud.google.com/bigquery/external-data-drive您可以通过URI访问您的excel文件: https : //cloud.google.com/bigquery/external-data-drive#drive -uri ,然后使用上面的uri 手动创建表

You could do last step also by API. 您也可以通过API执行最后一步。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM