Articles
In a data incident, the time goes into gathering context
By Leandro Oliveira, Founder of BeryxTech
Published · updated · 9 min read
- Topic
- Data quality
- For
- Data engineering
- Data steward
When a number comes out wrong in a report, the data team spends most of the investigation gathering context: whose table it is, what code went to production the day before, what depends on it and whether the same thing has happened before. All of this was on record in some system before the incident, but each answer sits in a different tool. The article follows the questions in the order they come up and says what an AI-assisted diagnosis needs in order to help without inventing.
Where the time goes
In an article on observability, the engineering team at Netflix describes something many data teams will recognise: in an investigation, what takes the time is rebuilding relationships that were already on record. There are four questions: who owns what, what went to production, what depends on what and whether the problem has shown up before. Their answer is a knowledge graph at company scale. This article looks at the same problem in a data quality incident.
Each of the answers sits in a different system. The owner is in the catalogue, the deploy in the CD pipeline, the dependency in the lineage and the previous case in a closed ticket or in the memory of whoever was on call. Whoever investigates opens each one, copies what they find and pieces it together by hand, often while the alerts keep coming in.
1. Group the symptoms into one incident
The first time lost goes into treating each alert as a separate problem. A source table that loads badly breaks the tables that depend on it, and each one fires its own alert, sometimes to different teams. Whoever gets the third alert does not know it is the same problem as the first. Grouping the alerts by lineage and by time shows the source and leaves the others as symptoms.
In BeryX, the open issues that appear within the same 2-hour window in datasets linked by derivation lineage form one incident, with the source dataset, the impact tree and the affected consumers. A foreign key says that one table points to another, not that its data comes from it: it does not group issues into an incident. When the source's issue is about a column and there is column-level lineage, the blast radius leaves out the datasets that do not use that column. See incidents and root-cause diagnosis.
The first dataset with an open issue is not always the source: the data may come from further up, from a table nobody monitors and that therefore never opens an issue. In BeryX, from the root dataset, the incident goes up the ancestors in the derivation lineage to the end of the known lineage and returns the path to the probable origin. Each node carries its state: whether it is monitored, the last scan, the active rules and the last sync of the pipeline that feeds it. When the origin is not monitored, BeryX proposes monitoring it, with a volume rule when the origin has no rules and the row count is known, and nothing goes in until someone accepts it. See incidents and root-cause diagnosis.
2. What changed before the problem
The next question is what changed. The usual suspects are few: a deploy that touched the code feeding the table, an orchestration job that failed or ran halfway, a column that changed type or name at the source, a reference table that has not loaded yet. Each one leaves a trace in its own system, and the work is to put those traces on a timeline next to the first alert.
In BeryX, the root-cause diagnosis starts from the incident's source dataset and brings together the customer's code deploys in the 48 hours before that touch the dataset, the orchestration jobs that failed near the issue, schema drift and, on an orphan-key issue, the rule and the referenced table. Deploys come from the CD pipeline, from OpenLineage or from dbt Cloud, each with its distance to the incident, for example that deploy abc1234 at 14:02 UTC precedes the incident by 25 minutes. For each deploy, only the version, the environment, the service or job and the time are kept, never the author or the commit message. See incidents and root-cause diagnosis.
3. Hypotheses with the evidence alongside
This is where AI can save the most time, and also where it misleads most easily. A language model writes a plausible cause without looking at the data, and fluent text convinces someone who is tired at three in the morning. AI helps when its output is tied to three things: closed categories, so that two investigations can be compared; the evidence behind each hypothesis, so that it can be checked; and a person who approves before anything changes.
In BeryX, the diagnosis report writes up to 4 hypotheses, from most to least likely. Each one carries the evidence from the context that supports or weakens it and a read-only confirmation test in SQL and in PySpark, which whoever investigates runs at the source to confirm or rule out the hypothesis. Without an LLM, the offline template writes the hypotheses in the same format, from the same facts. See incidents and root-cause diagnosis.
4. What people have already said
Often someone complained before the alert: a ticket saying the sales report is out of date, a message in a channel asking why there are repeated customers. Those complaints are evidence, but they are in free text, spread across several tools, and they rarely name the table by its technical name.
In BeryX, complaints in the sources the team connects (Jira tickets, Confluence pages and Slack and Teams channels) become signals, each with a type from a closed set (wrong data, outdated, duplicates, missing, process) and with the confidence of its link to the dataset. The dataset's signals enter the diagnosis as human evidence. Promoting a signal opens an issue and, when possible, proposes a rule that detects the complaint, which only comes in when someone accepts it. See incidents and root-cause diagnosis and chat channels as a source of signals.
5. Whether it has happened before
The last question is the one most often left unanswered: has this happened before? The answer is usually in the head of whoever fixed it last time, or in a closed ticket nobody can find. Without it, each incident starts from scratch, and the same cause costs the same hours again.
In BeryX, the summary of each diagnosis and the resolution of each issue, with the note of whoever resolved it and the cause from the latest diagnosis, go into the team memory, alongside the notes and decisions. The next diagnosis of the same dataset reads up to 3 of those entries, those for the same issue type first, and treats them as history, never as evidence of the current state. An entry that is no longer true is marked as outdated and leaves the analyses. See incidents and root-cause diagnosis.
In BeryX, each hypothesis in the diagnosis also carries a confidence from 0 to 1, computed by the code and never by the LLM, from the kind of evidence, the minutes between the deploy or job and the issue, the number of signals and the severity. A hypothesis below 0.3 is marked as weak. Whoever resolves the issue marks the cause: one of the hypotheses or a category from a closed set (deploy, failed job, schema drift, upstream source, orphan keys, source data, other). In an incident, the cause goes on the root issue. The confirmed causes of the last 90 days are grouped by connection and by dataset. With 3 or more confirmations of the same category, making up at least two in five of the source's, a suggestion opens. On a dataset, when the cause is a deploy or a failed job, the suggestion proposes a volume rule, which only applies when someone accepts it. See root cause with confidence and confirmed causes.
When the cause is an upstream source or source data, the confirmation also stores the origin dataset and connection: the one given by whoever marks it, which must be the root's dataset or one of its ancestors through derivation lineage; without it, the one the chosen “upstream source” hypothesis points to; otherwise, the probable origin of the incident's path. When they come from downstream, these confirmations are also grouped by the origin connection, and with the same threshold the suggestion goes to the origin dataset with the most confirmations. It proposes the rule for the kind of cause (volume, freshness or schema), and for values, or without a reliable column, it is a suggestion without a rule. The connection gains an owner, a person or a team, and with that team's ticket destination the suggestion also proposes the ticket to the owner, which opens when someone accepts the suggestion. See root cause with confidence and confirmed causes.
What is still missing
In BeryX, the path to the probable origin can still only be read through the API, which is also where the proposal to monitor the origin is requested. The incidents screen still shows the root dataset as the source, without the path above it. See incidents and root-cause diagnosis.
Marking the cause, giving the origin and giving a connection an owner can also only be done through the API, with no screen in the app. And the confirmed cause does not yet go back into the diagnosis: the resolution kept in the team memory carries the cause from the latest diagnosis, and the next diagnosis of the same dataset does not read the causes someone confirmed. See root cause with confidence and confirmed causes.
Where to start
A simple exercise: take the last incident and note how much time went into each of the four questions and how much into the fix. The count shows where the delay is, and whether what is missing is the lineage, the record of deploys or a place to keep the resolution. In consulting, the first step is the Data diagnostic: the connection to the sources is read-only, and the report says what is wrong, what it costs and where to start.
What changed
- · The probable origin of each incident and the cause at the origin, with the connection owner, now in production, come into sections 1 and 5, and “What is still missing” now lists the gaps that remain.
- · The per-hypothesis confidence and the confirmed causes, now in production, move to section 5, and “What is still missing” now lists the gaps that remain.