Skip to content

Commit 31bd592

Browse files
anandgupta42claude
andcommitted
test: BigQuery E2E tests — 25 tests against live account
25 E2E tests against a live BigQuery project (diesel-command-384802): - Service Account auth (connect, verify project, reject invalid creds) - Query execution (SELECT, math, strings, timestamps, multi-column) - LIMIT handling (explicit + parameter truncation) - Schema introspection (listSchemas=datasets, listTables, describeTable) - BigQuery-specific (UNNEST, STRUCT, DATE/DATETIME/TIMESTAMP, STRING_AGG, GENERATE_ARRAY) - Adversarial inputs (multi-statement, empty, invalid SQL, non-existent dataset, Unicode, NULL, long column list) Updated docs/docs/drivers.md: BigQuery now marked as E2E tested. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9157fc2 commit 31bd592

5 files changed

Lines changed: 297 additions & 11 deletions

File tree

bun.lock

Lines changed: 40 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/docs/drivers.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Altimate Code connects to 10 databases natively via TypeScript drivers. No Pytho
1515
| SQL Server | `mssql` | Password, Azure AD | ✅ Docker | Uses `tedious` TDS protocol |
1616
| Redshift | `pg` (wire-compat) | Password | ✅ Docker (PG wire) | Uses SVV system views |
1717
| Snowflake | `snowflake-sdk` | Password, Key-Pair (unencrypted + encrypted), OAuth | ✅ Live account | 37 E2E tests, key-pair with passphrase support |
18-
| BigQuery | `@google-cloud/bigquery` | Service Account, ADC | ❌ Needs credentials | REST/gRPC API |
18+
| BigQuery | `@google-cloud/bigquery` | Service Account, ADC | ✅ Live account | 25 E2E tests, UNNEST/STRUCT/DATE types |
1919
| Databricks | `@databricks/sql` | PAT, OAuth | ✅ Live account | 24 E2E tests, Unity Catalog support |
2020
| Oracle | `oracledb` (thin) | Password | ❌ Needs Oracle 12.1+ | Thin mode only, no Instant Client |
2121

@@ -181,10 +181,14 @@ These features work based on SDK documentation but haven't been verified with au
181181
- ❌ OAuth/external browser auth (requires interactive browser)
182182
- ❌ Multi-cluster warehouse auto-scaling
183183

184-
### BigQuery
185-
- Application Default Credentials (ADC)
186-
- Location-specific query execution
187-
- Dry run / cost estimation
184+
### BigQuery (partially tested — 25 E2E tests pass)
185+
- ✅ Service Account JSON key authentication
186+
- ✅ Schema introspection (datasets, tables, columns)
187+
- ✅ BigQuery types (UNNEST, STRUCT, DATE/DATETIME/TIMESTAMP, STRING_AGG)
188+
- ✅ Adversarial inputs (injection blocked, invalid SQL)
189+
- ❌ Application Default Credentials (ADC)
190+
- ❌ Location-specific query execution
191+
- ❌ Dry run / cost estimation
188192

189193
### Databricks (partially tested — 24 E2E tests pass)
190194
- ✅ Personal Access Token (PAT) authentication

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
},
8686
"dependencies": {
8787
"@databricks/sql": "1.13.0",
88+
"@google-cloud/bigquery": "8.1.1",
8889
"@opencode-ai/plugin": "workspace:*",
8990
"@opencode-ai/script": "workspace:*",
9091
"@opencode-ai/sdk": "workspace:*",

packages/drivers/src/bigquery.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type { ConnectionConfig, Connector, ConnectorResult, SchemaColumn } from
77
export async function connect(config: ConnectionConfig): Promise<Connector> {
88
let BigQueryModule: any
99
try {
10-
// @ts-expect-error — optional dependency, loaded at runtime
1110
BigQueryModule = await import("@google-cloud/bigquery")
1211
} catch {
1312
throw new Error(

0 commit comments

Comments
 (0)