Getting started
This walks through the shortest path from “I have a warehouse” to “I ran a query.”
datahashi is split into two planes, at two hosts:
- Control plane (
api.datahashi.com) — your workspace, connections, models, and API keys. This is what the console talks to. - Data (query) plane (
engine.datahashi.com) — where queries actually run, over REST or MCP.
1. Create a workspace
Section titled “1. Create a workspace”Sign in at the console and create a workspace (called an org in the API). A workspace is the isolation boundary for your sources, models, and API keys — nothing crosses between workspaces.
2. Connect a data source
Section titled “2. Connect a data source”Connect the warehouse your models will query — Snowflake, BigQuery, Postgres, MySQL, or DuckDB. datahashi stores the connection’s address and credential; it never widens the access that credential already grants, and row-level security and cost limits are layered on top server-side. You can connect more than one source — each semantic model binds to exactly one.
3. Write a semantic model
Section titled “3. Write a semantic model”A model is YAML: entities (your business nouns), dimensions and measures on those entities, and metrics built from measures. See Write your first model for a full walkthrough, or the semantic model glossary for the vocabulary first.
4. Mint an API key
Section titled “4. Mint an API key”From your workspace, mint an API key (POST /v1/orgs/{orgId}/api-keys on the control plane).
Every key is scoped to a mode:
- governed — the default. Consumers see named metrics and curated views only.
- explore — additionally exposes raw measures and dimensions across the join graph, for internal tooling and analysts.
The key is a bearer token, shown exactly once — store it somewhere safe. You can revoke or rotate it later without disrupting your other keys.
5. Query it
Section titled “5. Query it”Send the key as a bearer token to the data plane:
curl https://engine.datahashi.com/v1/query \ -H "Authorization: Bearer $DATAHASHI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "metrics": ["avg_order_value"], "dimensions": [{ "name": "region" }], "order": [{ "ref": "region" }], "limit": 100 }'See Query the API for the full request/response shape, or Use with an LLM agent to wire the same credential up over MCP instead.