我想编写一个 Python 连接器,用于将 Google Drive(共享驱动器)上新添加的 CSV 移动到 BigQuery。
例如从 GC Storage 可以很容易地创建自动数据流,但不确定如何连接到 Google Drive API(共享驱动器)、搜索新添加的 CSV(在许多目录中)并将它们添加为表格到 BigQuery。
答案 0 :(得分:1)
我认为无法在 BigQuery 中搜索新添加的 CSV 和目录。如果您查看 the documentation for querying Google Drive in BigQuery,您会发现您需要指定 Drive URI 来查询 Google Drive 中的表,该表对于每个文件都是唯一的。
不过,您可以使用 Google Drive 中的 AppScript 来完成此操作。查看 this post 以获取有关如何执行此操作的教程。