<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Guangyang Li&#39;s Blog</title>
    <link>https://guangyangli.com/</link>
    <description>Recent content on Guangyang Li&#39;s Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>CC BY-NC-ND 4.0</copyright>
    <lastBuildDate>Thu, 08 Oct 2026 12:00:00 -0400</lastBuildDate><atom:link href="https://guangyangli.com/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>YAML DAGs Become More Useful When AI Writes the Code</title>
      <link>https://guangyangli.com/posts/yaml-pipelines-ai-era/</link>
      <pubDate>Thu, 08 Oct 2026 12:00:00 -0400</pubDate>
      
      <guid>https://guangyangli.com/posts/yaml-pipelines-ai-era/</guid>
      <description>
&lt;h2 id=&#34;the-old-pitch-is-gone&#34;&gt;The Old Pitch Is Gone &lt;a hidden href=&#34;#the-old-pitch-is-gone&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Defining Airflow DAGs in YAML is not new. With &lt;a href=&#34;https://github.com/astronomer/dag-factory&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;dag-factory&lt;/a&gt;, for example, a DAG looks like this (its docs also have a &lt;a href=&#34;https://astronomer.github.io/dag-factory/latest/comparison/traditional_operators/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;side-by-side comparison&lt;/a&gt; of the same workflow in Python and in YAML):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;etl&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;default_args&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;owner&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;data-team&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;start_date&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2026-01-01&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;schedule&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt; * * *
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;tasks&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    - &lt;span style=&#34;color:#f92672&#34;&gt;task_id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;extract&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;operator&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;airflow.providers.standard.operators.bash.BashOperator&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;bash_command&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;python extract.py&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    - &lt;span style=&#34;color:#f92672&#34;&gt;task_id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;transform&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;operator&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;airflow.providers.standard.operators.bash.BashOperator&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;bash_command&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;python transform.py&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;dependencies&lt;/span&gt;: [&lt;span style=&#34;color:#ae81ff&#34;&gt;extract]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For years, the pitch for tools like this was simple: build DAGs without knowing Python, and without learning Airflow primitives. AI made this reason much weaker. Now an analyst who cannot write Python just asks an agent, and gets a working Python DAG in a minute. So if &amp;ldquo;you don&amp;rsquo;t have to write Python&amp;rdquo; is the only reason to use YAML, people can fairly decide these tools are no longer needed.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t think the answer is to say that AI-written Python is not good enough yet. That claim gets weaker with every model release. I think a better answer is this: even if AI writes perfect Python, a team with many DAGs and many authors still wants a workflow definition layer. When an agent writes the code, writing is not the expensive part anymore. Reviewing it, checking it, and changing it later are. So we should choose the format for those jobs. &lt;strong&gt;AI sits upstream of a YAML tool, not opposite it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is not only an Airflow question. There is already discussion about whether to &lt;a href=&#34;https://martinfowler.com/articles/llm-and-dsls.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;use a DSL or general-purpose code with LLMs&lt;/a&gt;, and the idea is the same: a small language with a validator gives the model clear boundaries, and lets it fix its own mistakes, as long as the language stays small. To be clear, I am not saying YAML is always better than Python. My point is narrower: for teams with many DAGs, YAML becomes more useful when AI writes the code. I see three reasons for it. It is constrained, it is verifiable, and it is easier to maintain at scale.&lt;/p&gt;
&lt;h2 id=&#34;constrained-a-workflow-does-not-need-to-be-a-program&#34;&gt;Constrained: A Workflow Does Not Need to Be a Program &lt;a hidden href=&#34;#constrained-a-workflow-does-not-need-to-be-a-program&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A Python DAG is a program, and an agent writing a program can do anything. It can put code at the top level of the file, create tasks in a loop, import helpers from anywhere, or call an API while the file is being parsed. Airflow parses DAG files again and again, so a slow call at the top level slows down the whole scheduler. Also, if you ask an agent for ten DAGs, you get ten slightly different styles, depending on the prompt and the model. Each of these choices is something a reviewer has to notice.&lt;/p&gt;
&lt;p&gt;A YAML DAG has much less room for these choices. The schedule is always under &lt;code&gt;schedule&lt;/code&gt;, the tasks are always a list under &lt;code&gt;tasks&lt;/code&gt;, and the dependencies are always a list on each task. An agent cannot put a slow API call at the top level, because there is no top level to put it in. Of course it still makes mistakes, but the mistakes are inside a small, fixed structure. &lt;strong&gt;Give AI a workflow language, not an entire programming language.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This does not mean Python goes away. &lt;strong&gt;I believe most DAGs will split into two layers: Python for the logic inside each task, and a small declarative format for the workflow around it.&lt;/strong&gt; The functions that clean data, call APIs, or train models stay in Python. The schedule, the tasks, the dependencies, and the retries move to a format that agents write and machines check. Other tools already work this way. dbt keeps the logic in SQL and the model properties in YAML. Jenkins has a structured &lt;a href=&#34;https://www.jenkins.io/doc/book/pipeline/syntax/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Declarative Pipeline&lt;/a&gt; syntax, where free-form code in a &lt;code&gt;script&lt;/code&gt; step is only an escape hatch.&lt;/p&gt;
&lt;h2 id=&#34;verifiable-checked-before-it-reaches-airflow&#34;&gt;Verifiable: Checked Before It Reaches Airflow &lt;a hidden href=&#34;#verifiable-checked-before-it-reaches-airflow&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;YAML has a fixed grammar, so it can be checked without running anything. A rule like &amp;ldquo;every DAG has an owner&amp;rdquo;, &amp;ldquo;no &lt;code&gt;BashOperator&lt;/code&gt; in production&amp;rdquo;, or &amp;ldquo;memory request under 4G&amp;rdquo; is a few lines of code over a YAML tree. The same rule over Python needs AST analysis, and it still misses DAGs that are built dynamically. Writing code got much faster with AI, but review did not, so review became the bottleneck. &lt;strong&gt;Every rule a machine can check is review work that a senior engineer no longer has to do.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It also lets the agent check its own work, before any person looks at it.&lt;/p&gt;
&lt;figure&gt;
  &lt;a class=&#34;figure-link&#34; href=&#34;https://guangyangli.com/posts/yaml-pipelines-ai-era/images/validate-loop.png&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
    &lt;img src=&#34;https://guangyangli.com/posts/yaml-pipelines-ai-era/images/validate-loop.png&#34; alt=&#34;An AI agent writes a YAML DAG, a linter checks it against the parameter table, errors go back to the agent to fix, and only a valid config goes to review and then to Airflow.&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;2284&#34; height=&#34;374&#34;&gt;
  &lt;/a&gt;
&lt;/figure&gt;

