BigQuery:载入Excel档案 [英] BigQuery: loading excel file
问题描述
有什么方法可以将直接excel文件加载到BigQuery中,而不是转换为CSV.
Is there any way we can load direct excel file into BigQuery, instead of converting to CSV.
我每天都以excel格式获取文件,并且需要加载到BigQuery中.现在手动将其转换为CSV并加载到BigQuery中.
I get the files every days in excel format and need to load into BigQuery. Right now converting into CSV manually and loading into BigQuery.
计划安排作业.
如果无法将excel文件直接加载到BigQuery中,那么在加载到BigQuery中之前,我需要编写一个过程(Python)将其转换为CSV.
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.
请让我知道是否还有更好的选择.
Please let me know if any better options are there.
谢谢
推荐答案
我认为您只需单击几下就可以实现以上目的,而无需任何代码. 您需要使用Google云端硬盘和外部(联合)表.
I think you could achieve above in a few clicks, without any code. You need to use Google Drive and external (federated) tables.
1) You could upload manually you excel files to Google Drive or synchronise them
2)在Google云端硬盘设置中找到:
2) In Google Drive Settings find:
"**Convert uploads** [x] Convert uploaded files to Google Docs editor format"
并检查它.
要访问以上选项,请访问 https://drive.google.com/drive/my -drive ,单击齿轮设置"图标,然后选择设置".
To access above option go to https://drive.google.com/drive/my-drive, click on the Gear settings icon and then choose Settings.
现在,您可以通过Big Query访问excel文件
Now you excel files will be accessible by Big Query
3)最后一部分: https://cloud .google.com/bigquery/external-data-drive 您可以通过URI访问Excel文件: https://cloud.google .com/bigquery/external-data-drive#drive-uri ,然后使用上面的uri手动创建表格.
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.
您也可以通过API进行最后一步.
You could do last step also by API.
这篇关于BigQuery:载入Excel档案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!