You will need:
- To clone bigquery_fdw on your computer
- To create a "Service account" with the correct permissions
git clone https://github.com/gabfl/bigquery_fdw.git
docker run \
-v ~/path/to/bigquery_fdw:/opt/bigquery_fdw \
-v ~/path/to/key.json:/opt/key/key.json \
-ti gabfl/bigquery_fdw
pip3 install .
su postgres -c 'psql -f sample_sql/setup.sql -d fdw'
su postgres -c 'psql -f sample_sql/query.sql -d fdw'
pgcli -U super fdw
fdw> SELECT * FROM usa_names WHERE year=2017 AND number>1000 LIMIT 5;
+---------+----------+--------+----------+----------+
| state | gender | year | name | number |
|---------+----------+--------+----------+----------|
| CA | F | 2017 | Abigail | 1536 |
| CA | F | 2017 | Amelia | 1069 |
| CA | F | 2017 | Penelope | 1084 |
| CA | F | 2017 | Mia | 2588 |
| CA | F | 2017 | Sophia | 2430 |
+---------+----------+--------+----------+----------+
SELECT 5
Time: 3.992s (3 seconds)
The docker images comes with:
- PostgreSQL 14 installed
- Multicorn installed and compiled
- All the packages required by bigquery_fdw
- The setup.sql file comes pre-loaded with the foreign table
bigquery-public-data.usa_names.usa_1910_current
to test queries.