Batch Address Cleanup — One Million Records
Problem: One million customer addresses. Coordinates, normalized form, confidence. Once.The pipeline
Schema
Stage 1 — preparation
Stage 2 — chunk and queue
Stage 3 — poll, and the three codes that are not errors
Stage 4 — partial success and the confidence threshold
Stage 5 — monitoring
Nobody is watching a nightly job. Instrument it as if it will fail at 3am, because it will.
Webhooks exist in beta, with placeholders like
${JOB_ID} and ${JOB_STATUS}. If your pipeline’s correctness depends on a webhook arriving, build the polling fallback anyway.
Stage 6 — export, and the steady state
The end state: every address has coordinates, a normalized form, a confidence score, and a timestamp.New addresses arrive at a trickle and are geocoded in real time. The batch job runs once, at migration, and then rarely. On the second run,
WHERE geocoded_at IS NULL returns almost nothing.Architect the pipeline for the backfill. It will spend its life doing very little.Common mistakes
Not deduplicating. Paying for repetition. Not normalizing before deduplicating. Catches only exact matches. Treating Batch API as a bulk endpoint. It is a job lifecycle. Losing the job ID on restart. Full rebill. Retrying204. Zero errors.
Aggressively retrying 404. The job has not finished.
Hammering after 429.
Assuming all-or-nothing. Read /errors. Handle partial success.
Never deleting jobs. They accumulate.
Loading a million results into memory. Stream.
Persisting low-confidence matches as truth.
A time-based TTL.
Not writing results into a durable cache. You will do this again next quarter, and pay again.
Onboarding jobs starving nightly enrichment. Concurrency is per-contract. Prioritize.
Related
High-Volume Geocoding
Queues, idempotency, and what to monitor.
Caching Geocoding Results
Normalization, invalidation, and the privacy question.
Batch Geocoding
The single-job lifecycle in isolation.
Address Validation
Why geocoding and deliverability are different products.
HERE documentation
Need production HERE API keys or implementation support? Placematic is an official HERE Technologies reseller and implementation partner. Talk to us.