Automated Data Acquisition & Processing Pipeline
A Python-driven pipeline supporting business prospecting. It acquires business records, normalizes, deduplicates and validates them, and integrates external APIs, running as command-line batch jobs with execution gates controlling when downstream processing proceeds.
Section 01 describes the production system's architecture in general terms, without production records, campaign configuration, sending infrastructure or operational detail. Sections 02 and 03 cover a separate, independently written demonstration that runs entirely in your browser on fictional records. Its rules are illustrative and are not the production rules.
Production architecture
Stages of the production pipeline, in general terms. Marked stages are illustrated, with simplified rules, by the demonstration.
-
01
Data acquisition
Collects business records from external sources for processing.
-
02
Normalization
illustrated in demoNormalizes key fields, such as email addresses, website domains and company names, so records can be compared consistently.
-
03
Deduplication
illustrated in demoIdentifies duplicate records, within a batch and against previously processed records, and removes them.
-
04
Validation
illustrated in demoApplies filtering rules and third-party verification to determine whether a record proceeds.
-
05
External API integration
Uses external services for data collection and verification.
-
06
Execution gates
Checks required conditions before downstream processing proceeds.
-
07
Batch processing
Runs as command-line batch jobs that take a set of records through the pipeline end to end.
Regression testing
Newer components, such as website qualification and business identity matching, are developed as standalone prototypes with their own regression test suites. The demonstration's logic is separately covered by its own test suite.
Demonstration
An independent, simplified implementation of the normalization, deduplication and validation stages. Fifteen fictional records carry typical defects: inconsistent formatting, duplicates under different spellings, malformed contact details and a suppressed domain. Run each stage in turn, then select a record ID to see what happened to it. The specific rules are listed in section 03.
Select a record ID to see all of its fields, changes and history.
| ID | Business | Phone | Website | Location | Status |
|---|
Output
Processing log
Demonstration rules
Specific to this demonstration. These are not the production pipeline's rules.
- Normalization
- Phone numbers to E.164 (+1, ten digits). Emails trimmed and lowercased. Websites reduced to a bare host. US state names mapped to postal codes. Whitespace collapsed. Cities title-cased; business names title-cased only when entered in all capitals.
- Matching
- Two records match on the same phone number, the same website domain, or the same business name (ignoring case, punctuation and trailing legal suffixes) in the same city.
- Merging
- The earliest record in input order survives. Its empty fields are filled from each duplicate; existing values are never overwritten.
- Validation
- A record is rejected if its business name is missing, a phone number or email is malformed, it has no valid contact channel, its state is not a recognised US state, or its website or email domain is on the suppression list. Every failing rule is reported.
- Data
- Fifteen invented records. Domains use the reserved
.exampleTLD and phone numbers use the fictional 555-01XX range. - Isolation
- Runs entirely in the browser. Nothing is sent over the network or stored, and identical input always produces identical output.
- Omits
- Acquisition, external APIs, execution gates, batch orchestration, and every production rule, threshold and configuration value.
- Source
- engine.js (pipeline logic) · data.js (fictional input)