&lt;p&gt;The agent writes the config, a validator checks it, and the errors go back to the agent until the config is valid. This only works well if the error messages use the terms of the workflow. A stack trace from Airflow&amp;rsquo;s DAG parser is written for a person who debugs Python code. An error like &amp;ldquo;task &lt;code&gt;transform&lt;/code&gt; depends on &lt;code&gt;extrac&lt;/code&gt;, which does not exist&amp;rdquo; is something an agent fixes right away. In my opinion, &lt;strong&gt;the error message is now a product feature, and its main user is a machine.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;dag-factory has this kind of validator in its &lt;code&gt;dagfactory lint&lt;/code&gt; command. It checks each DAG against a table of every parameter dag-factory accepts: unknown keys, wrong types, parameters the installed Airflow version does not accept, missing dependencies, and cycles. For example, if the DAG above has a typo in a dependency, lint reports:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;error: [etl.tasks.transform.dependencies] `transform` depends on `extrac`, which does not exist.
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;maintainable-keep-the-whole-fleet-up-to-date&#34;&gt;Maintainable: Keep the Whole Fleet Up to Date &lt;a hidden href=&#34;#maintainable-keep-the-whole-fleet-up-to-date&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The third reason is that YAML DAGs are easier to keep up to date, because a tool can change the whole fleet at once. dag-factory&amp;rsquo;s &lt;code&gt;convert&lt;/code&gt; command already does a fleet-wide migration from Airflow 2 to Airflow 3, like updating the import paths of the standard operators. Because every config has the same structure, this rewrite is deterministic: the same input always gives the same output, and lint can check the result.&lt;/p&gt;
&lt;p&gt;Doing the same over Python DAGs is not reliable. Each Python file can build its DAG in its own way, so a tool cannot safely rewrite all of them. An agent can do the migration, but an agent is not a deterministic tool. It may change each file in a slightly different way, and each change has to be checked like new code. With YAML, the tool does the migration, and the agent and the reviewers only need to handle what the tool cannot.&lt;/p&gt;
&lt;h2 id=&#34;choosing-between-python-and-yaml&#34;&gt;Choosing Between Python and YAML &lt;a hidden href=&#34;#choosing-between-python-and-yaml&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The same debate is happening in infrastructure as code, between declarative formats like HCL and tools that use general-purpose languages. The argument for general-purpose languages is a strong one: a real language works with the testing frameworks, IDEs, and coding agents developers already use, so AI output is easier to verify. In CI/CD, there is a similar complaint that a big YAML file has no functions, no abstraction, and no debugger.&lt;/p&gt;
&lt;p&gt;To be honest, both are fair points. But I think they answer a different question. Unit tests check that the code works. They do not check that the workflow follows the platform&amp;rsquo;s rules, like every DAG has an owner. And when an agent writes the DAG, it usually writes the tests too, so the tests are also generated code that someone has to review. The &amp;ldquo;big YAML&amp;rdquo; problem is real as well, but it is a sign that the format has grown too much. A YAML tool for the AI era should stay small, and leave the hard cases to Python.&lt;/p&gt;
&lt;p&gt;So the choice depends mostly on how many pipelines you have, and how many people, or agents, write them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;YAML fits better when&lt;/th&gt;
					&lt;th&gt;Python fits better when&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;You have many DAGs and many authors&lt;/td&gt;
					&lt;td&gt;You have a few DAGs and one small team&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Most pipelines follow a few repeated patterns&lt;/td&gt;
					&lt;td&gt;Each pipeline has its own unusual structure&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;You want policy checks before anything reaches Airflow&lt;/td&gt;
					&lt;td&gt;Reading the code in review is enough&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;You need changes across the whole fleet&lt;/td&gt;
					&lt;td&gt;The DAG structure depends on complex logic or external systems&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For a team with five DAGs, AI-written Python is fine, and YAML is one more layer to learn. But &lt;strong&gt;the more DAGs a team has, the more useful YAML becomes when AI writes them.&lt;/strong&gt; In a company with hundreds or thousands of DAGs, written by many teams and many agents, writing them is the cheap part. The hard part is keeping all of them correct, consistent, and up to date. And this is where a constrained, verifiable, and maintainable format helps the most.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>The Agentic Data Platform: From Human-Facing to AI-Facing</title>
      <link>https://guangyangli.com/posts/agentic-data-platform/</link>
      <pubDate>Sat, 08 Aug 2026 10:00:00 -0400</pubDate>
      
      <guid>https://guangyangli.com/posts/agentic-data-platform/</guid>
      <description>
&lt;h2 id=&#34;a-new-kind-of-user&#34;&gt;A New Kind of User &lt;a hidden href=&#34;#a-new-kind-of-user&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In my earlier posts, I wrote about &lt;a href=&#34;https://guangyangli.com/posts/how-to-build-enterprise-data-platform/&#34;&gt;why and when a company needs a data platform&lt;/a&gt;, and &lt;a href=&#34;https://guangyangli.com/posts/key-components-of-data-platform/&#34;&gt;the six components inside one&lt;/a&gt;. Both posts had one assumption that I didn&amp;rsquo;t say out loud: the users are people. An analyst opens a dashboard, a data scientist writes a query, a manager reads a weekly report.&lt;/p&gt;
&lt;p&gt;This assumption is changing. When a company puts agents into customer support, sales, finance, or engineering, these agents need enterprise data to do their job. So a growing part of the requests to the data platform does not come from a person anymore. It comes from an agent. I believe that in a few years, agents will be the biggest users of most data platforms, by number of queries, and by a large margin.&lt;/p&gt;
&lt;p&gt;This is the start of a new kind of data platform. People call it the &lt;strong&gt;agentic data platform&lt;/strong&gt;, and I see two sides of it. It serves AI agents with governed enterprise data, and agents also do a big part of the work to build and run it. It also needs two more things: a feedback loop, so it gets better from every request, and guardrails that extend its governance to agents. In this post I focus on structured data, the tables, metrics, and pipelines most data platforms are built around.&lt;/p&gt;
&lt;figure&gt;
  &lt;a class=&#34;figure-link&#34; href=&#34;https://guangyangli.com/posts/agentic-data-platform/images/human-to-ai-facing.png&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
    &lt;img src=&#34;https://guangyangli.com/posts/agentic-data-platform/images/human-to-ai-facing.png&#34; alt=&#34;From a human-facing to an AI-facing data platform: users change from analysts and managers to AI agents, consumption from dashboards and SQL to APIs and CLI, metadata from docs for people to context for agents, data work from engineers writing pipelines to agents building and running them, learning from manual reviews to automatic feedback, and governance from access control to access control plus agent guardrails.&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1567&#34; height=&#34;938&#34;&gt;
  &lt;/a&gt;
&lt;/figure&gt;

