The ownership split
The dbt project remains responsible for model SQL, dependencies, tests, and artifact construction. Qry is responsible for endpoint identity, scoped authorization, release verification, activation, and serving.
This path is useful when your CI or dbt Cloud job should own warehouse access. Qry receives the publish request and the resulting endpoint artifact; it does not receive the source-warehouse credential.
Add Qry metadata to a model
Declare the endpoint under config.meta.qry in the model that should be
published:
models:
- name: customer_health
config:
materialized: table
meta:
qry:
endpoint: customer-health
path: /customer-health
parameters:
account_id:
column: account_id
type: string
required: true
max_response_rows: 1000
Keep endpoint paths stable. Treat the metadata as part of the API definition and review it alongside the model change.
Publish from a repository or CI job
Install the CLI, authenticate during setup, and initialize the repository:
pipx install get-qry
qry auth login
cd analytics
qry init
Run the normal dbt build, validate the generated artifacts, and publish:
dbt build --target production
qry dbt validate
qry dbt publish
For headless CI, create a scoped deploy token and pass only the Qry API URL and token to the job. Keep warehouse credentials in the dbt environment:
- name: Build dbt models
run: dbt build --target production
- name: Publish Qry endpoints
env:
QRY_API_URL: ${{ vars.QRY_API_URL }}
QRY_DEPLOY_TOKEN: ${{ secrets.QRY_DEPLOY_TOKEN }}
run: qry dbt publish --manifest target/manifest.json --run-results target/run_results.json
Qry verifies the artifact hash, size, schema, row count, and provenance before activating a release. A failed release leaves the last successful snapshot serving.
Call the published endpoint
The result includes the public endpoint URL and key-creation command. Public requests read the active snapshot:
curl "https://api.qry.thedatadavis.com/e/acme/customer-health?account_id=123" \
-H "Authorization: Bearer $QRY_API_KEY"
Use an endpoint-scoped key for a single application, partner, or automation.