Repository navigation
v0.17.0
This release adds five drivers. Each one speaks the HTTP API of a hosted service with JSON, uses the standard library, and needs no binary encoding.
New drivers
databricksreads the SQL Statement Execution API with the formatJSON_ARRAYand the dispositionINLINE. The DSN isdatabricks://token:<pat>@host/<warehouse-id>?catalog=&schema=. A result that the server cuts, or that has more than one chunk, is an error. The server gives timestamps with 3 fraction digits.bigqueryreads the REST API of BigQuery. The DSN isbigquery://project/dataset?credential_file=/path/key.json. It supports the hosted service and the community emulatorbigquery-0.8.1. A JSON null and a SQL NULL are bothnil, and a STRUCT is amap[string]any.athenareads the JSON API of Athena and signs each request with Signature Version 4. The DSN isathena://key:secret@athena.<region>.amazonaws.com/<database>?workgroup=&output=s3://.... It runs one statement for each request, and it has no transactions.cosmosreads documents from one container of Azure Cosmos DB over its REST API. The DSN iscosmos://x:<key>@host/<db>/<container>, and the master key is the password. It reads only:Execreturns an error. A query that the gateway cannot serve across partitions returns its HTTP 400, so a caller names the partition key. It also answers read-only catalog statements, such asSELECT * FROM "$containers" WHERE database = 'db', whichdbmetauses.spannerreads and writes through the REST API of Cloud Spanner, and it never speaks gRPC. The DSN isspanner:///project/instance/database?credential_file=/path/key.json, and an emulator form isspanner://localhost:9020/p/i/d(the driver reads the emulator of Google, and the first live run on thedbmetaemulator comes next). It reads every result withexecuteStreamingSql, and it runs DDL as a long-running operation.
What a consumer must do
dburl points the schemes databricks, bigquery, athena, cosmos and spanner at these packages. usql can replace the heavier clients that it imports today. dbmeta reads the catalog of Cosmos DB through the statements of the cosmos driver.
Other changes
- The recorder gains
"auth": "none","auth": "cosmos"and the flag-insecure. A run for one release no longer deletes the files of another release that has the same prefix. - Rule 4 of
AGENTS.mdnames the BigQuery query, the Cosmos DB query, the Athena query and the Spanner transaction. - Decisions D184 to D195 record the targets and the answers for each driver.
Tests
CI passed all 45 jobs on the tagged commit. The tests of large results now measure the growth of the heap with dbimptest.HeapGauge, so they no longer fail when many packages run at once.
The integration tests of all five drivers passed on the live services: a free Databricks workspace, a BigQuery project and its emulator, an Athena account with a Lambda connector, a Cosmos DB account and its emulator, and a Spanner free instance. The hosted drivers run no integration test in CI, because CI holds no secret for them. CI runs BigQuery and Cosmos DB on their emulators.