Home  /  Blog

From the workbench

Data Pipeline for AI: Modernize Before You Integrate

A data pipeline for AI is the set of jobs that collects your business data, cleans it, keeps it current and hands it to a model in a shape the model can use. When an AI project stalls, the model is rarely the reason; the pipeline underneath it is. If your data lives in silos, arrives in nightly exports and nobody can say what a column means, modernize the pipeline first and integrate AI second.

60%of AI projects without AI-ready datawill be abandoned through 2026, Gartner predicts
63%of organizationslack, or are unsure they have, the right data practices for AI
30%+of generative AI projectsabandoned after proof of concept by end of 2025, Gartner predicts

Sources: Gartner, February 2025 (survey of 1,203 data management leaders, July 2024) and Gartner, July 2024, which names poor data quality first among the reasons, alongside inadequate risk controls, escalating costs and unclear business value.

Server racks lit green in a dark data center
Photo by Tyler on Unsplash

Why Is Data Quality Important for AI Systems?

A lot of what gets called an AI problem is really a data problem. The budget is there, the use case is real and leadership wants it. What is missing is a pipeline that can feed the thing they want to build. That is not a failure of vision. It is a failure of infrastructure, and it is one of the most fixable ones in software.

Legacy data infrastructure fails quietly

Legacy data infrastructure rarely fails dramatically. Reports run a little slow. A support rep cannot see a customer’s full account history on one screen. An analyst spends the morning cleaning an export before running a single query. Nobody escalates any of it, because everyone has learned to work around it.

A person working around bad data applies judgment: they know, for example, that the “status” column was repurposed in 2019 and that the West region double-counts returns. A model has none of that context. It learns the workaround-free version of your data, errors included, and repeats those errors at scale and with confidence. That is why companies either abandon AI projects before they ship, or ship something that underperforms and blame the model when the problem was always upstream.

What AI asks of your data that reports never did

Most existing pipelines were built to be analytics-ready: good enough for a monthly dashboard a human reads and sanity-checks. AI-ready data is a different standard. Gartner puts it plainly: the data “must be representative of the use case, of every pattern, errors, outliers and unexpected emergence that is needed to train or run the AI model,” and “if the data has issues, then the data is not ready for AI” (Gartner, 2025).

Analytics-ready data

built for people reading reports

Freshness
Nightly or weekly batch is fine
Shape
Aggregates and summary tables
Content
Structured rows only
Outliers
Often filtered out to make charts readable
Meaning
Lives in analysts’ heads
Consumer
A person who can spot nonsense

AI-ready data

built for models acting on it

Freshness
As current as the decision it drives
Shape
Row-level history with timestamps
Content
Structured and unstructured together
Outliers
Kept and labeled; the model needs them
Meaning
Written down as metadata and contracts
Consumer
A model that will not question it
A model is only as good as the pipeline that feeds it

Swapping to a bigger model does not fix stale, duplicated or mislabeled data. It gives you a more fluent version of the same wrong answer. Fix the feed and a modest model often does the job.

What Is Data Modernization?

Data modernization is re-architecting how your business collects, moves, transforms, stores and documents data so that current systems, including AI, can use it reliably. Data pipeline modernization is the part of that work that deals with movement: replacing brittle exports, cron scripts and copy-paste steps with pipelines that are automated, tested, observable and fast enough for the use case.

Data pipeline modernization vs a platform migration

Modernization is not the same as moving to the cloud. A lift-and-shift that copies the same undocumented tables into a new warehouse gives you the same problems on a bigger invoice. The questions that matter are about the data, not the vendor: where each record comes from, how fast changes reach consumers, who owns each field and what “correct” means for it. Gartner’s advice is to build on existing data management practices and add AI-specific pieces iteratively, “such as vector data stores, chunking, sampling, embedding and retrieval-augmented generation (RAG) integration” (Gartner, 2025). That matches how I approach it: keep what works, replace what blocks.

AI Data Pipeline Stages and Components

Every AI data pipeline, whatever the tools, has the same five stages. Knowing them lets you find the weakest one, which is where the work should start.

Ingestion and change data capture

Ingestion pulls data out of the systems that own it: your ERP, e-commerce platform, CRM, help desk, file shares and third-party APIs. The modern pattern for databases is change data capture (CDC), which reads the database’s own transaction log and streams every insert, update and delete as it happens, instead of re-exporting whole tables every night. Open-source tools such as Debezium do this for MySQL, PostgreSQL, SQL Server and others without changing the source application.

Transformation and validation

Raw data is then cleaned and reshaped: types fixed, duplicates merged, customer records matched across systems, units and currencies normalized. The step legacy pipelines usually skip is validation. Every load should check that required fields are present, values are in range and row counts are plausible, and it should stop loudly when they are not. Silent bad loads are how a model learns from a broken week of data.

Storage: warehouse, lake and vector store

