BigQuery integration
In short
Run SQL queries and read datasets and tables. Connect it on the Integrations page; your app then calls BigQuery through Sapilon without ever holding a Google credential.
Lets your app list the datasets and tables in your Google Cloud projects, read table rows and run SQL queries, billed to the project you name.
Connecting
On the Integrations page choose Connect on BigQuery, sign in to Google and allow access. Under Advanced you can use your own Google OAuth app instead of Sapilon’s.
- Queries are billed to the Google Cloud project you run them in.
- Sapilon’s Google app is still in verification: you may see an “unverified app” screen. Advanced → Bring your own OAuth app avoids it.
What your app can do
Only these requests are available; anything else is refused.
GET /projectsGET /projects/*/datasetsGET /projects/*/datasets/*/tablesGET /projects/*/datasets/*/tables/*GET /projects/*/datasets/*/tables/*/dataPOST /projects/*/queriesGET /projects/*/queries/*
How the agent uses it
Use integrations.request('bigquery', …); paths are relative to https://bigquery.googleapis.com/bigquery/v2.
GET /projects,GET /projects/{p}/datasets,GET /projects/{p}/datasets/{d}/tables,GET /projects/{p}/datasets/{d}/tables/{t}(schema).GET /projects/{p}/datasets/{d}/tables/{t}/data— rows,query: { maxResults: '100' }.POST /projects/{p}/queries— Example:{ method: 'POST', path: '/projects/acme-data/queries', body: { query: 'SELECT country, COUNT(*) n FROM shop.orders GROUP BY 1', useLegacySql: false, timeoutMs: 20000, location: 'EU' } }. IfjobCompleteis false, pollGET /projects/{p}/queries/{jobId}(query: { location: 'EU' }).
Rows come back as rows[].f[].v, in the order of schema.fields. Use parameterMode: 'NAMED' and queryParameters for values, never string concatenation.
More from Google: https://cloud.google.com/bigquery/docs/reference/rest