
%20Large.png)
SCD Type 2 Star Schema from a Jira Ticket, Built by Maia
A Jira ticket asks for a gold layer star schema: one fact table, five dimensions, one of them slowly changing, hashed surrogate keys and nine acceptance criteria. The presenter's estimate for building that by hand is days or weeks.
In this demo, Maia takes the ticket from a Jira backlog to a validated schema in about 20 minutes. The speed is the headline. The useful part is how the work gets done. Maia plans first, the engineer corrects two design choices mid-build, and Maia finds two data problems in a run that reported success.
The Ticket: GREEN-12
The scenario is Green Wave Produce, a fictional sustainable agriculture company whose data team tracks its work in Jira. Each epic covers a project from raw source to dashboards, with tasks that move data through a medallion architecture. The bronze and silver tasks are done. The engineer picks up GREEN-12: build the gold layer star schema for agricultural operations, so analysts can compare yield, shipping performance and profitability across farms, products, regions and time.
The ticket spells out the design:
- Source data comes only from the existing silver tables.
- One fact table with a defined grain and set of measures.
- Five dimensions: farm, product, region, date and quality.
- The farm dimension is SCD Type 2 on soil pH. The other four are Type 1, so changes simply overwrite.
- Surrogate keys are generated by hashing the natural key.
- The Type 2 dimension carries effective start and end dates and a current-row flag.
- The fact table includes a data quality score and lineage tracking columns.
- Dimension pipelines run in parallel. The fact runs only after all dimensions have loaded.
- Nine acceptance criteria.
Get the Ticket into Maia
The engineer starts a new conversation and asks Maia to build a pipeline that loads open tasks from the GREEN project. Maia finds the Jira connector, asks for the authentication method, Atlassian URL, username and secret reference, and configures the component with the API token stored as a project secret. It loads 13 open tasks. The engineer picks GREEN-12.
Plan Mode: Review Before Build
Maia asks to switch to plan mode and returns a plan the engineer can review. It covers one fact table and five dimensions sourced only from silver, SHA-2 based surrogate keys, parallel dimension loading and an overarching orchestration. The plan includes a diagram of the fact table and its five dimensions, the grain, the measures, the foreign keys, the data quality scoring and the lineage columns.
The presenter is clear about why this step matters in Maia Foundation: with a human in the middle, a better plan gives a better outcome, and anything the plan misses can be corrected during the build. He approves it.
Build the Dimensions
Maia first creates the tables for all dimensions and the fact, then builds the four Type 1 dimensions in parallel: product, region, quality and date. It leaves the farm dimension for last because it needs the Type 2 logic.
For that, Maia uses the Detect Changes component. It compares the incoming data with the existing dimension and adds an indicator column that marks each row as new, changed, deleted or identical. When a farm's soil pH changes, the prior active row is inactivated and a new active row is inserted. Effective dates and the current flag keep the history queryable.
Surrogate Keys and the Fact Table
The fact table sources from the silver tables, joins them and computes the measures. It needs no lookups against the dimension tables, and that is the point of hashed surrogate keys. The fact load applies the same hash formula as each dimension, so the keys match without a join.
The farm dimension is the interesting case. Its natural key is farm ID plus soil pH, because a pH change creates a new row. The simpler dimensions hash a single code, such as the product code or region.
Where the Engineer Steps In
The build runs on its own, but the engineer interrupts twice. Both are design calls Maia hadn't been told.
First, Detect Changes should use the dimension table as its master, not the source. The engineer spots this while Maia is about to sample and tells it so. Second, the date dimension shouldn't load dates from silver. It should be self-generated. The engineer stops Maia mid-way through the fact build to say so, and Maia agrees that a proper date dimension shouldn't depend on source data. It regenerates the table: 3,653 dates from 2020 to 2029, roughly ten years, because the engineer gave no specific range. In a real project you'd state the range.
A Successful Run Isn't a Correct Run
When Maia runs the main orchestration, everything succeeds first time. Then the validation step finds two problems. The farm dimension has zero rows, caused by an incorrect filter on the changes. The product dimension has duplicate records. Maia fixes both and reruns. The farm dimension then loads 109 rows, and the final validation checks row counts and referential integrity.
As the presenter puts it, running without error doesn't mean the output is correct. Maia checked the data, not only the run status, and this is the habit worth copying. It matches the testing approach in the automated pipeline testing demo, and the way Maia reads logs to diagnose a failed run is covered in the self-healing and log analysis demo.
Finally, the engineer asks Maia to go back to the Jira ticket and confirm the acceptance criteria. Maia reviews all nine and returns the evidence for each.
What to Take from This
The ticket did the specifying, Maia did the building and the engineer did the judging. That split is what the demo shows, and it's where an agent fits into a real data team. If you want the layers before this one, the medallion architecture demo builds bronze and silver from a ticket in the same way. For a wider view of how this changes the engineer's job, read what agentic data engineering looks like in the real world.
Watch Maia Work Through Your Next Ticket

Our latest resources
Data management