Structured history belongs in a warehouse or lakehouse where it can be queried by time. Documents and other unstructured content need a store for the original files plus a vector index for search by meaning. That index does not have to be a new product; pgvector adds vector similarity search to the PostgreSQL database many businesses already run.

Serving: features, retrieval and APIs

Serving is how the model actually receives data at the moment it answers. A forecasting model reads a feature table. A support assistant runs retrieval-augmented generation, described by Lewis et al. (2020), which fetches the relevant passages and hands them to the language model with the question. An agent calls tools, such as an order lookup, through an API. Each one needs a fast, permission-aware way to read the right slice of data.

Feedback loops and observability

Finally, the pipeline records what the model saw, what it answered and what happened next: the ticket was reopened, the forecast missed, the user corrected the answer. That record is how you catch drift and how you get the labeled examples that make the next version better. Pair it with data observability that alerts on freshness, volume and schema changes before a model quietly degrades.

Stage Its job What breaks when it is missing
Ingestion and CDC Get every change out of source systems Models answer from yesterday’s data
Transformation and validation Clean, match and check the data Duplicates and bad loads become “patterns”
Storage Keep history and make documents searchable No training history; no way to find the right document
Serving Deliver the right slice at answer time Slow answers, or answers from data the user may not see
Feedback and observability Record outcomes and watch data health Drift goes unnoticed; nothing to improve from
Yellow and green network cables neatly connected to a switch
Photo by Albert Stoynov on Unsplash

ETL vs ELT vs Streaming: Which Fits an AI Pipeline?

ETL (extract, transform, load) cleans data before it lands in the warehouse. ELT (extract, load, transform) lands raw data first and transforms it inside the warehouse. Streaming processes each change as it arrives. For AI work the practical answer is usually a mix, chosen per data source by how fresh the use case needs it to be.

ETL ELT Streaming / CDC
Transforms happen Before loading Inside the warehouse In flight, per event
Raw data kept Usually not Yes Yes, as an event log
Freshness Batch Batch or micro-batch Seconds to minutes
Best AI fit Sensitive data that must be masked before it lands Training sets and re-processing history with new logic Live features, agents and retrieval that must be current
Main risk Throws away detail a future model needs Raw data sprawl without ownership More moving parts to operate

The reason ELT and CDC dominate AI work is the raw history. When you change how a feature is calculated, or a new model needs a field nobody used before, you can rebuild from the raw record. A pipeline that only ever kept the cleaned summary cannot.

Structured vs Unstructured Data in AI

Structured data lives in databases and spreadsheets: rows, columns and a defined schema. Unstructured data is everything else: PDFs, emails, contracts, call transcripts, product manuals, images and support tickets. Most businesses have plenty of both, but their pipelines handle only the first. A lot of the value of language models is in the second, because that is where the knowledge your staff actually uses is written down.

How to prepare unstructured data for AI

Preparing documents is a pipeline of its own, and it needs the same discipline as a database feed:

  • Extract the text, including from scans (OCR) and tables, and keep a link back to the source file and page.
  • Clean out boilerplate such as signatures, headers and disclaimers that would drown the real content.
  • Chunk documents into passages that each make sense on their own, split on headings rather than a fixed character count where possible.
  • Embed each passage into a vector and store it with metadata: source, date, owner and who is allowed to see it.
  • Re-sync when the source changes, so a superseded policy is removed from the index rather than competing with its replacement.
PostgreSQL + pgvector: a document-chunk table that keeps source and permissions next to the embedding
CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE doc_chunks (
  id          bigserial PRIMARY KEY,
  source_uri  text        NOT NULL,  -- link back to the original file
  page        int,
  updated_at  timestamptz NOT NULL,  -- drives re-sync and staleness checks
  acl_group   text        NOT NULL,  -- who may retrieve this passage
  content     text        NOT NULL,
  embedding   vector(1536)           -- size must match your embedding model
);

CREATE INDEX ON doc_chunks USING hnsw (embedding vector_cosine_ops);

The acl_group column is the part people forget. If the pipeline does not carry permissions through to the index, the assistant will happily quote an HR file to anyone who asks the right question.

Structured and unstructured data together

The useful answers usually need both. “Why is this customer unhappy?” needs their order history (structured) and their last four emails (unstructured). A modern pipeline links the two with shared keys, such as the customer or order ID stored as metadata on each document chunk, so the model can be given both in one request.

Stacks of paper documents and file folders on an office desk
Photo by Wesley Tingey on Unsplash

How to Make Data AI-Ready: A Modernization Sequence

