Skip to content

Data engineering · Lead scoring

Lead Generation Data Pipeline in Python and SQL

A Python + SQL pipeline that pulls leads from every campaign channel, cleans and de-duplicates them into one golden record per person, scores them, and reports which campaigns bring leads worth calling.

  • In production at Eject Solutions
  • 3,000+ qualified leads

By Adithya Reddy Nalla, Lead AI Engineer in Hyderabad.

Problem

Leads arrive from many channels in many formats: Meta lead ads, Google Ads, LinkedIn, and website, CRM and event forms. The same person often appears several times, fields are inconsistent, and without one view nobody can tell which campaigns bring leads worth calling.

Sales teams trust a short list that is reliably good far more than a long one they must filter themselves.

Approach

  • Extract: one connector layer (connectors.py) lands every channel in a single raw table, recording each lead's source.
  • Clean: Python standardises names, phone numbers and company fields so everything downstream can be trusted.
  • De-duplicate: Python and SQL build one golden record per lead.
  • Score: SQL scores each lead, and the scores roll up into a campaign_performance report that compares channels on lead quality, not just volume.

Tech stack

Pipeline
PythonSQLconnectors.py
Reporting
campaign_performance reportPower BI

Results

  • 3,000+

    Segmented, qualified leads

  • ₹1.4Cr+

    Revenue facilitated within 6 months

  • 4

    Channel groups in one pipeline

The leads supported the number one outreach campaign of the year at Eject Solutions.

Architecture

Lead pipeline: Meta lead ads, Google Ads, LinkedIn and website, CRM and event forms feed 1 Extract (connectors.py, raw_leads), 2 Clean (Python, clean_leads), 3 Dedupe (Python and SQL, golden_leads), 4 Score (SQL, lead_scores), then 5 Report (campaign_performance).Meta adsGoogle AdsLinkedInWeb · CRMExtractconnectors.pyraw_leads0 rowsCleanPythonclean_leads0 rowsDedupePython + SQLgolden_leads0 rowsScoreSQLlead_scores0 rowsReportcampaign_performanceLeads by score tierHotWarmCold12345
Live simulation · illustrative counts

More projects

All projectsAbout Adithya Reddy Nalla