&lt;p&gt;The six components don&amp;rsquo;t go away. You still need ingestion, storage, transformation, metadata, governance, and consumption. Actually, the basics matter even more. An analyst who sees a strange number can walk over and ask a coworker whether the table is right. An agent cannot. It uses whatever it finds, and if the data is wrong, it repeats the same mistake very fast and many times. So &lt;strong&gt;bad data quality, missing descriptions, and unclear ownership hurt more with agents than with people.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;a-data-platform-for-agents&#34;&gt;A Data Platform for Agents &lt;a hidden href=&#34;#a-data-platform-for-agents&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An agent uses data differently from a person. Instead of looking at a chart, it calls a tool, reads the answer as text or JSON, and decides what to do next. A BI tool is designed for human eyes and a mouse. An agent can still click through a web page with computer use, or call the endpoint behind a button, but this is slow and breaks easily. So &lt;strong&gt;the important things in your platform should have a proper API or CLI&lt;/strong&gt;: running a query, searching the catalog, checking the freshness of a table, looking up lineage, or reading a metric definition.&lt;/p&gt;
&lt;p&gt;Besides the interface, the format and content of what the platform provides need to change too. A UI shows what fits on a screen and what a person can read quickly. An agent needs something different. For example, a data catalog service I used to work on showed the 5 most common values of each column on its UI. For a person, 5 values are usually enough to understand what the column looks like. But a text-to-SQL agent may need 1,000 or more example values, so it knows the real spelling, format, and range of the values, and can write more robust queries. 1,000 values are far too many to show on a UI, but for an agent they may still not be enough. This is not only about the catalog. An agent knows nothing about your company. It does not know that &lt;code&gt;orders_v2&lt;/code&gt; replaced &lt;code&gt;orders&lt;/code&gt;, or that revenue in finance excludes refunds, unless the platform tells it. So &lt;strong&gt;the whole data platform should give agents the content they need, in a format they can use&lt;/strong&gt;, not just a copy of what the UI shows to people. Because of this, I think &lt;strong&gt;the data catalog will move from a side tool that people open when they are lost, to a key service of the platform.&lt;/strong&gt; It is where agents learn what the data means before they touch it.&lt;/p&gt;
&lt;p&gt;Then there is the output. Today the end of the line is usually a dashboard or an alert in Slack, and a person decides what to do next. In an agentic platform, the output of one step is often the input of the next agent. When a data quality check fails, the result should come through an API in a structured format, so another agent can skip the bad table, tell the user the number may be wrong, or even start troubleshooting the issue and creating a fix. &lt;strong&gt;Monitoring results, job status, and quality scores all become context for the next agent.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;a-data-platform-run-by-agents&#34;&gt;A Data Platform Run by Agents &lt;a hidden href=&#34;#a-data-platform-run-by-agents&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The other side is about who builds and runs the platform. A lot of data engineering work is honestly not very interesting: writing another ingestion job, mapping the columns of a new source, fixing a pipeline after someone renamed a field upstream, turning a business requirement into a query. Coding agents are already good at this kind of work.&lt;/p&gt;
&lt;p&gt;They can do both the coding and the operations. An analyst writes a business requirement in plain words, and the agent turns it into SQL or dbt models, a Python script, or a Spark job, adds tests, and opens a change. When a new source arrives, the agent profiles the data, reads the column names and sample values, and proposes how to map them to the target model. When a source renames a column, it finds the affected tables through lineage and fixes each of them. When a job fails or a quality check finds bad data, an agent picks up the alert, troubleshoots the issue, and opens a fix or starts a backfill, often before anyone has looked at it. It can also look at the data and suggest quality checks, like &amp;ldquo;this column looks like an email&amp;rdquo; or &amp;ldquo;this count usually stays in this range&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;So what do data engineers do then? In my opinion, &lt;strong&gt;they stop writing most of the pipelines themselves, and build the system that writes and runs them.&lt;/strong&gt; That means the development pipeline for agents: the standards and naming rules the agent must follow, the context it gets about the data models, the tests and evaluations that decide whether a change is good, and the guardrails around what it is allowed to change. Once this system is solid, the code review can also be done by an agent, together with automated tests. People design the system and handle the cases it cannot.&lt;/p&gt;
&lt;p&gt;This also changes what the platform itself needs. &lt;strong&gt;For agents to run the platform, the platform has to be easy for an agent to change and test.&lt;/strong&gt; Pipelines, schemas, permissions, and quality rules should all be defined as code, so an agent can read them and change them through the normal development pipeline. Agents need a safe place to try things, like a development environment with a copy or a sample of production data, so a wrong change breaks nothing. After a change, the agent also needs to check the result by itself: run the tests, compare the data before and after the change, and read the job logs. All of these should be available through an API, so the agent can verify its own work without waiting for a person.&lt;/p&gt;
&lt;h2 id=&#34;closing-the-feedback-loop&#34;&gt;Closing the Feedback Loop &lt;a hidden href=&#34;#closing-the-feedback-loop&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Today, a data platform improves slowly. Someone notices a report is wrong, files a ticket, and maybe the fix lands a few weeks later. With agents, &lt;strong&gt;the platform can learn from every request, but only if the outcomes come back to it automatically&lt;/strong&gt;: every query an agent ran, whether it succeeded, how much it cost, whether the user accepted the answer or corrected it, and what action followed.&lt;/p&gt;
&lt;p&gt;Text-to-SQL is a good example. Every generated query gets some feedback from the user. They accept the answer, run the query again later, edit it, or say it is wrong. Most of this feedback is lost today. But it is exactly what a text-to-SQL model needs. Queries that are used again and again by many users, with good feedback, are proven pairs of a real business question and a correct query. The queries users corrected are even more useful, because they show the mistake and the fix together. &lt;strong&gt;Collect these, and use them to improve and evaluate the text-to-SQL model&lt;/strong&gt;, as fine-tuning data, or as examples the model retrieves when it gets a similar question. A better model gets used more, more usage brings more feedback, and the feedback makes the model better again. That is the flywheel you want to get spinning. The corrections also show where the metadata is unclear, or where a metric definition is missing, so the platform improves together with the model.&lt;/p&gt;
&lt;p&gt;The same flywheel works for other agent tasks on the platform. Review comments that engineers accept or dismiss can train the code review agent, alerts marked as real or noise can tune the quality checks, and tags corrected by the governance team can improve PII classification. In my opinion, &lt;strong&gt;this feedback data is one of the most valuable datasets a company has.&lt;/strong&gt; No vendor or public model can have it, but most companies throw it away today.&lt;/p&gt;
&lt;h2 id=&#34;guardrails-for-agents&#34;&gt;Guardrails for Agents &lt;a hidden href=&#34;#guardrails-for-agents&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most data platforms already have access control, masking, and audit logs, and all of them still apply. But they were designed for two kinds of users: people, and service accounts that run fixed pipelines. An agent is neither. It works for a person but is not that person, it writes and runs its own code, it can call many tools, and it can spend money or change data without anyone watching each step. So &lt;strong&gt;the existing governance needs guardrails for this new kind of user.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It starts with identity. Each agent should log in as itself, not with a shared service account, and get only the data its task needs. When an agent works for a user, it should never see more than that user can see. And there must be no way around the rules. If row filters and column masks are applied on views, the agent should not be able to read the raw files in storage, or switch to another tool with wider access. Code generated by the agent should run with the same identity and the same limits.&lt;/p&gt;
&lt;p&gt;Cost needs a guardrail too. An agent can run hundreds of queries in a few minutes, and one bad loop or one query without a filter on a huge table can cost real money. So set spend limits per agent and per task, on query cost, data scanned, runtime, and number of calls.&lt;/p&gt;
&lt;p&gt;Most agents only need to read. Writing to production tables, changing schemas, or deleting data should go through the agent development pipeline with its tests and checks, or need explicit approval. And &lt;strong&gt;these rules belong in the platform, not only in the prompt.&lt;/strong&gt; &amp;ldquo;Never read payment data&amp;rdquo; in a prompt is a suggestion. The same rule enforced by the platform still holds when the model behaves in a way nobody expected. Finally, log every query and action with the agent&amp;rsquo;s identity, and make sure you can stop one agent, see what it did, and undo what can be undone, without stopping the whole platform.&lt;/p&gt;
&lt;h2 id=&#34;what-can-go-wrong&#34;&gt;What Can Go Wrong &lt;a hidden href=&#34;#what-can-go-wrong&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most of the failures I expect are not the model&amp;rsquo;s fault. The agent does what it is designed to do, but the data or the context it gets is wrong.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wrong answers that look right.&lt;/strong&gt; This is the one I worry about most. A generated query runs without error and returns a clean number, but it used the wrong join or missed a filter. Nobody reads every query an agent writes. Being mostly right is fine for exploring data, but not for a number that goes to finance. The best protection I know is a test set of real questions with known correct answers, which runs every time the metadata, the data models, or the agent changes. The queries with good user feedback from the previous section are a good start for this test set.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Too much context, or the wrong context.&lt;/strong&gt; If an agent searches the catalog and finds 200 tables with &amp;ldquo;customer&amp;rdquo; in the name, it will pick one, and maybe the wrong one. More metadata is not always better. Certified tables, usage statistics, and clear ownership help the agent choose the table people actually trust.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agents that don&amp;rsquo;t see each other.&lt;/strong&gt; When several agents work on the same customers or the same data, and each keeps its own record, they start to disagree. A marketing agent sends an offer to a customer who complained to the support agent an hour ago. So agents that work on the same customers should read from and write to the same place, and record what they did there in a structured way, so the next agent can see it.&lt;/p&gt;
&lt;p&gt;If you look at these three again, none of them is really a model problem. They are data platform problems, and to me that is good news, because these are problems data engineers already know how to solve.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>How to Build a Data Platform: The Six Key Components</title>
      <link>https://guangyangli.com/posts/key-components-of-data-platform/</link>
      <pubDate>Tue, 03 Jan 2023 20:14:00 -0500</pubDate>
      
      <guid>https://guangyangli.com/posts/key-components-of-data-platform/</guid>
      <description>
&lt;h2 id=&#34;the-six-components&#34;&gt;The Six Components &lt;a hidden href=&#34;#the-six-components&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In my &lt;a href=&#34;https://guangyangli.com/posts/how-to-build-enterprise-data-platform/&#34;&gt;previous post&lt;/a&gt;, I wrote about why and when a company needs a data platform. The next question is: if you decide to build one, what goes inside it?&lt;/p&gt;
&lt;p&gt;A data platform is a set of tools and services, not one piece of software you install. So two platforms can look very different. A startup with a few engineers and a global company with thousands of employees will pick very different tools, because their data volume, budget, and security rules are different. But when I put the tools aside, I almost always see the same six parts.&lt;/p&gt;
&lt;figure&gt;
  &lt;a class=&#34;figure-link&#34; href=&#34;https://guangyangli.com/posts/key-components-of-data-platform/images/key-components.png&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
    &lt;img src=&#34;https://guangyangli.com/posts/key-components-of-data-platform/images/key-components.png&#34; alt=&#34;Six key components of a data platform: data ingestion, data storage, data transformation, and data consumption, built on top of metadata management and data governance&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1708&#34; height=&#34;1028&#34;&gt;
  &lt;/a&gt;