Gartner lists five steps for making data AI-ready: align data to AI use cases, identify governance requirements, evolve metadata from passive to active, prepare data pipelines for both training and a live feed, and assure and enhance the data with DataOps and observability (Gartner, 2025). In practice I run them in this order, one use case at a time:

  1. Pick one use case and trace its data Name the decision the AI will make or support, then list every source it needs and how fresh each must be. This scopes the work to what matters.
  2. Audit those sources For each one: who owns it, how it is extracted today, what is duplicated or missing, and what the fields actually mean. Write the meanings down.
  3. Set the governance rules Decide what is sensitive, what must be masked, and who may see what, before any data reaches a model or a third-party API.
  4. Replace the extraction Move from exports to CDC or scheduled incremental loads, keeping raw history so you can rebuild later.
  5. Add validation and observability Checks on every load, alerts on freshness, volume and schema changes, and a named person who gets paged.
  6. Build the serving layer Feature tables, a retrieval index or tool APIs, depending on the use case, with permissions enforced at read time.
  7. Integrate the model and close the loop Only now connect the AI, log its inputs and outcomes, and use those logs to measure and improve it.

The second use case is far cheaper than the first, because most of the pipeline is already there. That is the real return on modernization: each new AI feature stops being a data project.

What modernization will not fix

A new pipeline cannot invent data you never captured. If you do not record why orders are returned, no pipeline will produce a returns model. Sometimes the first deliverable is a change to how a form or process records information, and the AI feature waits a few months for history to accumulate.

Signs Your Data Pipeline Is Blocking AI

You do not need an audit to know where you stand. If several of these are true, fix the pipeline before you buy AI tooling:

  • Staff export to spreadsheets to answer routine questions.
  • Two systems disagree on a customer’s lifetime value or an item’s stock level, and nobody is sure which is right.
  • Reports are refreshed overnight, but the decision you want to automate happens during the day.
  • Contracts, manuals and support history live in shared drives and inboxes with no index.
  • A schema change in one system has broken a report without anyone noticing for days.
  • No one can list every place a given customer’s data is stored.

Many of these show up first in e-commerce, where catalog, orders, inventory and support data sit in different systems. If that is your world, my posts on AI demand forecasting and dynamic pricing and how to integrate AI into an existing business pick up where this one leaves off.

How I Approach Data Pipeline Work

I have been writing software since 1994, and most of it has been moving data between systems that were never designed to talk to each other. As Magento lead for brands including Yamaha, simplehuman and The Coffee Bean & Tea Leaf, that meant catalog, order and inventory data flowing between the store, ERPs and warehouses. On the AI side I train and run models myself, including YOLOv8 vision models, LoRA and DPO fine-tuning and local inference, and I build MCP tool servers that give language models controlled access to business systems. EdgeTrades, my LLM market-analysis platform, lives or dies on the freshness of its data feeds, which is a large part of why I start AI work with the pipeline.

The same thinking runs through FastMagento: find the part of the system that everything else is waiting on, and fix that first.

Wooden letter tiles spelling the word integrity
Photo by Brett Jordan on Unsplash

FastMagento

Free, open-source serving layer: product pages, search, cart and checkout from OpenSearch instead of EAV.

composer require parkktech/fastmagento

FastMagento Checkout

Free, open-source checkout that paints instantly and keeps your existing payment methods.

composer require parkktech/fastmagento-checkout

Frequently Asked Questions

What is a data pipeline for AI?

It is the automated set of jobs that pulls data from your business systems, cleans and validates it, stores it with its history and meaning, and delivers it to a model at training time and at answer time. It also records what the model did so you can measure and improve it.

What is data modernization?

Data modernization is re-architecting how a business collects, moves, transforms, stores and documents data so current systems, including AI, can use it reliably. It is about automation, freshness, validation and clear ownership, not simply moving the same tables to a new cloud platform.

Why is data quality important for AI systems?

A model learns from and answers with whatever data it is given, and unlike a person it cannot tell when a field is wrong or out of date. Poor data quality produces confident wrong answers at scale. Gartner names poor data quality first among the reasons it expects generative AI projects to be abandoned after proof of concept.

What is the difference between AI-ready data and analytics-ready data?

Analytics-ready data is shaped for people reading reports: aggregated, batch-refreshed and often with outliers removed. AI-ready data keeps row-level history, stays as fresh as the decision it drives, includes unstructured content and documents what each field means, because the model consuming it will not question it.

What are the stages of an AI data pipeline?

Five: ingestion (ideally change data capture), transformation and validation, storage in a warehouse plus a vector index for documents, serving through feature tables, retrieval or APIs, and a feedback loop with observability. The weakest stage is where modernization should start.

Should an AI pipeline use ETL or ELT?

Usually ELT or change data capture, because keeping raw history lets you rebuild features when a model changes. ETL still makes sense for sensitive data that must be masked before it lands anywhere. Many real pipelines mix both, chosen per source.

How do you prepare unstructured data for AI?

Extract the text with a link back to the source, strip boilerplate, split it into self-contained passages, embed each passage and store it with metadata such as date, owner and access permissions. Then keep it in sync so outdated documents are removed from the index.

Not sure whether your data is ready for AI?

Tell me the AI feature you have in mind and where your data lives today. I will tell you honestly which stage of the pipeline is holding it back, and what fixing it involves. The first conversation is free.

Start the conversation