CodeBaobab
← Back to articles
AI4 min read

Five data engineering workflows I would give to an agent.

Backfills, pipeline failures, support tickets, anomalies, and data quality checks all involve repeated investigation. Here is where agents could help and what each workflow should produce.

In this article

A lot of data engineering work starts with a familiar question.

Why did the pipeline fail? Why are yesterday's numbers different? Did the source arrive late, or did something change in the transformation?

You open the logs, check the upstream tables, look through recent changes, and try to connect the evidence. Then you write a ticket or a message explaining what you found.

There are opportunities to automate parts of that work. Based on the tasks data engineers deal with regularly, these are five agent workflows I would consider.

1. Auto-backfill agent

Late-arriving data can leave downstream tables incomplete even though the original jobs finished successfully.

An auto-backfill agent would detect the new data, identify the affected dates, and work out which downstream tables need updating. It could then trigger backfills for those intervals within an agreed scope.

The important part is knowing what actually needs to be rerun. Reprocessing everything wastes resources and can introduce duplicates if the jobs weren't designed for retries.

I would start with pipelines that can safely reprocess the same interval, then check that the corrected data has reached the downstream tables. Larger or unexpected changes should be raised for review.

2. Pipeline failure resolution agent

A failed DAG usually sends someone through the same opening steps: inspect the failed task, read its logs, check dependencies, and look at the code that ran.

An agent could gather that context and investigate the cause. If it finds a code defect, it could create a Jira ticket, prepare a fix on a branch, run the relevant checks, and open a merge request for review.

That would give the engineer something concrete to assess: the failed run, the evidence, the proposed change, and the test results. The agent should also say when it hasn't established the cause, rather than turn a guess into a patch.

Architecture

A failure should arrive with evidence

A proposed investigation workflow. The approval boundary separates a verified proposal from permission to act in production.

PassApproveRead-only evidenceInvestigate and verifyHuman approval boundaryINPUTFailed runLogs + source revisionRead-only data accessPropose a small patchReproduce the failureKeep the diff reviewableRun the checksRecord exact revisionStop if verification failsOUTPUTReviewable proposalCause + diff + checksExact source revisionHuman approvalReview verified changesAuthorize the actionOUTPUTProduction actionApproved change onlyPreserve rollback
Read the connections
  • Failed run → Propose a small patch
  • Propose a small patch → Run the checks
  • Run the checks → Reviewable proposal: Pass
  • Reviewable proposal → Human approval
  • Human approval → Production action: Approve
Architecture

A failure should arrive with evidence

A proposed investigation workflow. The approval boundary separates a verified proposal from permission to act in production.

Read-only evidence

  1. InputFailed run

    Logs + source revision · Read-only data access

Investigate and verify

  1. Propose a small patch

    Reproduce the failure · Keep the diff reviewable

  2. Run the checks

    Record exact revision · Stop if verification fails

  3. OutputReviewable proposal

    Cause + diff + checks · Exact source revision

Human approval boundary

  1. Human approval

    Review verified changes · Authorize the action

  2. OutputProduction action

    Approved change only · Preserve rollback

Read the connections
  • Failed run → Propose a small patch
  • Propose a small patch → Run the checks
  • Run the checks → Reviewable proposal: Pass
  • Reviewable proposal → Human approval
  • Human approval → Production action: Approve

3. Support ticket triage agent

A ticket saying that a dashboard looks wrong often needs investigation before anyone can assign it properly.

A triage agent could identify the affected report, date range, and dataset, then check for related incidents or recent pipeline changes. If the ticket is missing information, it could ask for it.

The output would be a short report explaining what the user observed, what the available evidence shows, and which team should investigate next.

That would save the receiving engineer from repeating the initial information gathering. Similar past tickets could help guide the investigation, but they shouldn't be treated as proof of the current cause.

4. Anomaly detection agent

An unusual change in a business metric creates two questions: is the change real, and what might explain it?

An agent could investigate an alert by checking data freshness, recent releases, affected segments, and comparable periods. It could bring those findings together before notifying the team.

For example, a drop in reported orders could reflect fewer orders, a delayed source, or a broken event pipeline. The alert becomes more useful when it includes evidence about those possibilities.

The detection rule can remain ordinary code or a statistical model. The agent's contribution is gathering context and helping someone decide what to investigate.

5. Data quality agent

Schema changes, missing records, duplicates, and unexpected data patterns all create recurring investigation work.

A data quality agent could examine a failed check, trace the affected data upstream, and compare recent runs to find where the problem appeared. It could then recommend a corrective action.

A missing partition might need a backfill. Duplicate records might point to a writer or retry problem. A changed column type might require a source-contract change.

I would want the recommendation to include the affected tables, supporting evidence, and any uncertainty. Removing records or changing a quality rule just to make a check pass should require a separate decision.

Start with a workflow you already understand

These agents need access to the right information and clear limits on what they can change. They also need a way to leave the investigation with a person when the evidence is incomplete.

Pick one recurring task, let the agent investigate it, and compare its findings with an engineer's. Expand what it can do as you learn which parts are dependable.

The useful outcome is less time spent gathering the same information and more time available to resolve the actual problem.

Comments

Get new articles by email

AI, engineering, and careers. No account needed.

Confirm by email. Unsubscribe anytime. Privacy