Migration in progress
Numia is migrating its on-chain data warehouse from BigQuery to ObsessionDB (ClickHouse). If you currently consume Numia data via BigQuery, your access remains live during the transition — but new datasets and chains are landing on ObsessionDB first.
This guide walks you through getting access to ObsessionDB and running your first query.
Step 1: Request access
ObsessionDB is provisioned per customer. To request credentials, reach out to the Numia team:
- Email: support@numia.xyz
- Or contact us through our website
Once provisioned, you will receive:
- A ClickHouse host and port (HTTPS interface).
- A username and password scoped to your organization.
- The list of databases (one per chain) you are entitled to read.
Step 2: Connect
ObsessionDB speaks the standard ClickHouse protocol, so any official client works.
clickhouse-client
clickhouse-client \
--host <your-host> \
--port 9440 \
--secure \
--user <your-user> \
--password <your-password>
Python
from clickhouse_connect import get_client
client = get_client(
host="<your-host>",
port=8443,
username="<your-user>",
password="<your-password>",
secure=True,
)
rows = client.query("SELECT 1 AS ok").result_rows
Node.js / TypeScript
import { createClient } from '@clickhouse/client'
const client = createClient({
url: 'https://<your-host>:8443',
username: '<your-user>',
password: '<your-password>',
})
const rs = await client.query({
query: 'SELECT 1 AS ok',
format: 'JSONEachRow',
})
console.log(await rs.json())
Step 3: Explore what’s available
Each integration is scoped to your specific needs, so the exact databases, tables, and columns you have access to depend on what was provisioned for you. To discover what’s there, use ClickHouse’s standard introspection commands:
-- List the databases your user can read
SHOW DATABASES;
-- List tables inside a database
SHOW TABLES FROM <database>;
-- Inspect a table's columns and types
DESCRIBE TABLE <database>.<table>;
Your Numia contact will walk you through the specific datasets prepared for your use case.
Step 4: Run your first query
Once you’ve identified a table and its columns from Step 3, you can run any standard ClickHouse SQL query against it. A simple sanity check that works on any table:
SELECT *
FROM <database>.<table>
LIMIT 10
For a slightly richer example, count rows per day over the last week (replace <timestamp_column> with a DateTime / DateTime64 column from your table):
SELECT
toDate(<timestamp_column>) AS day,
count() AS rows
FROM <database>.<table>
WHERE <timestamp_column> >= now() - INTERVAL 7 DAY
GROUP BY day
ORDER BY day DESC
From here, you can write any analytical query your workload needs — joins, aggregations, window functions, JSON extraction, and so on are all standard ClickHouse SQL.
Next steps
- Reach out to your Numia contact for the specifics of the datasets prepared for your integration.
- See the ClickHouse SQL reference for the full query language.