&lt;/figure&gt;

&lt;p&gt;The top row is the path of the data. It comes in through &lt;strong&gt;ingestion&lt;/strong&gt;, lands in &lt;strong&gt;storage&lt;/strong&gt;, gets cleaned and modeled in &lt;strong&gt;transformation&lt;/strong&gt;, and then people and systems use it through &lt;strong&gt;consumption&lt;/strong&gt;. The two layers at the bottom, &lt;strong&gt;metadata management&lt;/strong&gt; and &lt;strong&gt;governance&lt;/strong&gt;, are not steps. They sit under everything, and they decide if people can find the data and trust it.&lt;/p&gt;
&lt;p&gt;I will go through them in this order. For each one I also name a few well-known tools. Tools change every few years, so please don&amp;rsquo;t take the lists too seriously.&lt;/p&gt;
&lt;h2 id=&#34;data-ingestion&#34;&gt;Data Ingestion &lt;a hidden href=&#34;#data-ingestion&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ingestion brings data into the platform: from business databases, events from apps and IoT devices, log files, and SaaS tools through their APIs. Nothing else works until data comes in, so this is usually where a data platform starts.&lt;/p&gt;
&lt;p&gt;The first decision is batch or streaming. &lt;strong&gt;Batch&lt;/strong&gt; loads data in chunks on a schedule. &lt;strong&gt;Streaming&lt;/strong&gt; moves data continuously. In practice you end up with one of three designs:&lt;/p&gt;
&lt;figure&gt;
  &lt;a class=&#34;figure-link&#34; href=&#34;https://guangyangli.com/posts/key-components-of-data-platform/images/ingestion-patterns.png&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
    &lt;img src=&#34;https://guangyangli.com/posts/key-components-of-data-platform/images/ingestion-patterns.png&#34; alt=&#34;Three ways to ingest data: batch loads on a schedule, streaming with the Kappa architecture, and the Lambda architecture that combines a batch layer and a speed layer&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1946&#34; height=&#34;950&#34;&gt;
  &lt;/a&gt;
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Batch only.&lt;/strong&gt; A scheduled job loads the data. If the business only needs yesterday&amp;rsquo;s numbers, reading the source once a day is enough, even if the source itself produces data in real time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Streaming only (Kappa).&lt;/strong&gt; For example, a CDC (Change Data Capture) tool reads the change log of a database and sends every change into the platform as a stream. When everything is handled as a stream, including reprocessing old data, it is called the Kappa architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Both (Lambda).&lt;/strong&gt; A batch layer reprocesses all the data regularly and gives complete but slow results. A speed layer handles only the newest data that the batch layer has not reached yet, and a serving layer merges the two. The problem is that you write and maintain the same logic twice.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I would start with batch, almost every time. Add streaming only when the business really needs fresh data, like fraud detection or live operations dashboards. Streaming pipelines are much harder to build, test, and debug. To be honest, I have seen more teams suffer from streaming they didn&amp;rsquo;t need than from missing streaming they really needed.&lt;/p&gt;
&lt;p&gt;The second decision is ETL or ELT. With ETL (Extract, Transform, Load), you transform the data before loading it, so usually the raw data is not kept. With ELT, you load the raw data first and transform it later inside the platform. For a new platform I prefer ELT. Different use cases can share the same raw data, and when a transformation has a bug, you rebuild from the raw data instead of asking the source system to send everything again. It needs more storage, but storage is cheap now.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example tools:&lt;/strong&gt; Fivetran and Airbyte (connectors), Debezium (CDC), Apache Kafka (event streaming).&lt;/p&gt;
&lt;h2 id=&#34;data-storage&#34;&gt;Data Storage &lt;a hidden href=&#34;#data-storage&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Storage is where the data lives after it comes in. Today there are three main options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data warehouse.&lt;/strong&gt; A database built for analysis (OLAP), not for running an application (OLTP). Data is structured, and SQL is the main language. Cloud warehouses store data by columns and run queries in parallel on many machines, so they are fast for analytics. They also handle semi-structured data like JSON quite well now.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data lake.&lt;/strong&gt; Files in their original format, in cheap object storage (in the past, on HDFS). A lake can hold almost anything: tables, JSON, logs, documents, images, videos. Engines like Spark read these files, usually after converting them to a columnar format like Parquet. Lakes and warehouses are often used together: the lake keeps the raw data, the warehouse keeps the cleaned results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lakehouse.&lt;/strong&gt; If you use a lake and a warehouse together, you keep two copies of a lot of data. A lakehouse adds warehouse features directly on top of the files in the lake, using open table formats. You get transactions, schema enforcement, updating or deleting single rows (important for GDPR deletion requests), and time travel. And because the data stays in an open format, several engines can read the same tables, so you are less locked into one vendor.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which one to choose? If most of your data is structured and mainly used for BI, in my opinion a cloud warehouse alone is enough, and it is the simplest to run. A lake or lakehouse makes more sense when you have a lot of semi-structured or unstructured data, very large volume, or heavy machine learning work.&lt;/p&gt;
&lt;p&gt;Whichever you choose, organize the data in layers:&lt;/p&gt;
&lt;figure&gt;
  &lt;a class=&#34;figure-link&#34; href=&#34;https://guangyangli.com/posts/key-components-of-data-platform/images/data-layers.png&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
    &lt;img src=&#34;https://guangyangli.com/posts/key-components-of-data-platform/images/data-layers.png&#34; alt=&#34;Data moves from sources into a raw layer, then a staging layer, a modeled layer, and finally a serving layer&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;2285&#34; height=&#34;447&#34;&gt;
  &lt;/a&gt;
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Raw&lt;/strong&gt;: a copy of the source data, untouched, so you can always rebuild from it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Staging&lt;/strong&gt;: the cleaned version, with fixed data types, consistent names, and duplicates removed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modeled&lt;/strong&gt;: where the business logic lives. Most teams I have worked with use dimensional modeling here, which means fact tables for business events like orders, and dimension tables that describe them, like customer and product. Analysts understand it easily, and it is fast to query.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Serving&lt;/strong&gt;: summary tables, metrics, and APIs made for specific users, so their queries stay simple.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example tools:&lt;/strong&gt; Snowflake and Google BigQuery (data warehouses), Databricks (lakehouse platform), Apache Iceberg, and Delta Lake (open table formats).&lt;/p&gt;
&lt;h2 id=&#34;data-transformation&#34;&gt;Data Transformation &lt;a hidden href=&#34;#data-transformation&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Transformation is cleaning, joining, aggregating, and applying business logic. In my opinion, this is where most of the long-term cost of a data platform is, because the logic grows with the business and almost never gets smaller. I have two strong opinions here.&lt;/p&gt;
&lt;p&gt;The first one is SQL. Write as much business logic in SQL as you can. Modern SQL can express most of it, with window functions, arrays, JSON functions, and so on. The main benefit is that more people can read it. When a number looks wrong, an analyst can open the SQL and help find the bug, instead of everyone waiting for the one engineer who wrote a complicated program. For machine learning features or complex streaming logic, you still need Python, Java, or Scala, and that is fine.&lt;/p&gt;
&lt;p&gt;The other one is orchestration. Data jobs depend on each other: this table must be ready before that report runs. An orchestration tool schedules the jobs, manages these dependencies, retries failures, and shows what is running. Please use a real one. A homemade scheduler looks easy in the first week. Then it needs retries, then backfills, then alerts, then a UI, and one day you realize you are maintaining your own small Airflow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example tools:&lt;/strong&gt; dbt (SQL transformations), Apache Spark (batch processing), Apache Flink (stream processing), Apache Airflow, and Dagster (orchestration).&lt;/p&gt;
&lt;h2 id=&#34;metadata-management&#34;&gt;Metadata Management &lt;a hidden href=&#34;#metadata-management&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Metadata is data about your data: which tables exist, what each column means, who owns it, where it comes from, and how fresh it is. When the platform is small, all of this is in a few people&amp;rsquo;s heads, and that works fine. When the platform grows, it stops working. In growing companies, the complaint I hear most is not about slow queries. It is that people cannot find the data they need, or they don&amp;rsquo;t know which of three similar tables is the right one.&lt;/p&gt;
&lt;p&gt;Two tools help here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data catalog.&lt;/strong&gt; It is like a search engine for your data. People search for a table, read what it and its columns mean, and see who owns it and when it was last updated. Tags help too. If you tag the columns with personal information, governance rules can apply to them automatically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data lineage.&lt;/strong&gt; It shows where each table comes from and where it goes. When a dashboard number looks wrong, lineage tells you which upstream tables to check. Before you change a table, it tells you which tables, reports, and teams downstream will be affected. You don&amp;rsquo;t need to draw it by hand. With OpenLineage, an open standard, tools like Airflow, Spark, Flink, and dbt send an event for each job run with the datasets it read and wrote, and a backend builds the graph from these events.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example tools:&lt;/strong&gt; DataHub and OpenMetadata (data catalogs), Databricks Unity Catalog (catalog built into a platform), OpenLineage (lineage).&lt;/p&gt;
&lt;h2 id=&#34;data-governance&#34;&gt;Data Governance &lt;a hidden href=&#34;#data-governance&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Governance sounds like a boring word, and some parts of it are boring. But it is about very practical things: the right people can use the right data, they can trust it, and the platform does not cost more than it should. Below are the parts I think matter most.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ownership.&lt;/strong&gt; Every important dataset and pipeline needs a clear owner, usually a team, not one person. The owner answers questions, approves changes, and fixes the data when something breaks. Please record the owner in the data catalog, so anyone can find who to ask. Tables without an owner are the ones nobody dares to change or delete, so they just stay there forever. When people change teams or leave, hand over their ownership on purpose.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Access control.&lt;/strong&gt; Encrypt data in storage and in transit. Give people read access, and let only pipeline service accounts write to production tables. Know where the personal data is, and mask or restrict it. Grant access by groups and roles, not person by person. Otherwise after a year nobody can tell who has access to what.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data lifecycle.&lt;/strong&gt; Storage is cheap, but that is not a reason to keep everything forever. Decide how long each kind of data is kept, move old data to cheaper storage, and delete what you don&amp;rsquo;t need. Also make sure you can delete one person&amp;rsquo;s data across the whole platform when a privacy regulation like GDPR requires it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost.&lt;/strong&gt; In the cloud, the bill can grow faster than the data. Usually a few things take most of the money: some heavy queries, dashboards that refresh much more often than anyone looks at them, old pipelines still running for tables nobody uses. So first make the cost visible. Tag compute and queries by team and pipeline, set budgets with alerts, and shut down idle compute. Showing each team its own cost helps more than I expected. Once people see their numbers, many of them start to optimize by themselves.&lt;/p&gt;
&lt;h3 id=&#34;data-quality&#34;&gt;Data Quality &lt;a hidden href=&#34;#data-quality&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;From my experience, data quality decides whether a data team is trusted or not. One wrong number in front of the leadership team can undo months of trust, and it takes a long time to get it back.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Good data&amp;rdquo; is too vague to measure, so I break it into a few dimensions and decide which ones matter for each dataset:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Dimension&lt;/th&gt;
					&lt;th&gt;Question it answers&lt;/th&gt;
					&lt;th&gt;Example check&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Freshness&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Is the data up to date?&lt;/td&gt;
					&lt;td&gt;Yesterday&amp;rsquo;s data is ready by 7 AM&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Completeness&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Is all the data there?&lt;/td&gt;
					&lt;td&gt;Row count is close to the source, required columns have no nulls, no day or region is missing&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Accuracy&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Do the values match reality?&lt;/td&gt;
					&lt;td&gt;Total revenue matches the billing system&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Consistency&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Does the same data agree everywhere?&lt;/td&gt;
					&lt;td&gt;The same metric shows the same number on different dashboards&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Uniqueness&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Is anything counted twice?&lt;/td&gt;
					&lt;td&gt;The primary key has no duplicates&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;To actually track them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Test before publishing.&lt;/strong&gt; Load new data into a staging table, run the checks, and only move it to production if they pass. This is often called write-audit-publish. Bad data should stop here, not show up silently on a dashboard.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor over time.&lt;/strong&gt; A job can succeed and still produce wrong data. For important tables, track a few numbers like row count, freshness, null rate, and totals, and alert when they move far from normal. This catches problems nobody thought to write a test for.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Catch problems at the source.&lt;/strong&gt; Many issues come from upstream, like a renamed column or a field whose meaning changed. Agree with the producing team on what the data should look like. Some teams write this down as a &lt;strong&gt;data contract&lt;/strong&gt; and check it during ingestion.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep alerts meaningful.&lt;/strong&gt; Decide which failures stop the pipeline and which only warn. If the team gets hundreds of alerts a day, they will ignore all of them, including the important one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the most important datasets, like executive dashboards, regulatory reports, and anything customer-facing, set an &lt;strong&gt;SLA (Service Level Agreement)&lt;/strong&gt;. It is a specific promise, for example &amp;ldquo;the daily orders table is complete for the previous day by 7 AM Eastern time&amp;rdquo;, with a named owner. Then nobody argues about what &amp;ldquo;on time&amp;rdquo; means. Core upstream tables need stricter SLAs than the reports built on them, since everything depends on them. And alert before the SLA is missed. If a source is late at 5 AM, you want to know at 5 AM, not at 7.&lt;/p&gt;
