-
Install Node.js (version 22 or later)
-
Create a Google account or be able to log in to an existing one
-
Log into the Google Cloud Console and create a project or locate an existing project and record the project ID for use in a later step
-
Run this command in your terminal to log in with the Google Cloud CLI:
gcloud auth application-default login
-
Install the BigQuery ADBC driver:
dbc install bigquery
-
Install dependencies:
npm --prefix .. install
-
Customize the script
main.jsas needed- Change the connection arguments in
databaseOptions- Change the value of
adbc.bigquery.sql.project_idto match the project ID you recorded in the earlier step - Change the value of
adbc.bigquery.sql.dataset_id, or keep it to use the public Shakespeare dataset
- Change the value of
- If you changed the dataset, also change the SQL SELECT statement in
conn.query()
- Change the connection arguments in
-
Run the script:
Node.js:
node main.js
Bun:
bun run main.js
Deno:
deno run --allow-ffi --allow-env main.js