-
Create a Google account or be able to log in to an existing one
-
Log into the Google Cloud Console and create 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 --level user bigquery
-
Customize the C++ program
main.cppas needed- Change the connection arguments in the
AdbcDatabaseSetOption()calls- Change the value of the
adbc.bigquery.sql.project_idargument to 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 the
- If you changed the dataset, also change the SQL SELECT statement in
AdbcStatementSetSqlQuery()
- Change the connection arguments in the
-
Build and run the C++ program:
Using Make:
pixi run make ./bigquery_demo
Or using CMake:
pixi run cmake -B build pixi run cmake --build build ./build/bigquery_demo
-
Clean build artifacts:
Using Make:
pixi run make clean
Using CMake:
rm -rf build