&lt;p&gt;When bad data gets through anyway (it will), I handle it in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Stop it from spreading.&lt;/strong&gt; Pause the pipeline, or move the few bad rows to a quarantine table.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tell the people who use it.&lt;/strong&gt; Use lineage to find who is affected, and tell them before they find it themselves in a meeting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fix the root cause.&lt;/strong&gt; It is often upstream, so you may need the source team&amp;rsquo;s help.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repair the data.&lt;/strong&gt; Rerun the affected period from raw data. This is only safe if your jobs give the same result when run twice, so design them like that from the beginning.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prevent it next time.&lt;/strong&gt; Add a check that catches the same problem.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When I am not sure if the data is right, I hold it and tell people it is late. Most people are OK with a late report. A decision made on a wrong number is much harder to fix.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example tools:&lt;/strong&gt; Great Expectations, Soda, and dbt tests (data quality checks), Monte Carlo (data observability).&lt;/p&gt;
&lt;h2 id=&#34;data-consumption&#34;&gt;Data Consumption &lt;a hidden href=&#34;#data-consumption&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is where the platform finally creates value: BI dashboards and reports, ad-hoc SQL and notebooks, machine learning, data products and APIs, and sending data back into business tools like the CRM (often called reverse ETL).&lt;/p&gt;
&lt;p&gt;Two things make this part much smoother:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Define key metrics once.&lt;/strong&gt; Put metrics like revenue or active users in one shared place, such as a semantic layer, and let every dashboard use it. That is how you avoid two teams showing two different revenue numbers in the same meeting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make data easy to reach.&lt;/strong&gt; Data that only exists in log files or a folder nobody can query is almost the same as having no data. Sometimes a federated query engine, which can query several sources in one SQL statement, is easier than copying everything into one system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example tools:&lt;/strong&gt; Tableau, Looker, and Apache Superset (BI).&lt;/p&gt;
&lt;h2 id=&#34;where-to-start&#34;&gt;Where to Start &lt;a hidden href=&#34;#where-to-start&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After six sections this looks like a lot of work, and it is. But you don&amp;rsquo;t need all of it on day one, and I don&amp;rsquo;t recommend trying.&lt;/p&gt;
&lt;p&gt;A good first version only needs the top row. Ingest the most important sources, store them in a cloud warehouse or lake with a raw layer and a modeled layer, transform them with SQL on a real orchestration tool, and put a BI tool on top. Even at this stage, add basic data quality checks and access control. They are much harder to add later.&lt;/p&gt;
&lt;p&gt;After that, add the rest when you feel the pain. Add a catalog when people keep asking which table is the right one. Add lineage when a change breaks a dashboard and nobody knows why. Add SLAs when other teams start to build on your data, and more governance when an audit or a regulation asks for it.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>What Do Data Engineers Actually Do?</title>
      <link>https://guangyangli.com/posts/data-engineer-description/</link>
      <pubDate>Mon, 17 Jan 2022 17:03:49 -0400</pubDate>
      
      <guid>https://guangyangli.com/posts/data-engineer-description/</guid>
      <description>&lt;p&gt;Data engineering is a branch of software engineering, and it gets more attention every year as companies need more people to work on data. But the title can mean quite different jobs at different companies. Below I explain what data engineers (DEs below) do, how the job changes between companies, and then answer some questions people usually have before they switch to this role.&lt;/p&gt;
