Do you need a data warehouse yet? Five signals, and what to build until then
TL;DR. Probably not yet. But you do need what a warehouse gives you, in a smaller form. An AI agent can now read your CRM, billing and product database directly and combine them, so it can look as if you can skip the warehouse. The catch: the agent redoes that combining for every question, and any mistake comes back every time. In our test, all 20 attempts missed one customer in five. So build four small things first: one customer table, matched once, that keeps history; a few checks that the data arrived and agrees; a note saying which tool is right for each fact; and a file saying what each number means. Get a warehouse when the agent's live queries get too slow, or the numbers must run every week with tests.
Why is this hard to answer?
A product marketer at a small startup asked a founder forum whether they need a warehouse. All five replies said yes. None gave a sign to look for or a check to run, and three of the five named a product.
Here is how I think about it. Small teams buy the platform too early and start keeping history too late. The platform can wait. The history cannot, because a value a tool overwrote last month is gone.
Can the agent not just join the tools itself?
It can. The question is whether it should do it for every question.
Picture three tools that disagree about one account, Li Studio: won and owned by Maya in the CRM, cancelled in billing, last seen in the product on 2 October. An agent reading the tools live works out that match again for each question: which field links them, how to treat capitals and spaces, what to do with a customer missing from one tool. Each time costs time and money, a fix has to be repeated in every question, and when a tool renames a field, every question breaks at once. Done once, it is one table, fixed in one place.
Matching is only one job. Someone has to check the data: did today's copy arrive, do two tools contradict each other. Someone has to decide which tool is right for each fact. Someone has to write down what each number means. In my view an agent does none of these by itself, and many tools keep only the current value of some fields, so last month's owner may simply be gone.
Whatever the agent connects to, give it a read-only login. A warehouse also keeps heavy questions off the database your app runs on; until reports run on a schedule, a login with a time limit covers that, as the post on the production database shows.
Our test: should the agent join, or read a table matched once?
I ran this on 27 November 2026 with twelve made-up customers in a CRM export and ten in a billing export. Two billing emails were stored with capitals, as happens when two tools take input differently, and one of them changes the answer. The question: how many customers are won in the CRM and active in billing? The right answer is five.
I asked two open models on Cloudflare Workers AI, Llama 4 Scout and gpt-oss-120b, to write the database query ten times each, with default settings, and ran every query. They saw the table definitions but not the rows, so they could not see the capitals; an agent that first looks at the data may catch this. These are not the models every reader uses. Given the two raw exports, all 20 queries joined on the exact email and returned four: the customer in capitals was lost every time. Given one customers table matched once on the lower-cased email, all 20 returned five.
The agent was not random. It was consistently wrong, in a way nobody would spot from the answer. Twenty runs per case on one question is a direction, not a measurement.
What should you build until then?
In a small database that is not the one your app runs on (such as Postgres):
- Match once: one customer table. One id per customer, with the id each tool uses, and every fact (plan, status, owner, last activity) tagged with its tool and the date it was copied. Copies add rows and never edit old ones.
- Check: three queries each time the data is copied. Did each tool's copy arrive? Is a paying customer missing from the CRM? Do two tools contradict each other?
- Decide what is right: one line per key fact naming the tool that decides, as in the Codd post.
- Write the meaning: a definitions file. What one row is, who is left out, and how "active" and "paying" are counted, as in the post on one definition per metric.
Point the agent at them.
When does a warehouse earn its place?
These five signs are my synthesis, not a measured threshold.
1. Two people, or two agents, get two answers. Failure: sales and finance bring different customer counts, or the agent counts differently from one week to the next. Guardrail: the line naming which tool decides, and one written definition per number. Check: ask the same question in two chats and compare.
2. You need history a tool overwrites. Failure: nobody, person or agent, can say what plan a customer was on last quarter. Guardrail: keep every copy in the customer table, add rows, never edit. Check: ask the agent for one customer's plan three months ago, and where it found it.
3. Nobody notices when the data breaks. Failure: a connection fails or a copy stops, and the agent keeps answering without saying so. Guardrail: the three checks run each time, and a person gets the alert. Check: ask when each tool's data was last refreshed.
4. Live pulls stop keeping up. Failure: questions hit the tools' usage limits or take minutes. Guardrail: copy the data on a schedule into one place built for questions. Check: time a question that needs a full year of billing.
5. The answer must run every week, with tests and permissions. Failure: the board number depends on one person, or one chat, rerun by hand. Guardrail: a scheduled job with checks, and access by role. Check: ask what happens to Monday's number if that person is away.
Signals 1 to 3 say build the small forms above. Signals 4 and 5 say a warehouse starts to pay for itself; one of them is enough.
What changes by stage?
Who reads the data and what a wrong number costs decide this more than company size.
Before launch. Keep raw copies and the history of plan and status.
First paying customers. Connect the agent if you want, read-only, but build the customer table, run the checks and write the two files before you trust its answers about money.
Growing, with a first data person. That person decides, and inherits a matched table with history, running checks and written definitions, which a warehouse can take on day one.
For your data team
For your data team
Show the technical part (1 code block)
This part gets technical. It ran on PostgreSQL 16 on made-up exports, in its own database, not the app's. Load each tool's export into its own table as it arrives, then:
-- Match once: one id per customer, keyed on the lower-cased email.
create table customer_ids (
customer_id serial primary key,
email text unique
);
insert into customer_ids (email)
select distinct lower(email) from (
select email from crm_export
union select email from billing_export
union select email from product_export
) e
on conflict (email) do nothing;
-- Every fact with where it came from and when it was copied. Rows are only added.
create table customer_facts (
customer_id int references customer_ids,
fact text, -- 'plan', 'status', 'owner', 'deal_stage', 'last_active'
value text,
source text, -- 'billing', 'crm', 'product'
valid_from timestamptz -- when the copy saw this value
);
insert into customer_facts
select i.customer_id, 'status', b.status, 'billing', b.exported_at
from billing_export b join customer_ids i on i.email = lower(b.email);
insert into customer_facts
select i.customer_id, 'plan', b.plan, 'billing', b.exported_at
from billing_export b join customer_ids i on i.email = lower(b.email);
insert into customer_facts
select i.customer_id, 'owner', c.owner, 'crm', c.exported_at
from crm_export c join customer_ids i on i.email = lower(c.email);
insert into customer_facts
select i.customer_id, 'deal_stage', c.deal_stage, 'crm', c.exported_at
from crm_export c join customer_ids i on i.email = lower(c.email);
insert into customer_facts
select i.customer_id, 'last_active', p.last_active::text, 'product', p.exported_at
from product_export p join customer_ids i on i.email = lower(p.email);
-- One row per customer as of any date.
select i.email,
max(value) filter (where fact = 'status') as billing_status,
max(value) filter (where fact = 'owner') as crm_owner
from customer_ids i
left join lateral (
select distinct on (fact) fact, value
from customer_facts f
where f.customer_id = i.customer_id and f.valid_from <= '2026-11-01'
order by fact, valid_from desc
) latest on true
group by i.email;
-- Checks each time the data is copied. Each should return no rows, or rows a person looks at.
-- 1. Tools contradict each other: won in the CRM, not active in billing.
with latest as (
select distinct on (customer_id, fact) customer_id, fact, value
from customer_facts order by customer_id, fact, valid_from desc
)
select i.email,
max(value) filter (where fact = 'deal_stage') as crm_stage,
max(value) filter (where fact = 'status') as billing_status
from customer_ids i join latest using (customer_id)
group by i.email
having max(value) filter (where fact = 'deal_stage') = 'won'
and max(value) filter (where fact = 'status') is distinct from 'active';
-- 2. Paying, but unknown to the CRM.
select i.email from customer_ids i
where exists (select 1 from customer_facts f
where f.customer_id = i.customer_id and f.fact = 'status' and f.value = 'active')
and not exists (select 1 from customer_facts f
where f.customer_id = i.customer_id and f.source = 'crm');
-- 3. Did each copy arrive? Alert when last_seen is older than the schedule.
select source, max(valid_from) as last_seen from customer_facts group by source;
-- The copy job can read exports and add rows. It cannot change or delete history.
grant select on crm_export, billing_export, product_export to export_job;
grant select, insert on customer_ids, customer_facts to export_job;
grant usage on sequence customer_ids_customer_id_seq to export_job;
distinct on keeps the newest value of each fact up to the date you ask about (PostgreSQL documentation). valid_from is when the copy saw the value, not when it changed in the tool, so a weekly copy dates a change to within a week. Email is a weak key, for an agent and for this table alike: when one person uses two emails, add a mapping row by hand rather than guessing. In a second test with four made-up customers exported on 1 October and 1 November, the as-of query showed Li active and owned by Avi on 1 October and cancelled and owned by Maya on 1 November; check 1 returned Li, check 2 the paying customer missing from the CRM, and check 3 all three copies from 1 November. An update from the copy job's login failed with "permission denied". One run on made-up data, to show the mechanism.
Check it in 10 minutes
- Write down the last three questions about customers or revenue that mattered.
- For each, note whether it needed more than one tool, last month's values, or both.
- If two needed more than one tool, match once into a customer table this week. If any needed last month's values, start keeping copies today.
- No coding agent and no repository? This step is for you. Keep a monthly export from billing and the CRM in one shared folder with the date in the file name, and write a three-line definition of "customer" in the same folder.
- The person who owns the customer count owns the table, the checks and the two files.
See where your setup stands with the two minute self-check.
Spotted a mistake or a newer source? Tell us and we check it against the source. How we work.
Check your setup in 2 minutesAll postsGet new posts by email