# Data warehouse enrichment with Dizo

> Send people and company keys from your warehouse in batch jobs of up to 10,000, get JSONL back on a signed webhook, and merge on stable Dizo ids.

**For:** Data engineers, analytics engineers and RevOps teams who treat the warehouse as the source of truth for customer and prospect data.

**The problem:** When each tool enriches its own copy of a record, the CRM, the marketing platform and the BI layer disagree about the same person, and you pay for the same lookup several times.

## Workflow
1. **Quote and submit** — Post up to 10,000 items to `POST /v1/batch` with `format: "jsonl"`. Send `dry_run: true` first, then the real job with `max_credits` and an `Idempotency-Key`. (`POST /v1/batch`, Same as each item)
2. **Wait for the webhook** — A signed `batch.completed` event arrives when the job finishes. Verify the `Dizo-Signature` header before acting on it. (`POST /v1/webhooks`, Free)
3. **Fetch and load** — `GET /v1/batch/{id}` returns `hits`, `credits_used` and a `results_url`. Results stay available for 7 days. (`GET /v1/batch/{id}`, Free)
4. **Keep it fresh** — Put enriched people on a job-change watchlist and re-enrich only the records that changed. (`POST /v1/signals/watch`, 1 credit / change)

```
# 1. Export a chunk of keys from the warehouse
SELECT email FROM crm.contacts WHERE dizo_person_id IS NULL LIMIT 10000;
# 2. Enrich
POST /v1/batch {"endpoint": "/v1/people/enrich", "items": [{"email": "..."}, ...],
                "format": "jsonl", "webhook_url": "https://etl.example.com/dizo", "max_credits": 20000}
→ { "id": "bat_3Jx8", "status": "queued", "quote": {"credits_max": 20000} }
# 3. On batch.completed
GET /v1/batch/bat_3Jx8 → status completed, hits 7,520, results_url .../bat_3Jx8.jsonl
# 4. Load JSONL into staging, MERGE INTO contacts ON dizo_person_id
```

## Outcomes
- One enriched record per person and company, shared by every tool
- Stable Dizo ids as join keys across systems
- Async jobs that fit existing ETL schedules
- Incremental refreshes instead of full re-runs

## Example cost
| Step | Quantity | Credits each | Credits |
|---|---|---|---|
| Company enrich 50,000 account domains (≈90% matched) | 45,000 | 1 | 45,000 |
| Person enrich 40,000 contacts (≈75% matched) | 30,000 | 2 | 60,000 |
| Monthly new contacts enriched (≈75% of 5,000) | 3,750 | 2 | 7,500 |
| Job changes detected per month | 1,000 | 1 | 1,000 |
| **Total** | | | **113,500** |

That is $2,838 at list price or $1,135 at the highest volume tier.

