How DeepMorph Turns a Codebase into a Queryable Graph on Iceberg with PuppyGraph
The case study

Summary
Questions such as what breaks if a field changes, or which business rules depend on it, mean following connections from data through code to business logic, often across several repositories. DeepMorph models an enterprise codebase as a graph that makes those connections explicit, linking functions to the data they touch, the flows they serve and the rules they implement. The graph is stored in Apache Iceberg with a snapshot for every commit, and PuppyGraph runs Cypher directly on those tables, including past versions. On Kill Bill, an open-source billing platform, DeepMorph demonstrated impact and compliance questions answered as graph queries.
The Challenge: Data Questions Whose Answers Live in Code
Data teams version their data, track its lineage and govern who can access it. The code that produces and uses that data rarely gets the same treatment. It sits in Git as text that nobody can query.
Yet many data questions are answered in that code. Which logic writes this column? What breaks if it changes? Where does this rule actually live? In a billing system, changing the invoice status field touches the code that validates it, the logic that filters on it and the business rules that depend on it. Today, someone who needs those answers usually files a ticket with the engineering team and hopes for a quick reply.
Reading the code by hand is slow. Asking an LLM is faster, but the model sees only what fits in its context window, which for a large codebase is a sample rather than the whole system. Ask twice and it may give two different answers, with no way to tell what it missed. The gap widens as AI coding agents write more code than people can read.
The Solution: A Codebase Graph on Iceberg, Queried with PuppyGraph
DeepMorph's answer is to put the code in the lake as a graph, so that each of these questions becomes a query. A query covers every path and gives the same answer each time, traced back to the code.

Learning the codebase in four layers
DeepMorph models a codebase in four layers:
- Structure: files, functions and the calls between them.
- Data journeys: the code that writes a field such as
invoice.status, the tables that read it, and how a value moves from one system to another. - Scenarios: business flows, such as a customer paying an invoice.
- Business logic: the rules, such as when an invoice's status may change.
Code tools typically stop at the structure layer. The questions about invoice status need a walk up all four.

DeepMorph builds the graph with a process it calls auto-learn. Structure and data journeys are derived deterministically from code, configuration and data flow. Scenarios and rules are proposed from code, data and documentation, each linked to its evidence and checked automatically against it before a person sees it. People then approve rules rather than reviewing every line, and where the code does not match the business's intention, a reviewer can correct the rule and DeepMorph keeps that decision. The graph updates on every commit.
Keeping every version in Iceberg
DeepMorph stores the graph in Iceberg as node and edge tables. Snapshots were the main reason for that choice. A codebase changes through commits every day, and with an Iceberg snapshot matched to each commit, the business logic gets time travel: the graph can be queried as of any release, and any two versions can be compared.
Snapshots also make it possible to check a change after the code is written. DeepMorph compares the business-logic graph at the snapshot before a commit with the snapshot after it. The result is a business diff for a person to confirm: the rules that changed, the flows affected, and confirmation that everything else is unchanged. DeepMorph sees this as a way to validate code produced by AI agents.
Iceberg also puts the code graph in the same catalog as the tables it explains. A query can combine business rules and user journeys with business performance data, for example to ask which user journey produces the most revenue. Any engine can read the tables, with SQL for dashboards and Cypher for graph questions. Because code is sensitive, keeping it in Iceberg also keeps it inside the organization's own lake and governance.
Querying the graph in place with PuppyGraph
Several engines serve the same graph, each for a different job. A separate graph database serves the latest graph online with low latency. PuppyGraph runs Cypher directly on the Iceberg tables, so every snapshot of the code graph can be queried without loading it into a separate store. DeepMorph uses it for history and scale. It chose PuppyGraph entirely for its performance, which matters most as a graph grows large. Both graph engines use Cypher, so graph questions are written the same way whether they target the live graph or its history. SQL engines such as Spark and Trino read the same tables.
"We choose PuppyGraph... it's 100% due to its performance. So fast, especially when you have a large chunk of the data inside this graph."
Bin Ni, Co-founder and CEO, DeepMorph
AI agents reach the graph through an MCP server, and engineers, analysts and data scientists use it through DeepMorph's product.
Answering questions on Kill Bill
DeepMorph demonstrated the approach on Kill Bill, an open-source billing platform spread across four repositories.
Asked what breaks if the invoice status field changes, DeepMorph traced the field from the invoice record to the functions that validate, persist and filter on it, and up to the one business rule gated on it, Void Restricted to DRAFT Invoices, which allows an invoice to be voided only while it is a draft. Changing the status values therefore means revisiting a business rule, not only updating code. Twelve Cypher queries sat behind the answer.
A compliance question produced a capability map of audit trail retrieval, access control and account data export, each traced from user-facing behavior down to the rules enforcing it in code. The map also listed what the graph could not confirm, such as GDPR-specific handling, as items for source-level review.
The Result: A Codebase That Can Be Queried Like Data
With the codebase modeled as a graph, questions that once meant reading code or filing a ticket become graph queries, and each answer traces back to the functions, flows and rules involved. Because the graph lives in Iceberg with a snapshot for every commit, and PuppyGraph queries those tables in place, every version of a codebase's business logic stays queryable without loading it into a separate graph store.
Further resources
Start free. Pay when it goes to production.
Contact us for any questions about capabilities, sizing and support.
* No payment required to start either one.
$ docker run -p 8081:8081 \
-p 8182:8182 -p 7687:7687 \
puppygraph/puppygraph:latestPulling puppygraph/puppygraph:latestStarting PuppyGraphWeb console listening on 0.0.0.0:8081Gremlin endpoint listening on 0.0.0.0:8182PuppyGraph is running# no pipelines · no second database · no data movement