&lt;p&gt;In one sentence, a DE &lt;strong&gt;solves the company&amp;rsquo;s problems around storing and processing data&lt;/strong&gt;. The tools changed a lot over the years, from relational databases to distributed databases, and then to cloud data warehouses and data lakes. The job title changed with them, from database administrator and ETL engineer to data engineer. Today when people say DE, they basically mean someone who works on big data processing.&lt;/p&gt;
&lt;p&gt;The work has two big parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data platform&lt;/strong&gt;: building and maintaining the platform, so the company can store, transform, and analyze data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data business logic&lt;/strong&gt;: turning business logic and processes into data pipelines in code, and managing the whole lifecycle of the data on the platform&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In a real job, you may do only one of them, or both. It depends a lot on how the company is organized and what tools it chose.&lt;/p&gt;
&lt;p&gt;At &lt;a href=&#34;https://www.metacareers.com/blog/how-data-engineers-are-linking-infrastructure-and-business/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Meta&lt;/a&gt; and &lt;a href=&#34;https://www.youtube.com/watch?v=aveES6gn1Gs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Uber&lt;/a&gt;, DEs work almost only on the business side. They spend most of their time calculating business metrics and building data flows on a quite mature internal platform. So their main tool is SQL. The platform itself is built and maintained by other teams of software engineers.&lt;/p&gt;
&lt;p&gt;Many small and mid-sized companies are different. They run on a public cloud like AWS or GCP and buy ready-made data services from the cloud provider, which makes the infrastructure part much easier. A DE there builds the platform a bit like playing with Lego, picking the services that fit best. These engineers sit somewhere between DE and SDE (software development engineer), and they often own both the platform and the business logic.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=s1ntplHUjz0&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Expedia&lt;/a&gt;, where I used to work, was in the middle. A team of SDEs maintained a set of &lt;a href=&#34;https://github.com/ExpediaGroup/apiary&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;open source data lake components&lt;/a&gt;, and the data team of each business line deployed them on AWS by themselves, to build and run a data platform just for their own department.&lt;/p&gt;
&lt;h2 id=&#34;data-platform-work&#34;&gt;Data Platform Work &lt;a hidden href=&#34;#data-platform-work&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Building a data platform includes work like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Planning a &lt;strong&gt;stable and scalable storage and processing architecture&lt;/strong&gt;. Is the incoming data mostly batch or streaming? Does the output need to be real-time, or is a scheduled update enough? How fast is the data growing? The design should come from these real needs.&lt;/li&gt;
&lt;li&gt;Picking an orchestration tool and building &lt;strong&gt;reliable data pipelines&lt;/strong&gt;. The most popular tool is probably &lt;a href=&#34;https://github.com/apache/airflow&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Airflow&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Providing &lt;strong&gt;tools to support and manage the platform&lt;/strong&gt;: data catalog, data lineage, metadata management, access control, monitoring, and alerting. You can build them in-house or buy them from a vendor.&lt;/li&gt;
&lt;li&gt;Providing &lt;strong&gt;data quality tools&lt;/strong&gt; that monitor freshness, accuracy, and completeness.&lt;/li&gt;
&lt;li&gt;Providing &lt;strong&gt;query engines, query services, or interfaces&lt;/strong&gt;, so downstream teams can get data in the way they need.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automating operations&lt;/strong&gt; with tools like &lt;a href=&#34;https://github.com/hashicorp/terraform&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Terraform&lt;/a&gt; and &lt;a href=&#34;https://github.com/ansible/ansible&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Ansible&lt;/a&gt;, or the cloud&amp;rsquo;s own tools like &lt;a href=&#34;https://aws.amazon.com/cloudformation/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;AWS CloudFormation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Choosing cloud services&lt;/strong&gt;. Knowing what the cloud providers and popular SaaS data tools offer, and deciding which ones are worth bringing in.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How much work this is depends a lot on the company. A company running its own data center probably has to build its own version of almost every part, and each part can be a whole team. A company already on the cloud can cover all of it with a few people.&lt;/p&gt;
&lt;h2 id=&#34;business-logic-work&#34;&gt;Business Logic Work &lt;a hidden href=&#34;#business-logic-work&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Once the platform exists, DEs on the downstream teams run the real data jobs on it. Turning business needs into data jobs includes work like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Designing and building metrics&lt;/strong&gt;. Metrics usually come from analysts. But if you understand how a metric is calculated and why the business needs it, it is much easier to turn it into code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data modeling&lt;/strong&gt;. Designing models that fit both the input data and the output needs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Handling source data in all kinds of formats&lt;/strong&gt;, and then &lt;strong&gt;cleaning, standardizing, and transforming&lt;/strong&gt; it after it lands.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tuning jobs and queries&lt;/strong&gt;. Mostly SQL tuning, and how you tune depends on the query engine. Tuning processing jobs also depends on the tools, like &lt;a href=&#34;https://spark.apache.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Spark&lt;/a&gt;, &lt;a href=&#34;https://hive.apache.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Hive&lt;/a&gt;, &lt;a href=&#34;https://flink.apache.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Flink&lt;/a&gt;, and &lt;a href=&#34;https://kafka.apache.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Kafka&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitoring jobs&lt;/strong&gt;. For example, whether the upstream database is stable, whether the platform services are healthy, and whether the data quality is good.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In real work there is no clear line between the two sides. In big and small companies, a DE&amp;rsquo;s actual job can be any mix of the points above.&lt;/p&gt;
&lt;h2 id=&#34;common-questions&#34;&gt;Common Questions &lt;a hidden href=&#34;#common-questions&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;That is the general picture, and it is probably too rough if you are really thinking about switching. So below are some questions people usually ask.&lt;/p&gt;
&lt;h3 id=&#34;does-a-data-engineer-need-strong-coding-skills&#34;&gt;Does a Data Engineer Need Strong Coding Skills? &lt;a hidden href=&#34;#does-a-data-engineer-need-strong-coding-skills&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It depends on which side the job is on.&lt;/p&gt;
&lt;p&gt;If the team builds parts of the data platform by itself, it expects about the same coding skills from a DE as from a software engineer. What these engineers ship is a service or software that people inside the company use to work with data.&lt;/p&gt;
&lt;p&gt;But most DE jobs on the market are on the business side. There, the coding bar is a bit lower than for software engineers, but the SQL bar is much higher. Typical coding work is writing data processing jobs and orchestration code. DE jobs also usually ask for big data experience, because many projects need the team to understand distributed tools, and that is closely related to how well you read and write code.&lt;/p&gt;
&lt;h3 id=&#34;what-is-on-call-like-for-a-data-engineer&#34;&gt;What Is On-Call Like for a Data Engineer? &lt;a hidden href=&#34;#what-is-on-call-like-for-a-data-engineer&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;On the platform side, you maintain a set of data tools for internal users, so on-call means keeping these tools working and handling issues people report. Internal users are much easier to talk to and test with than external users, and they rarely send strange inputs to your software. So the pressure is relatively low.&lt;/p&gt;
&lt;p&gt;On the business side, it depends on where your data sits in the company. A company with many business lines usually has a central data team upstream that manages the core data, and each business line has its own team for its own data downstream. The core data team has much more pressure. It has to meet strict SLAs, like data freshness, so the downstream data can be ready on time. When something breaks, they need to find a workaround quickly and backfill the data before the SLA is missed.&lt;/p&gt;
&lt;p&gt;For downstream teams, the pressure depends on who uses their data. A BI team serves internal analysts, for example people building dashboards in Tableau. These users usually don&amp;rsquo;t need real-time data and are more tolerant of delays, so I would say this team has the easiest on-call. But if the users are external, for example a government regulator, a delay or missing data can lead to a fine or even losing a license. Then the team needs enough people to keep the data available, and the on-call pressure is quite high.&lt;/p&gt;
&lt;h3 id=&#34;what-career-paths-does-a-data-engineer-have&#34;&gt;What Career Paths Does a Data Engineer Have? &lt;a hidden href=&#34;#what-career-paths-does-a-data-engineer-have&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As a branch of software development, the DE career path is not very different from an SDE&amp;rsquo;s. Engineers who mostly build platforms can go deeper into architecture and become a &lt;strong&gt;data platform architect&lt;/strong&gt;, or move to &lt;strong&gt;SDE&lt;/strong&gt; roles closer to infrastructure. Engineers on the business side can also move to data infra SDE roles, or go deeper into one use of data and become a &lt;strong&gt;machine learning engineer&lt;/strong&gt;, a &lt;strong&gt;data visualization engineer&lt;/strong&gt;, or a &lt;strong&gt;data scientist&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you want to move into management, in my opinion a data platform team is a good place to start. As more companies make decisions based on data, the platform team is becoming a core team in many of them. Compared with business teams, it is usually more stable, and its work often has a bigger impact.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Does Your Company Need a Data Platform? Why and When</title>
      <link>https://guangyangli.com/posts/how-to-build-enterprise-data-platform/</link>
      <pubDate>Mon, 27 Sep 2021 17:03:49 -0400</pubDate>
      
      <guid>https://guangyangli.com/posts/how-to-build-enterprise-data-platform/</guid>
      <description>
