Skip to content
Hands sketching a data flow diagram on paper next to a laptop and a cup of coffee

Blog · Engineering

How we make answers you can trust

Jonas Ek, Data Engineer ·

A look at how Northlight writes, checks and explains every query it runs.

An answer is only useful if you can trust it. That is why every Northlight answer comes with its query, the rows it used and a confidence note. Here is what happens between your question and that answer.

1. Understand the schema

When you connect a source, Northlight reads table and column names, comments and sample values, and builds a map of what your data means. Descriptions you add make that map sharper.

2. Write, then check

Northlight drafts a query and then checks it: are the joins on the right keys, are filters applied to the right time zone, does the result make sense compared with earlier answers?

3. Explain

Finally it writes a short answer and a confidence note. If something was ambiguous, such as two columns that could both mean “signup date”, the note says so and tells you which one it chose.

SELECT date_trunc('week', created_at) AS week, count(*) AS trials
FROM subscriptions
WHERE plan = 'trial'
GROUP BY 1
ORDER BY 1;

You can always edit the query and rerun it. The answer, the chart and the note update together.

Ask Northlight

Answers from our docs, FAQ and pricing

Hi! Ask me anything about Northlight: features, pricing, data sources or security.