The problem
Third-party data usually arrives as a mess: different IDs per vendor, free-text countries, and no way to tell what changed since yesterday.
So someone writes a cleanup job, then a dedupe job, then a job to detect changes. Then they maintain all three forever.
Your first week
What it looks like once DataJuice is plugged in:
- Day 1Generate types with
dj types generateand create your tables from the schema. - Day 1Run a bulk export of the segment you care about. Parquet lands in your bucket.
- Day 2Open an SSE stream of
company.updatedevents and apply them as upserts. - Day 3Delete the dedupe job.
company_idis stable across every dataset. - OngoingYour models read one table that's never more than a day old.
The workflow
# Apply the change stream as upserts
for event in dj.stream(types=["company.updated"], last_event_id=checkpoint.load()):
warehouse.upsert("companies", key="company_id", row=event.data.changes_as_row())
checkpoint.save(event.id)dj export companies --industry saas --country US,GB \
--format parquet --to s3://acme-data/datajuice/companies/Datasets you'll use
FAQ
Start with a bulk export (Parquet or CSV) of your segment, then apply the change stream or webhooks as upserts keyed on company_id.
Additive changes ship without notice; breaking changes ship in a new API version with at least 12 months' notice.
Streams are on Pro and above. Bulk export to your bucket is on Scale and Enterprise.