问题
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