&lt;h2 id=&#34;what-is-an-enterprise-data-platform&#34;&gt;What Is an Enterprise Data Platform? &lt;a hidden href=&#34;#what-is-an-enterprise-data-platform&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When people talk with me about data platforms, the most common question is actually not &amp;ldquo;how do we build one?&amp;rdquo;. It is &amp;ldquo;do we really need one?&amp;rdquo;. To be honest, it depends a lot on the company.&lt;/p&gt;
&lt;p&gt;First, what I mean by the term. Collecting and processing data is not new. A factory line has sensors producing data all the time, and a sales company produces sales data every second. By &amp;ldquo;enterprise data platform&amp;rdquo;, I mean the shared foundation that collects data from all over the company, cleans it, stores it in one place, and gives it to whoever needs it: a finance analyst, a machine learning model, or a customer-facing app. So it is the whole chain, from getting data in, to transforming and storing it, controlling who can see it, and serving it to many users at the same time.&lt;/p&gt;
&lt;p&gt;Building one costs a lot of money and people. So here I put the &amp;ldquo;how&amp;rdquo; aside, and focus on the two questions that come first: why does a company need one, and when is the right time to build it?&lt;/p&gt;
&lt;h2 id=&#34;why-companies-need-a-data-platform&#34;&gt;Why Companies Need a Data Platform &lt;a hidden href=&#34;#why-companies-need-a-data-platform&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&#34;what-the-business-actually-needs-from-data&#34;&gt;What the Business Actually Needs From Data &lt;a hidden href=&#34;#what-the-business-actually-needs-from-data&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Every time I join a new company, I like to ask people what they want from data. The answers almost always fall into the same four groups, no matter how big the company is or which industry it is in.&lt;/p&gt;
&lt;figure&gt;
  &lt;a class=&#34;figure-link&#34; href=&#34;https://guangyangli.com/posts/how-to-build-enterprise-data-platform/images/data-use-cases.png&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
    &lt;img src=&#34;https://guangyangli.com/posts/how-to-build-enterprise-data-platform/images/data-use-cases.png&#34; alt=&#34;Four things companies need from their data: better decisions, smoother operations, better products, and compliance and risk control&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1586&#34; height=&#34;1098&#34;&gt;
  &lt;/a&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Making better decisions.&lt;/strong&gt; This is classic business intelligence (BI): standard reports, dashboards, KPIs, and analysis for finance, sales, HR, and marketing. The leadership team wants to see how the business is really doing, and decide based on numbers instead of feelings. A big part of this is having one version of the truth. I have been in many meetings where two teams brought two different numbers for the same metric, and the whole meeting turned into a discussion about whose spreadsheet was right. This happens in companies of every size.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Running the business more smoothly.&lt;/strong&gt; A lot of data work is about daily operations, not big strategy: inventory levels, delivery times, support ticket backlogs, or the weekly report someone spends every Monday morning putting together by hand. In fact, every company I have worked for had some kind of &amp;ldquo;Monday report&amp;rdquo;. A platform can automate this work, and also send clean data back into the tools people already use, like the CRM or the marketing system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Building better products and customer experiences.&lt;/strong&gt; This is where data mining and machine learning come in: personalized recommendations, demand forecasting, predictive maintenance, supply chain optimization, and so on. Some companies go further and make data a product itself, like analytics features inside their app, or data extracts they deliver to clients. Here the result is not a report. The data goes back into the business automatically.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Staying compliant and managing risk.&lt;/strong&gt; This one is less exciting. But from my experience, it is often the reason the budget gets approved, especially in bigger companies. Depending on your industry and where you operate, regulations like GDPR, CCPA, HIPAA, or SOX mean you need to know what data you have, where it lives, who can see it, and how long you keep it. Auditors also want numbers you can prove. Fraud detection and internal risk control are basically data problems too.&lt;/p&gt;
