Export query results from BigQuery to Postgres

江枫思渺然 提交于 2021-02-07 19:59:52

问题


I am trying to export the results of a query in BigQuery, and get the data into Postgres. The data may be as much 250 million record, ~26Gb.

Option 1:

Save query results to a temp table Export table to csv(s) Bulk upsert to postgres

(This will be slow)

Option 2:

Somehow get the two DBs to speak directly I don't know if this is possible

Thank you for any information!!!


回答1:


This BigQuery Foreign Data Wrapper for postgreSQL allows you to query BigQuery directly from within PostgreSQL. Using this and a SELECT INTO statement should allow you to efficiently and directly copy from BigQuery to PostgreSQL.



来源:https://stackoverflow.com/questions/52745594/export-query-results-from-bigquery-to-postgres

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!