我们如何将文件夹下的文件从Google Storage加载到Big Query中? [英] How can we load files under folder into Big Query from Google Storage?
问题描述
我在Google存储中有一个文件和子目录的文件夹.想要使用模式将这个文件夹下的所有文件上传到bqdataset.bqdatatable中.
I have a folder of files and subdirectories in the google storage. Want to upload all the files under this folder into bqdataset.bqdatatable using a schema.
如果我指定一个文件,它会成功上传该文件,但是在提供文件夹路径时,它无法做到这一点.
If I specify a single file it successfully uploads the file but while giving a folder path it is unable to do that.
请告知.
致谢.
推荐答案
它必须有效!您应该在下方将其用作来源
It must work! You should use below as a source
gs://your_bucket/your_folder/*
当然,假设所有文件都具有相同的架构(还应该提供该架构)然后将文件夹加载到一张表中
of course assuming all files have the same schema (which you should also provide) and you load your folder into one table
它既可以使用BigQuery UI也可以通过API编程工作 https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.load
it works both using BigQuery UI or programmatically with API https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.load
这篇关于我们如何将文件夹下的文件从Google Storage加载到Big Query中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!