&lt;h3 id=&#34;why-not-just-give-each-team-its-own-tools&#34;&gt;Why Not Just Give Each Team Its Own Tools? &lt;a hidden href=&#34;#why-not-just-give-each-team-its-own-tools&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You could meet each of these needs separately: a BI tool for finance, a script for the ops report, a separate pipeline for the data science team. Most small companies start this way, and honestly, it works for a while. I did the same thing before. But as more teams need data, these separate solutions start to cause problems for each other. A shared platform gives you some things that separate tools cannot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One source of truth.&lt;/strong&gt; Metrics are defined once, so &amp;ldquo;revenue&amp;rdquo; or &amp;ldquo;active customer&amp;rdquo; means the same thing on every dashboard.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connected data.&lt;/strong&gt; The interesting questions usually cross team lines, like how marketing spend relates to support tickets and churn. You can only answer them if the data lives together.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Less duplicate work.&lt;/strong&gt; Data is ingested and cleaned once, not five times by five teams in five slightly different ways.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Self-serve access.&lt;/strong&gt; People find and query data themselves, instead of filing a ticket and waiting for an engineer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Governance in one place.&lt;/strong&gt; Access control, privacy rules, retention, and audit trails are set up once and applied everywhere, instead of being spread across many tools that nobody fully controls.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;the-hidden-cost-of-not-having-one&#34;&gt;The Hidden Cost of Not Having One &lt;a hidden href=&#34;#the-hidden-cost-of-not-having-one&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The cost of a data platform is easy to see. There is a bill from the vendor, and there is a team. The cost of not having one is spread in many places, so it is easy to miss. From what I have seen, it is often bigger:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Engineers get pulled into one-off data requests instead of building the product&lt;/li&gt;
&lt;li&gt;Decisions are made on stale or incomplete data, or on no data at all&lt;/li&gt;
&lt;li&gt;Every new regulation or audit becomes an emergency&lt;/li&gt;
&lt;li&gt;The ML project that looked great in a demo never reaches production, because no reliable data feeds it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these show up in the budget, so people tend to ignore them.&lt;/p&gt;
&lt;p&gt;This is not only a problem for big companies. Actually, some of the most serious data issues I have dealt with were in smaller companies. When there is no platform and nobody owns the data, the cause is usually very simple: a script that quietly stopped running, or a spreadsheet formula someone changed. Wrong numbers can stay in reports for weeks before anyone notices. And because the raw data was often not saved anywhere, there may be no way to fix the history.&lt;/p&gt;
&lt;h3 id=&#34;why-it-matters-more-now&#34;&gt;Why It Matters More Now &lt;a hidden href=&#34;#why-it-matters-more-now&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Companies have built data warehouses for more than 30 years, so what is different now? There is much more data, it comes from many more places, and many more people want to use it. Even a small company often uses dozens of SaaS tools, and each one holds a slice of its data. With machine learning and AI, data is not only for reports anymore. Your product starts to depend on it.&lt;/p&gt;
&lt;p&gt;At the same time, building a platform became much cheaper. A data warehouse used to mean expensive servers and software licenses, sometimes even a special hardware appliance, plus a team to run it. For most smaller companies that was too much. Today, cloud warehouses, lakehouses, and managed ingestion tools let a small team get a solid platform running in weeks, and many of them charge by usage. So the need went up and the cost went down at the same time. This is why the data platform is no longer only for big enterprises, and most growing companies will need one sooner or later.&lt;/p&gt;
&lt;h2 id=&#34;when-does-a-company-need-a-data-platform&#34;&gt;When Does a Company Need a Data Platform? &lt;a hidden href=&#34;#when-does-a-company-need-a-data-platform&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&#34;signs-you-have-outgrown-your-current-setup&#34;&gt;Signs You Have Outgrown Your Current Setup &lt;a hidden href=&#34;#signs-you-have-outgrown-your-current-setup&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When a company is small, low-code tools cover most data needs. Honestly, Excel can already do a lot. In my experience, no company builds a data platform just because it sounds cool. They are pushed by problems that keep getting worse. These are the signs I usually look for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Different teams report different numbers for the same metric, and nobody can explain why&lt;/li&gt;
&lt;li&gt;Analysts spend more time finding and cleaning data than analyzing it&lt;/li&gt;
&lt;li&gt;Simple questions like &amp;ldquo;how many active customers did we have last quarter?&amp;rdquo; take days, because someone has to pull data from three systems by hand&lt;/li&gt;
&lt;li&gt;Reports run directly on production databases and slow down the actual product&lt;/li&gt;
&lt;li&gt;Important data is stuck in log files, spreadsheets on someone&amp;rsquo;s laptop, or a vendor system nobody can query&lt;/li&gt;
&lt;li&gt;Every team builds its own little pipeline, so the same data is copied and transformed five different ways&lt;/li&gt;
&lt;li&gt;When an auditor or a customer asks where a number came from, nobody can tell them&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If two or three of these sound familiar, it is worth starting the discussion. If most of them do, you are probably already late. Another way to decide is to compare what these problems already cost you with what a platform would cost to build and run.&lt;/p&gt;
&lt;h3 id=&#34;events-that-usually-trigger-it&#34;&gt;Events That Usually Trigger It &lt;a hidden href=&#34;#events-that-usually-trigger-it&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Sometimes the push does not come from slowly growing problems, but from a specific event. These are the ones I have seen many times:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rapid growth.&lt;/strong&gt; More customers, products, and teams means more data and more people asking questions. What works for 50 people often stops working for 500. Usually the first thing that breaks is the one person who knows where all the data is.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A merger or acquisition.&lt;/strong&gt; Suddenly there are two of everything, two CRMs and two finance systems, and leadership wants one combined view of the business.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A new regulation or audit.&lt;/strong&gt; Requirements like GDPR or SOX force you to know exactly where your data is and who can access it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Launching an ML or data product.&lt;/strong&gt; Models and customer-facing data features need reliable, fresh data, not a monthly export.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Moving to the cloud.&lt;/strong&gt; If you are migrating systems anyway, it is a good moment to rethink how data flows between them, and to finally deal with the old systems nobody dares to turn off.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The data team becomes the bottleneck.&lt;/strong&gt; When data requests come in faster than the team can finish them, hiring more people won&amp;rsquo;t fix it. People need a foundation where they can serve themselves.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;when-you-probably-dont-need-one-yet&#34;&gt;When You Probably Don&amp;rsquo;t Need One Yet &lt;a hidden href=&#34;#when-you-probably-dont-need-one-yet&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I think many people skip this part, so I want to say it clearly. For many early-stage startups, the bigger risk is not missing a platform. It is spending months building one when the team should focus on the product. Of course, it is different if data is the core of your product. In my opinion, you can wait if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You have only a few data sources, and they rarely need to be combined&lt;/li&gt;
&lt;li&gt;The tools you already have (your product&amp;rsquo;s database, your CRM&amp;rsquo;s built-in reports) answer the questions people actually ask&lt;/li&gt;
&lt;li&gt;Nobody would use the platform yet. A platform without real use cases becomes an expensive, empty warehouse&lt;/li&gt;
&lt;li&gt;Nobody can own it. A data platform is not a one-time project, and without an owner it slowly breaks down&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are not there yet, start small. Put a BI tool on a replica of your database, write down how your key metrics are defined, and ask the question again in six months. And when the time comes, the first version doesn&amp;rsquo;t need to be big. A cloud data warehouse, a ready-made ingestion tool, a BI tool, and one person responsible for the data are enough for quite a long time.&lt;/p&gt;
&lt;h3 id=&#34;one-platform-or-several&#34;&gt;One Platform or Several? &lt;a hidden href=&#34;#one-platform-or-several&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;After you decide you need a platform, there is one more question, mostly for larger companies: does the whole company need one, or does each part of the business need its own?&lt;/p&gt;
&lt;p&gt;A data platform ties together data from all over the company, so it is naturally centralized. For small and mid-sized companies, and for big companies with one line of business or well-established processes, one central platform can hold all the data. It connects every system and every team, and keeps teams from building the same thing twice.&lt;/p&gt;
&lt;p&gt;But if a company has many brands or a very complex business, the teams may not need to connect their data much, and one central platform is worth less. For example, brands that run independently, or business lines in totally different industries, may be better off with their own platforms. At large companies, I have also seen one central data team become a bottleneck when dozens of departments need things from it at the same time. At that size, the hardest part is often the people, not the technology: getting many teams to agree on the same definitions, and on who owns what. So it depends on how your company is structured, how big it is, and whether connecting data across teams really creates value.&lt;/p&gt;
&lt;p&gt;Several platforms in one company can still share the same cloud infrastructure and similar tech stacks, which keeps maintenance cost down. And the data is not split forever. If the platforms need to work together later, there are ways to do it. &lt;strong&gt;Data federation&lt;/strong&gt; uses a query engine that reads from several platforms in one query, so people get data from all of them without copying everything into one place. &lt;strong&gt;Data mesh&lt;/strong&gt; is more about organization: each business domain owns its data and publishes it as a product with shared standards, so other teams can find and use it.&lt;/p&gt;
&lt;h2 id=&#34;if-you-decide-to-build-one&#34;&gt;If You Decide to Build One &lt;a hidden href=&#34;#if-you-decide-to-build-one&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;How to build a data platform is a big topic, and I wrote about it in &lt;a href=&#34;https://guangyangli.com/posts/key-components-of-data-platform/&#34;&gt;How to Build a Data Platform: The Six Key Components&lt;/a&gt;. But a few things I would keep in mind from the first day:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Start from use cases, not tools.&lt;/strong&gt; Write down who will use the platform and for what, before you pick any technology. If your analysts look at yesterday&amp;rsquo;s data every morning, you don&amp;rsquo;t need real-time streaming.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use the cloud by default.&lt;/strong&gt; For most companies, cloud means no hardware to buy, scaling up and down as needed, paying for what you use, and built-in tools that help with compliance. Compliance is still your own job though, the cloud provider only covers its part. If you have strict security rules, a hybrid setup can keep sensitive data on-prem and use the cloud for the rest.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep the raw data, and model the rest.&lt;/strong&gt; Keep data close to its original form so you can always rebuild, then build clean, well-defined tables on top for people to use.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check the data before people see it.&lt;/strong&gt; Test data before it reaches a dashboard, and make sure jobs can be rerun safely. One wrong number in front of executives can undo months of trust.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Give it an owner.&lt;/strong&gt; A platform needs a team responsible for it, with people who understand the data itself, not only the code.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>