## Products used
- [Bulk Enrichment](https://dizo.ai/products/bulk-enrichment-api.md)
- [Enrichment API](https://dizo.ai/products/enrichment-api.md)
- [Job Change & Monitor API](https://dizo.ai/products/job-change-api.md)

## FAQ
### How big can a batch job be?
Up to 10,000 lookups per job. Split larger tables into chunks and submit several jobs; each item is billed at the underlying endpoint's rate, and misses are still free.

### What format do results come in?
JSONL or CSV, set with `format`. JSONL keeps nested fields such as history and technologies intact, which suits warehouse JSON columns.

### Can Dizo deliver whole datasets to my warehouse?
For licensed bulk delivery, Dizo's enterprise team can deliver full or filtered datasets as CSV, Parquet or JSONL to destinations such as S3, GCS, Azure Blob, Snowflake or SFTP. Email sales@dizo.ai.


## The job: enrich once, centrally, and share the result

Many companies now treat the data warehouse as the place where customer and prospect data is assembled. The CRM, the marketing platform, the product database and the billing system all land there, get modelled into clean tables, and flow back out to operational tools. Enrichment fits naturally into that pattern, but it is often done in the wrong place. The CRM has one enrichment integration, the marketing tool has another, and a spreadsheet somewhere has a third. The same person ends up with three different titles and you pay for the lookup three times.

Warehouse enrichment moves the work to the centre. You export the keys you have, such as emails, profile URLs or company domains, from a warehouse table, enrich them in batch jobs, load the results into a staging table, and merge them into your models. Downstream tools then read enriched fields from the warehouse rather than enriching on their own. The CRM, the BI layer and your scoring model all see the same title, the same headcount and the same Dizo id.

## Why the batch API fits warehouse pipelines

Warehouse pipelines are scheduled and set-based. They process thousands of rows at a time, tolerate latency in minutes rather than milliseconds, and need results in a file format that loads cleanly. The [batch endpoint](/docs/batch) matches that shape. A job takes up to 10,000 lookups against any lookup endpoint, runs asynchronously, notifies you on completion, and returns results as JSONL or CSV. Each item is billed at the underlying endpoint's rate under the same rules, so misses are still free.

[JSONL](/glossary/jsonl), one JSON object per line, is usually the better choice for a warehouse. Nested fields such as `history`, `technologies` and `location` stay intact, and most warehouses can load newline-delimited JSON into a table with a JSON or variant column. Check your warehouse's own documentation for the exact loading command and options.

## Step 1: export keys and quote the job

Write a query that selects the rows that need enrichment, typically records with no Dizo id yet, or records whose enrichment is older than your refresh window. Chunk the result into groups of up to 10,000 and turn each row into a request body for the endpoint you want: `{"email": "..."}` for person enrich, `{"domain": "..."}` for company enrich, or `{"profile_url": "..."}` where that is what you hold. Keep a mapping from each submitted input value to your own row id, so you can join results back reliably.

Submit each chunk first with `"dry_run": true`. The response includes a quote with the maximum credits the job could spend, and spends nothing. If the quote fits, resubmit without `dry_run`, with `max_credits` set as a hard ceiling and an `Idempotency-Key` header. Retries with the same key within 24 hours are never charged twice, which matters when an orchestrator retries a failed task.

## Step 2: receive the webhook and fetch results

Register an endpoint once with [`POST /v1/webhooks`](/docs/webhooks) for `batch.completed`, or pass `webhook_url` on each job. Every delivery carries a `Dizo-Signature` header in the form `t=TIMESTAMP,v1=SIGNATURE`, an HMAC-SHA256 computed over the timestamp and body with your signing secret. Verify it before trusting the event. Deliveries are retried with backoff for 24 hours if your endpoint is down, so make the handler idempotent.

When the event arrives, call [`GET /v1/batch/{id}`](/docs/batch-get). It is free and returns `status`, `hits`, `credits_used` and a `results_url`. Download the file and load it into a staging table. Results stay available for 7 days, so a pipeline that fails over a weekend still has time to recover. If you prefer polling to webhooks, poll the same endpoint on a schedule; it costs nothing.

## Step 3: merge on stable ids

Each person enrich result includes a stable Dizo person `id`, and company records carry a stable company id and normalised domain. Store them as columns on your contact and account models. They become the join keys that make warehouse enrichment work. Two CRM records that resolve to the same person id are the same person; a contact in the product database and one in the CRM can be linked through the id even when their emails differ.

Merge from staging into your models with explicit rules about which fields Dizo owns. A common pattern is that Dizo fields live in their own columns, such as `dizo_title`, `dizo_seniority` and `dizo_employees`, with an `enriched_at` timestamp, and your modelling layer decides which value to expose downstream. That keeps hand-entered CRM values intact and makes it easy to see where each value came from.

## Step 4: refresh incrementally

Do not re-enrich the whole table on every run. Enrich new rows as they arrive, and refresh old ones on a schedule or when something changes. Put enriched people on a job-change watchlist with `POST /v1/signals/watch`; watching is free and each detected change sends a `signal.job_change` webhook at 1 credit. Land those events in a table and re-enrich only the people who moved.

For companies, a periodic refresh of active accounts is usually enough. Headcount, funding stage and technologies change, but not daily. Choose a refresh window that matches how your teams use the data, and record `enriched_at` so you can always see how fresh a value is.

## The agent version over MCP

Warehouse enrichment is mostly a pipeline job, but agents help at the edges. An analyst can ask an agent connected to the Dizo MCP server to enrich a few hundred rows from a query result for a one-off analysis, using `dizo_batch` with a `dizo_quote` first. A data engineer can ask an agent to write the merge logic for a new field after it inspects a sample of JSONL results.

Keep production pipelines on a service key rather than an agent's key. Give the pipeline a key with `data:read` scope, an allow-list of the batch, batch status, enrich and signals endpoints, and a monthly cap sized to your expected volume. Agents doing exploratory work get their own key with a much smaller cap, so experiments never compete with the nightly job for budget.

## Cost model with worked numbers

Take a hypothetical warehouse with 50,000 account domains and 40,000 contacts. A first backfill of companies at an assumed 90% match rate is 45,000 credits. Person enrich on the contacts at a 75% match rate is 30,000 matches at 2 credits, or 60,000 credits. The backfill totals 105,000 credits. Price depends on each purchase: a single $2,000 purchase is priced at the $0.017 Growth rate and buys about 117,600 credits, enough for the backfill with room to spare, whereas buying at the pay-as-you-go rate would cost $2,625.

Ongoing, enriching 5,000 new contacts a month at the same match rate is 7,500 credits, and 1,000 detected job changes add 1,000 credits, for 8,500 credits a month. An auto-refill of $500 is priced at the $0.021 Builder rate and covers almost three months of that. Set a monthly spend cap so refills can never exceed your budget. The [pricing page](/pricing) lists all tiers.

## Measuring success

Track match rate per job (`hits` divided by items), credits per matched record, and the share of rows in each model with a Dizo id and an `enriched_at` inside your refresh window. Match rate by source table is especially useful: a low rate on one source usually points to dirty keys, such as personal addresses in a work-email column or malformed domains, rather than a data gap.

Downstream, measure consistency. Pick a sample of people and check that the CRM, the marketing platform and your dashboards show the same title and company for each. When warehouse enrichment is working, they agree, because they all read the same columns. Report confirmed bad records through the feedback endpoint so the credits come back and the correction applies at the source.

## Pitfalls and guardrails

Deduplicate before you submit. Sending the same email twice in a batch pays for the same person twice. Filter out rows that already have a recent enrichment, and normalise domains before company lookups. Do not overwrite source-of-truth fields blindly; keep Dizo values in their own columns. Watch the 7-day result window and alert if a completed job has not been loaded within a day or two.

On governance, record which tables hold enriched data and who can query them. Dizo supports GDPR and CCPA data-subject requests and honours opt-outs within 24 hours; your own pipeline should propagate deletions too, by removing records you receive deletion requests for and adding them to your suppression list.

## When to consider bulk delivery instead

Batch enrichment suits keys you already have. If you need a large filtered dataset, such as every company in a set of industries with their firmographics, refreshed weekly, the API is not the only route. Dizo's enterprise offering includes bulk delivery of full or filtered datasets as CSV, Parquet or JSONL to S3, GCS, Azure Blob, Snowflake or SFTP, refreshed monthly or weekly. For volumes above $100,000 a year or data licensing, email sales@dizo.ai.

## Getting started checklist

[Sign up](/signup) for live keys and 250 free credits. Build and test the pipeline against `dz_test_` keys, which return synthetic data and never spend credits.

- Choose the keys and endpoints for people and companies
- Add Dizo id and `enriched_at` columns to your models
- Chunk exports into jobs of up to 10,000 items
- Quote with `dry_run`, then submit with `max_credits` and an `Idempotency-Key`
- Verify webhook signatures and load JSONL into staging
- Refresh incrementally with job-change signals
