1. Add the file
Copy the file intodata/ and name it under sources in hatchmark.yaml. The key is the name
metrics use, in lowercase snake_case.
path is relative to hatchmark.yaml. Parquet, JSON, DuckDB and SQLite files and cloud storage work
the same way with their own type; data sources lists every option.
2. Look at the columns
time and amounts as number. A column that reads as text usually holds a stray value, such as
n/a in an amount; fix the export, or read it with a database query that casts it.
3. Ask it a question
build reads.
Use it to confirm the numbers you expect before you define metrics on them.
4. Check the project
5. Or connect a database
A database source names an environment variable that holds the connection string, never the string itself:mysql,sqlserverandbigquerywork the same way; database sources has each connection string.posthogreads the result of a HogQL query in PostHog; see Use PostHog data.queryin place oftableruns oneSELECTin the database, to cast, filter or join first.max_agereuses the local copy of the rows while it is younger than an hour, sodevdoesn’t fetch on every save.checkruns without the variable and only warns that it couldn’t read the columns, so it can run in CI.buildneeds the rows and must run where the database is reachable.