<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dominic K on Medium]]></title>
        <description><![CDATA[Stories by Dominic K on Medium]]></description>
        <link>https://medium.com/@dvkumaraws2019?source=rss-c28a38f3f58d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GnyXwVtfCRmUzFyJ8cs0Ow.jpeg</url>
            <title>Stories by Dominic K on Medium</title>
            <link>https://medium.com/@dvkumaraws2019?source=rss-c28a38f3f58d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:35:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dvkumaraws2019/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beyond the slide: interactive Databricks reference architectures for 70 industries]]></title>
            <link>https://medium.com/@dvkumaraws2019/beyond-the-slide-interactive-databricks-reference-architectures-for-70-industries-f20603d21adb?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f20603d21adb</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-architecture]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 06:52:18 GMT</pubDate>
            <atom:updated>2026-11-27T06:52:18.822Z</atom:updated>
            <content:encoded><![CDATA[<p>Databricks has turned its reference architecture from a static diagram into a public, clickable board covering 70 industries. I think it is a useful starting point for architecture conversations, as long as nobody mistakes it for the finished design.</p><p>Most of us know the problem. A generic lakehouse picture says nothing about core banking ledgers, HL7 messages in a hospital or SCADA data at a utility. So each team redraws it, and the copies slowly drift apart. The <a href="https://www.databricks.com/blog/interactive-databricks-reference-architectures-across-70-industries">Databricks announcement</a> by Ashraf Osman, Amr Ali and Shelley Shaffery, published on 20 November 2026, sets out to fix that.</p><h3>What is on the board</h3><p>You pick an industry and a cloud (Azure, AWS or GCP), and the board shows source systems, data formats, teams and medallion layers in that sector’s language. The Databricks platform in the middle stays the same. Every box opens a panel explaining what it is, who uses it and where to learn more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6wyr8PTz0lMJIf0RmqSvA.png" /></figure><p>The <a href="https://www.databricks.com/blog/interactive-databricks-reference-architectures-across-70-industries">published figures</a> are substantial:</p><ul><li>70 industries across 11 sectors, as of 16 November 2026</li><li>700 use cases, 10 per board, of which 581 link to at least one customer story</li><li>4 Genie Agents, 4 AI/BI dashboards and 4 Databricks Apps on each board</li><li>964 source systems, 186 data formats and 1,538 personas</li><li>16 languages, including right-to-left layouts for Arabic and Hebrew</li></ul><p>The detail is where it earns its keep. A banking Gold layer talks about net interest margin and liquidity ratios, while a healthcare one talks about length of stay and patient outcomes. A simplified view suits a first conversation, and a detailed view adds things like CI/CD, monitoring and operational stores.</p><p>You can also take it away with you. Exports include PowerPoint, PDF, images, interactive HTML, draw.io, Visio, Excalidraw and YAML, and an edited YAML file can be imported again.</p><h3>How I would use it as an enterprise data architect</h3><p>I would treat a board as a set of questions to put to the business, not as an answer.</p><ol><li><strong>Open the conversation.</strong> Start with the simplified view of the closest industry. People correct a picture far more readily than they fill in a blank page.</li><li><strong>Mark the differences.</strong> Replace the example sources with your own systems. Note which formats you really receive, and who owns each one.</li><li><strong>Test it across Business Units.</strong> If your organisation spans several sectors, compare the boards. What repeats is a candidate for a shared platform capability; what differs probably belongs with the Business Unit.</li><li><strong>Challenge the Silver layer.</strong> Conformed entities such as customers and accounts, or orders and lots, are a good prompt for canonical model and glossary discussions. The boards link to the Databricks Industry Data Models for the next step.</li><li><strong>Check the region early.</strong> The region menu dims products a region cannot run, and the stage menu hides Public Preview and Beta items. That is a quick sanity check before a design review.</li><li><strong>Turn it into team learning.</strong> Each board connects its teams to free Databricks Academy courses, certifications, demos and customer stories.</li></ol><p>There is also an AI assistant, which takes a description, a whiteboard photo or a PDF and builds an editable architecture from the closest board. It runs as a Databricks App in your own workspace. The <a href="https://github.com/databricks-industry-solutions/databricks-reference-architecture">GitHub repository</a> also includes an MCP server, so tools such as Claude Code can search the architectures. The server only retrieves; any tailoring is done by the model calling it.</p><h3>What to watch out for</h3><p>The authors are clear that a board is a starting point. It does not know your systems, constraints or history, and a sub-sector can look quite different from its parent industry.</p><ul><li><strong>Freshness.</strong> Availability is checked against public documentation before board updates. Automated update pipelines are planned but were not live at publication, so check the refresh date and confirm anything critical in the official docs.</li><li><strong>Counts.</strong> When I checked on 27 November 2026, the repository page mentioned 63 industries in some places and 70 in others. A small thing, but a reminder to verify.</li><li><strong>Support and licence.</strong> The repository page links to a licence file, but I found no support policy on that page. Check both before relying on it internally.</li><li><strong>Your data.</strong> Check your own policy before uploading internal diagrams or documents to any AI assistant, even one running in your workspace.</li><li><strong>Product bias.</strong> This is a Databricks view of the world. Your integration, governance and non-Databricks platforms still need their place on the page.</li></ul><h3>Final thought</h3><p>The value here is not a prettier diagram. It is a shared, industry-aware starting point that business and technology teams can argue with. Pick your closest board, mark what is wrong with it, and you already have the agenda for your next architecture workshop.</p><p>Explore the <a href="https://databricks-industry-solutions.github.io/databricks-reference-architecture/">interactive board</a>, and use its Feedback button to tell the authors what it gets wrong.</p><p>#Databricks #DataArchitecture #EnterpriseArchitecture #Lakehouse #DataGovernance #AI</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f20603d21adb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ReAct Agents on a Governed Data Platform: What Architects Should Check First using Databricks]]></title>
            <link>https://medium.com/@dvkumaraws2019/react-agents-on-a-governed-data-platform-what-architects-should-check-first-2cef038f815e?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cef038f815e</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mls]]></category>
            <category><![CDATA[mosaicai]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 10:36:38 GMT</pubDate>
            <atom:updated>2026-11-11T10:37:01.563Z</atom:updated>
            <content:encoded><![CDATA[<p>Most data platforms were built for people who write queries and read dashboards. The next group of users is likely to be an AI agent that writes its own queries, reads the results, and decides what to ask next. A ReAct agent is one way to build that, and it puts pressure on parts of the architecture that many teams have not had to think about before.</p><h3>The loop in one picture</h3><p>ReAct stands for <strong>Re</strong>asoning and <strong>Act</strong>ing. The model writes a short thought about what it needs, takes an action such as calling a tool or running a query, reads the result as an observation, and then either answers or goes around again. The loop is simple to describe, but each pass adds tokens, latency and risk. A question that needs four passes costs roughly four times as much as one that needs a single pass, and the time to answer grows in the same way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggSJo6biTSOTxYfH2D9Zag.jpeg" /></figure><p>The part that matters most for architects is the action. Every action is a call into something you own, whether that is a SQL warehouse, an API, a search index or a document store. The agent will use those things in ways nobody wrote down in advance, because it chooses its own path through them.</p><h3>A worked example in a data platform</h3><p>Imagine a supply operations manager asks why spare parts orders fell in the third quarter. A fixed report would show the drop but not the cause. A ReAct agent can try to work it out in steps, checking one table, forming a new hypothesis, and checking another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dMSV4YtB6IpCUcxDWm_iow.jpeg" /></figure><p>The answer is useful, but the more interesting detail is the permission check. The agent only sees what its identity is allowed to see. If the agent can read raw customer tables because someone set up a shared service account, the platform has a problem regardless of how good the reasoning is.</p><h3>A second example from oil and gas</h3><p>The same pattern applies in upstream energy work, where data is spread across many systems and the right question often changes after the first result. Take a well integrity review. An engineer asks which wells in a field have shown rising annulus pressure over the last six months and whether any of them share a casing design or a workover history.</p><p>A ReAct agent could start by listing wells with pressure readings above a threshold. Once it has that list, it might decide to check the wellbore records to see which completion designs those wells use. It may then look at the maintenance and workover log to find whether any of them had interventions that could explain the trend. Each step changes what it looks at next. A fixed dashboard would need someone to build every one of those views in advance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZRmkLEFK7cXOFdmabZLTQw.jpeg" /></figure><p>For an energy company, this kind of tool has to respect more than table permissions. Well data often carries licence terms, joint venture partner restrictions and regulatory reporting rules. An agent that can see all wells across every operating licence could expose information that a person in the same role would never be allowed to see. The identity and filtering rules need to be set by the people who own those agreements, not left to the model to infer.</p><p>The OSDU data platform is a useful reference point here. It gives wells, wellbores and interpretation data a common structure, which makes it easier to build tools that work across assets. The same structure also makes it clearer which tools should exist and which data they are allowed to return.</p><h3>Building it on Azure Databricks</h3><p>On a Databricks lakehouse, the pieces of a ReAct agent map onto platform features that many teams already run. Unity Catalog holds the tables, views and functions the agent can call, and it applies the same grants, row filters and column masks that protect people’s access. Unity Catalog functions can be registered as agent tools, which keeps each tool narrow and governed in one place.</p><p>Databricks Mosaic AI Agent Framework gives a route to build, deploy and evaluate an agent on the same platform as the data, and MLflow tracing can record each thought, tool call and observation for later review. Model serving provides the endpoint, so the agent is not running on an unmanaged server with a copy of the data. Where the agent needs a model, you can choose a foundation model from the platform’s catalogue or bring your own, which matters if a regulator or client restricts where data may be processed.</p><p>The Databricks side does not remove the design work. A tool that wraps a view is only as safe as the view. An agent endpoint with a broad service principal still has broad access. The platform gives you the controls, but someone has to set them, test them and keep them under review.</p><h3>The target architecture</h3><p>The diagram below puts the pieces together. LangGraph runs the loop and holds its state. The model sits on a serving endpoint inside the Databricks workspace. Every tool call goes through the agent’s own service principal, and Unity Catalog decides what each call can see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n917m_K4KZKP4jgUQDk2aQ.jpeg" /></figure><p>From left to right. A user asks a question through a chat interface or internal app. The LangGraph graph decides the next step, calls the model endpoint for the reasoning, and calls a tool when it needs data. Checkpoints keep the state, the loop limit stops runaway cycles, and a human approval step sits in front of anything sensitive. MLflow records the trace so the path behind each answer can be reviewed later.</p><h3>What to check before you build one</h3><p><strong>Identity.</strong> Give the agent its own identity with the least privilege it needs. On Databricks, that usually means a service principal with grants limited to the approved tables and functions. Do not let it run as a developer account or a shared admin key.</p><p><strong>Tool boundaries.</strong> Each tool should have a narrow purpose and a clear input contract. A tool that accepts any SQL string is a large surface area. Views or functions with fixed parameters are easier to govern and easier to explain to an auditor.</p><p><strong>Loop limits.</strong> Set a maximum number of loops and a timeout. Without them, a confused agent can run up cost and load on the warehouse. Log every thought, action and observation so you can see why an answer was given and rebuild the path if someone challenges it later.</p><p><strong>Evaluation.</strong> A good answer can come from a bad path. Test the agent on questions where you already know the answer, and check the path it took as well as the final text. A small set of known questions, rerun after every change to the prompt or tools, catches a lot of problems early.</p><p><strong>Ownership.</strong> Decide who owns the tools, who approves new ones and who reviews the logs. The agent will draw on many domains at once, so this sits awkwardly across the Group and the business units unless someone is named for it.</p><h3>Choosing a framework</h3><p>You can build a ReAct loop with plain code, and for a small agent that may be the simplest option. Once the loop has branches, retries and approval steps, a framework starts to earn its place.</p><p>LangGraph is a good fit for this pattern because it models the loop as an explicit graph with state. That gives direct control over the loop limit, the timeout, the checkpoints and the point where a person must approve an action. Those are the controls an architect would ask for anyway, so it is easier to explain the design to a governance board when the loop is visible in code. LangGraph can run against Databricks models and Unity Catalog tools, so it does not need to sit outside the platform.</p><p>LangChain is a wider toolkit for connecting models, tools and retrieval. It is useful for prototyping, but its abstractions have changed quickly, and a heavy dependency on it can make upgrades painful. For a production system on a governed platform, I would keep the tool layer plain and use LangChain only where it saves real effort.</p><p>A framework does not solve identity, permissions or evaluation. Those still need to be designed on the platform side.</p><h3>Where ReAct fits and where it does not</h3><p>ReAct is a good match when the path to an answer is not known in advance, the data is spread across several sources, and a person will read the reasoning. Both examples above fit that description. It is a poor match for a fixed monthly calculation, a high-volume lookup or anything where the cost per question has to stay flat. In those cases a plain function call or a scheduled pipeline is simpler, cheaper and easier to govern.</p><p>The architecture work is not about the model. It is about deciding what the agent is allowed to touch, how it proves who it is, and how you will explain its answers after the fact. Those questions were already part of data governance. ReAct just makes them urgent.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cef038f815e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From OSDU Data to Governed AI Decisions with Databricks ai_decide()]]></title>
            <link>https://medium.com/@dvkumaraws2019/from-osdu-data-to-governed-ai-decisions-with-databricks-ai-decide-1141725ec126?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1141725ec126</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[mosaic-ai-vector-search]]></category>
            <category><![CDATA[osdu]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 23:34:09 GMT</pubDate>
            <atom:updated>2026-10-04T23:34:09.479Z</atom:updated>
            <content:encoded><![CDATA[<p>Oil and Gas organisations manage large volumes of Well, Wellbore, drilling, seismic, production and subsurface data. <strong>OSDU </strong>provides a common data foundation for organising and accessing much of this information.</p><p>But having governed data is only the first step.</p><p>Engineers still need to answer questions such as:</p><p>- Does this Wellbore observation require review?</p><p>- What type of drilling issue does a report describe?</p><p>- Which Well records need data remediation?</p><p>- What anomalies have been identified from seismic interpretation?</p><p>- Should an interpretation be escalated to a geophysicist?</p><p>- What information should an engineering team investigate next?</p><p>This is where Databricks can provide several complementary capabilities: SQL, Machine Learning, <em>ai_decide()</em>, and Agentic AI, all working on governed data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdL-jEnQUn0pgI38QkD_9w.png" /></figure><p>The important point is that these capabilities do different jobs.</p><h3>What is ai_decide()?</h3><p>Databricks ai_decide() allows structured AI-assisted decisions to be made directly from SQL.</p><p>The basic pattern is:</p><pre>ai_decide(state, questions [, options])</pre><p>The <em>state </em>contains the information that needs to be assessed.</p><p>For example:</p><pre>{<br>  &quot;well_name&quot;: &quot;NORTH-21&quot;,<br>  &quot;wellbore_name&quot;: &quot;NORTH-21-ST1&quot;,<br>  &quot;operation&quot;: &quot;Drilling&quot;,<br>  &quot;torque_trend&quot;: &quot;Increasing&quot;,<br>  &quot;vibration&quot;: &quot;Intermittent high vibration&quot;,<br>  &quot;drilling_comment&quot;: &quot;Increasing torque and vibration observed over the last 30 metres.&quot;<br>}</pre><p>We can then ask several structured questions against the same Wellbore context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqQ6g8eVbKE21Eaz193c7A.png" /></figure><p>ai_decide() supports three useful patterns:</p><ul><li><strong>noul</strong><br>- Purpose: Probability that something is true<br>- Example: Does this observation require review?</li><li><strong>choice</strong><br>- Purpose: Select from defined categories<br>- Example: Drilling, equipment or data issue?</li><li><strong>score</strong><br>- Purpose: Score against ordered criteria<br>- Example: What is the review priority?</li></ul><p>Instead of generating a long text response, the function produces structured output that can become part of a data pipeline.</p><h3>A Simple Wellbore Example</h3><p>Consider a drilling observation:</p><blockquote>Increasing torque and intermittent vibration have been observed while drilling the current section. No mud losses have been reported.</blockquote><p>A simplified workflow could be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MxhPU2YcovTDV7EnDfnh-Q.png" /></figure><p>The AI result becomes another governed data product rather than disappearing inside an application.</p><h3>Unity Catalog as the Governance Layer</h3><p>Unity Catalog provides a unified governance layer for data and AI assets in Databricks.</p><p>It can be used to govern:</p><ul><li>tables and files</li><li>functions</li><li>features</li><li>ML models</li><li>AI assets</li><li>agents and supporting resources</li></ul><p>It also supports access control, auditing, discovery and lineage.</p><p>For an OSDU architecture, this creates a clear governance boundary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-WiFYIKHFWb17m6sJ0b5g.png" /></figure><p>This is important because data governance and AI governance should not become two completely separate architectures.</p><h3>Where Machine Learning Fits</h3><p>Not every problem is an LLM problem.</p><p>Seismic interpretation is a good example.</p><p>Large seismic datasets contain spatial and signal patterns that are better suited to numerical and deep-learning models than to a language model.</p><p>Machine Learning could support:</p><ul><li>seismic facies classification</li><li>fault identification</li><li>horizon interpretation</li><li>anomaly detection</li><li>lithology prediction</li><li>reservoir property prediction</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDEgK1J6sT4pU74ALkb5lw.png" /></figure><p>MLflow can be used to track experiments, metrics and models, while Unity Catalog can govern registered models and their access.</p><h3>Combining ML with ai_decide()</h3><p>The more interesting pattern is to combine numerical ML results with contextual decision making.</p><p>For example, an ML model might detect a possible fault. ai_decide() could then evaluate that result alongside Well data and existing interpretation context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xlDkD9BVgFjrou61HvpfnQ.png" /></figure><p>The separation is useful:</p><ul><li>ML identifies patterns.</li><li>ai_decide() evaluates contextual questions.</li><li>The geoscientist makes the final interpretation.</li></ul><h3>Where Agentic AI Fits</h3><p>Some Oil and Gas workflows require more than a single decision.</p><p>An engineer or geoscientist may need to:</p><ol><li>find the relevant Well,</li><li>retrieve Wellbore information,</li><li>check nearby seismic interpretation,</li><li>search previous reports,</li><li>query an ML prediction,</li><li>compare historical observations,</li><li>decide what needs investigation.</li></ol><p>That is closer to an Agentic AI problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r8AqjytTJ7jHEIcCbNMa-A.png" /></figure><p>Here, the agent does not replace ai_decide().</p><p>It can use ai_decide() as one of its tools.</p><h3>Governance Becomes More Important with Agents</h3><p>Once agents can call tools and access multiple datasets, governance becomes even more important.</p><p>An agent should not have unrestricted access to the entire OSDU estate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6uU1-Qkhcu6E3Fw9tWnH3g.png" /></figure><p>This gives the enterprise a clearer way to control:</p><ul><li>who can access which data</li><li>which models can be used</li><li>which tools an agent can execute</li><li>how outputs are audited</li><li>how AI usage and cost are monitored</li></ul><h3>Cost Benefit</h3><p>The value of ai_decide() is not simply that AI inference is cheaper.</p><p>The bigger benefit can be a lower total cost of ownership.</p><p>A conventional implementation may require:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MgNmcJY_wMb7nIODh0iflg.png" /></figure><p>For a relatively simple decision workload, ai_decide() can reduce this to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z9Dk3n6bD7uzKRNnjsocTg.png" /></figure><p>This can reduce:</p><ul><li>application development</li><li>separate infrastructure</li><li>SDK integration</li><li>secret management</li><li>response parsing</li><li>deployment complexity</li><li>operational support</li></ul><p>There is still an AI inference cost. The saving comes mainly from reducing the architecture around the AI call.</p><h3>Data Governance Benefit</h3><p>Keeping AI closer to governed Databricks data reduces unnecessary data movement.</p><p>Without an integrated architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0pzsdbHoZ_B220VnqdGbw.png" /></figure><p>With Databricks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIyFwhqhrAPVsKA0YHVKlA.png" /></figure><p>This makes it easier to maintain:</p><ul><li>access control</li><li>data classification</li><li>lineage</li><li>auditability</li><li>ownership</li><li>quality controls</li></ul><h3>AI Governance Benefit</h3><p>As AI adoption grows, one of the biggest enterprise risks is AI sprawl.</p><p>Different teams can quickly create their own model integrations, API keys, agents, prompts, tools and security controls.</p><p>A governed platform approach helps centralise those controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*724y97ifX-rPG9wXdfdkPw.png" /></figure><p>This gives the enterprise a much clearer way to answer:</p><ul><li>Who can use this model?</li><li>Which agent can access this Well data?</li><li>What tools can the agent execute?</li><li>What model produced this output?</li><li>Which data contributed to the result?</li><li>What did the workload cost?</li></ul><h3>Use the Right Tool for the Problem</h3><p>The main architectural decision is not whether to use AI.</p><p>It is deciding which type of intelligence belongs where.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NHyYrzUq6w47tI1TvBfDFQ.png" /></figure><h3>Choosing the Right Approach</h3><p>Not every engineering problem needs AI. The right approach depends on how deterministic, predictive, contextual, or autonomous the task needs to be.</p><ul><li><strong>Fixed drilling thresholds</strong> are best handled with <strong>SQL or engineering rules</strong>. These are deterministic, transparent, and easy to govern.</li><li><strong>Reservoir property prediction</strong> is a good fit for <strong>Machine Learning</strong>, where historical subsurface data can be used to estimate future or unknown values.</li><li><strong>Seismic fault detection</strong> typically requires <strong>Machine Learning or Deep Learning</strong>, especially when analysing complex seismic patterns at scale.</li><li><strong>Wellbore observations that need review</strong> can be evaluated using <strong>ai_decide()</strong>, where natural-language context needs to be converted into a governed decision.</li><li><strong>Engineering text classification</strong> is also a strong use case for <strong>ai_decide()</strong>, particularly for categorising reports, observations, and operational notes.</li><li><strong>Investigating a Well across multiple systems</strong> is better suited to <strong>Agentic AI</strong>, where the agent may need to query OSDU data, retrieve documents, invoke tools, and combine results.</li><li><strong>Searching reports and correlating them with Well data</strong> fits an <strong>Agent + Retrieval</strong> pattern, combining structured OSDU data with unstructured engineering documents.</li><li><strong>Final Well integrity decisions</strong> should remain with the <strong>Engineer or Geoscientist</strong>, supported by governed data, ML predictions, AI decisions, and agent-generated context.</li></ul><p>The key principle is simple: use deterministic rules where possible, ML where prediction is required, ai_decide() where contextual judgement is needed, and Agentic AI where the task requires multi-step investigation across tools and data sources. Human experts remain accountable for high-impact engineering decisions.</p><h3>The Bigger Architecture</h3><p>Putting everything together gives a broader Oil and Gas AI architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uAq-EaZTe-EpNif6wes1Ig.png" /></figure><p>OSDU provides the domain data foundation.</p><p>Unity Catalog provides the governance layer.</p><p>Machine Learning identifies patterns and makes predictions.</p><p>ai_decide() turns context into controlled decisions.</p><p>Agentic AI brings these capabilities together for more complex investigations.</p><p>And the engineer or geoscientist remains responsible for consequential operational and technical decisions.</p><h3>Final Thoughts</h3><p>ai_decide() should not be viewed as simply another way to call an LLM.</p><p>Its value becomes clearer when it sits inside a governed Databricks architecture alongside OSDU, Unity Catalog, MLflow, Machine Learning and Agentic AI.</p><p>For an Oil and Gas organisation, this approach can support:</p><ul><li>governed OSDU data products</li><li>Well and Wellbore decision workflows</li><li>ML-based seismic interpretation</li><li>contextual decisions using ai_decide()</li><li>Agentic AI for multi-step engineering investigations</li><li>model tracking and evaluation through MLflow</li><li>data and AI governance through Unity Catalog</li><li>stronger lineage and auditability</li><li>lower solution complexity</li><li>controlled human review</li></ul><p>The goal is not to replace engineering judgement with AI.</p><p>It is to make governed data, predictive models and AI-assisted decisions work together.</p><p>That is a much stronger enterprise AI pattern than building isolated LLM applications around individual use cases.</p><h3>References</h3><ul><li>Microsoft Learn: Azure Databricks ai_decide()<br><a href="https://learn.microsoft.com/en-gb/azure/databricks/sql/language-manual/functions/ai_decide">https://learn.microsoft.com/en-gb/azure/databricks/sql/language-manual/functions/ai_decide</a></li><li>Microsoft Learn: Unity Catalog<br><a href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog">https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog</a></li><li>Microsoft Learn: MLflow on Azure Databricks<br><a href="https://learn.microsoft.com/en-us/azure/databricks/mlflow/">https://learn.microsoft.com/en-us/azure/databricks/mlflow/</a></li><li>Microsoft Learn: Mosaic AI Agent Framework<br><a href="https://learn.microsoft.com/en-us/azure/databricks/generative-ai/agent-framework/">https://learn.microsoft.com/en-us/azure/databricks/generative-ai/agent-framework/</a></li><li>Use Mermaid code to quickly create flowchart using code<br><a href="https://mermaid.ai/products/code">https://mermaid.ai/products/code</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1141725ec126" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your “Critical” Data Isn’t Critical Until You Can Prove It]]></title>
            <link>https://medium.com/@dvkumaraws2019/your-critical-data-isnt-critical-until-you-can-prove-it-58998396dc89?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/58998396dc89</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-governance-framework]]></category>
            <category><![CDATA[data-governance]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 07:27:59 GMT</pubDate>
            <atom:updated>2026-09-08T07:41:32.770Z</atom:updated>
            <content:encoded><![CDATA[<p>A U.S. regional bank spends six months building out a data governance framework — RACI charts, a steering committee, a slide deck that proudly labels <em>Customer</em>, <em>Account</em>, and <em>Transaction</em> as “critical.” Everyone signs off. Then an OCC examiner asks something simple: can you prove your customer date-of-birth data is actually accurate? And the room goes quiet.</p><p>I’ve watched this happen more than once. The gap between <em>naming</em> something critical and <em>proving</em> it’s trustworthy is where most governance programs fall apart. Usually it traces back to one overworked acronym: <strong>CDE</strong>.</p><h3>Two Meanings, One Acronym</h3><p>Sit in on two different governance meetings and you’ll hear “CDE” used two different ways, and half the room won’t realize it.</p><p><strong>Critical Data Entities</strong> are the big business objects — <em>Customer</em>, <em>Account</em>, <em>Transaction</em>, <em>Product</em>, <em>Employee</em>. This is the scoping layer. Which “things” does the business actually need to worry about?</p><p><strong>Critical Data Elements</strong> are the individual fields inside those objects — <em>Customer.SocialSecurityNumber</em>, <em>Account.RoutingNumber</em>, <em>Transaction.SettlementDate</em>. This is where the actual work happens.</p><p>An entity is just a container. You can’t govern “Customer” as an abstract idea any more than you can audit “finance” as an abstract idea — eventually you’re down in the weeds with specific fields.</p><pre>Critical Entity (Customer)<br>   └── Critical Elements (SSN, DOB, Zip Code, Routing Number)</pre><h3>Where the Actual Rules Live</h3><p>Here’s the part I try to get teams to internalize early: entities tell you what matters, elements tell you what to measure, and rules tell you how to measure it.</p><p>Once a field gets flagged as a critical element, it picks up one or more data quality rules. Most teams organize these around six dimensions — nothing exotic, just the standard set:</p><pre>|----------------------------------------------------|<br>| Dimension    | What it&#39;s checking                  |<br>|--------------|-------------------------------------|<br>| Completeness | Is the value populated at all?      |<br>| Validity     | Right format, right range?          |<br>| Accuracy     | Does it match a verified source?    |<br>| Consistency  | Does it agree across systems?       |<br>| Timeliness   | Updated within an acceptable window?|<br>| Uniqueness   | Any duplicates that shouldn&#39;t exist?|<br>|----------------------------------------------------|</pre><p>Each rule spits out a metric. Metrics feed scorecards. Scorecards trigger an issue ticket the moment something drops below threshold. This is the part that actually matters when a regulator, an auditor, or your CFO wants proof rather than a policy document.</p><h3>A Walkthrough, Not Just a List</h3><p>Take a mid-size U.S. bank as the example.</p><p><strong>Entity:</strong> Customer — critical because it feeds Bank Secrecy Act KYC checks, credit risk scoring, and IRS 1099 reporting.</p><p><strong>Element:</strong> Customer.SocialSecurityNumber</p><p>Rules on this one field, in practice:</p><ul><li><strong>Completeness</strong> — can’t be null for an active customer</li><li><strong>Validity</strong> — has to match the ###-##-#### format</li><li><strong>Uniqueness</strong> — no two active customers sharing an SSN</li><li><strong>Accuracy</strong> — checked against identity proofing, usually a state driver’s license or SSA verification</li></ul><p>Most months this comes in around 98.7% pass rate. The remaining 1.3% become formal DQ issues — a steward gets assigned, root cause usually traces back to a messy feed from a branch onboarding system, and it gets fixed. That single number rolls up into the Customer domain scorecard, which eventually lands in front of the CDO at the board level.</p><p>One more, quickly:</p><p><strong>Entity:</strong> Account<br><strong>Element:</strong> Account.RoutingNumber</p><ul><li>Validity check against the 9-digit ABA format</li><li>Consistency check against the Federal Reserve’s official ABA registry</li><li>Completeness required for every active checking or savings account</li></ul><p>Same pattern both times: business priority narrows to a specific field, the field gets a measurable rule, the rule produces a number someone can actually trust.</p><h3>Where This Actually Leaves You</h3><p>Entities and elements aren’t two competing definitions arguing over the same three letters — they’re two different zoom levels on the same governance work, and neither one does much without the other.</p><p>Get the entity list wrong and you spend your budget governing things nobody was worried about in the first place. Skip the rules at the element level and “critical” stays a word on a slide — nothing’s actually being measured, no matter how good the framework looked in the steering committee.</p><p>The real question isn’t whether your program can list its critical data. It’s whether, field by field, you can actually back that claim up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58998396dc89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connected by Design: Getting Databricks Talking to Neo4j in Production (Part 2 of 4)]]></title>
            <link>https://medium.com/@dvkumaraws2019/connected-by-design-getting-databricks-talking-to-neo4j-in-production-part-2-of-4-8de76e784354?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8de76e784354</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[neo4j]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 05:44:56 GMT</pubDate>
            <atom:updated>2026-07-07T05:48:33.120Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Credentials, connectors, reads, writes, pipelines — and the six errors you’ll hit before it works.</em></p><p><a href="https://medium.com/@dvkumaraws2019/connected-by-design-how-databricks-neo4j-closes-the-gap-between-data-volume-and-business-9ad5ba40241e">Part 1</a> covered the why and the what. This one is the how. Six steps from a blank cluster to a working Databricks–Neo4j pipeline, looped back into Unity Catalog. Nothing theoretical — just the setup, the code, and the errors that will cost you time if you don’t know what they actually mean.</p><p>Targeting DBR 14.x / 15.x (Spark 3.5) and Neo4j Spark Connector v5.3.2. If you’re on an earlier runtime, the version table in Step 1 has you covered.</p><h3>How It Fits Together</h3><p>The connector is a Spark DataSource — it plugs into Spark’s standard read/write API. Neo4j looks like any other source from your notebook’s perspective. Under the hood it speaks Bolt to Neo4j, handles partitioning across executors, and translates DataFrames to and from nodes and relationships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QzINPoOWtQKhEQezU3gq_w.png" /><figcaption>The connector is a Maven library on the cluster. Credentials come from Databricks Secret Scopes at runtime — never hardcoded.</figcaption></figure><h3>Install the Spark Connector</h3><p>Two ways to do it. Maven library on the cluster is the standard approach — right for production. Init script is for workspace-wide enforcement. Pick one.</p><h3>Option A — Maven (recommended)</h3><p>In the Databricks cluster UI: <strong>Libraries → Install New → Maven</strong>.</p><pre>org.neo4j:neo4j-connector-apache-spark_2.12:5.3.2_for_spark_3</pre><h3>Option B — Init script</h3><p>Store in DBFS, reference in your cluster policy. Runs on every cluster start — useful if you want it available without manual library attachment.</p><pre>#!/bin/bash<br>set -euo pipefail<br>VERSION=&quot;5.3.2_for_spark_3&quot;<br>SCALA=&quot;2.12&quot;<br>JAR=&quot;neo4j-connector-apache-spark_${SCALA}-${VERSION}.jar&quot;<br>wget -q &quot;https://github.com/neo4j-contrib/neo4j-spark-connector/releases/download/${VERSION}/${JAR}&quot; \<br>     -O &quot;/databricks/jars/${JAR}&quot;</pre><p><strong>Don’t do this:</strong> %pip install neo4j installs the Python driver — not the Spark Connector. They are different libraries. The Python driver won&#39;t give you DataFrame reads or writes.</p><h3>Version matrix</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*ef7zxml-N4GoE7rhKyf7Ew.png" /></figure><h3>Authentication</h3><p>Credentials go in Databricks Secret Scopes. Not in notebook cells, not in job parameters, not in environment variables. Secret Scopes.</p><p>I’ve seen hardcoded passwords in notebooks that were committed to Git, exported to colleagues, and shared in Confluence. It happens fast. Put the credentials in a scope once and reference them everywhere.</p><pre>databricks secrets create-scope --scope neo4j-prod<br>databricks secrets put --scope neo4j-prod --key neo4j-url<br>databricks secrets put --scope neo4j-prod --key neo4j-username<br>databricks secrets put --scope neo4j-prod --key neo4j-password<br><br># Verify<br>databricks secrets list --scope neo4j-prod</pre><pre>neo4j_url  = dbutils.secrets.get(scope=&quot;neo4j-prod&quot;, key=&quot;neo4j-url&quot;)<br>neo4j_user = dbutils.secrets.get(scope=&quot;neo4j-prod&quot;, key=&quot;neo4j-username&quot;)<br>neo4j_pass = dbutils.secrets.get(scope=&quot;neo4j-prod&quot;, key=&quot;neo4j-password&quot;)<br><br>neo4j_config = {<br>    &quot;url&quot;:                           neo4j_url,<br>    &quot;authentication.basic.username&quot;: neo4j_user,<br>    &quot;authentication.basic.password&quot;: neo4j_pass,<br>    &quot;database&quot;:                      &quot;neo4j&quot;<br>}</pre><h3>URL formats</h3><pre># AuraDB — always neo4j+s://, TLS is enforced<br>NEO4J_AURA  = &quot;neo4j+s://xxxxxxxx.databases.neo4j.io&quot;<br><br># Self-hosted Enterprise on Azure with TLS cert<br>NEO4J_AZURE = &quot;neo4j+s://neo4j.internal.yourcompany.com:7687&quot;<br><br># Local dev only — no TLS<br>NEO4J_DEV   = &quot;neo4j://localhost:7687&quot;</pre><p>Using neo4j:// against AuraDB gives you ClientException: No routing servers available. That error message sounds like a routing problem. It isn&#39;t — it&#39;s a TLS mismatch. Switch to neo4j+s:// and it disappears.</p><h3>Reading from Neo4j</h3><p>Three patterns cover most cases. Use Cypher queries in production — push the traversal to Neo4j and only pull the result set across the wire. Reading by label loads everything and lets Spark filter, which is slower and costs more.</p><h3>By label — simple, use for small nodes sets</h3><pre>wells_df = (<br>    spark.read<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;labels&quot;, &quot;Well&quot;)<br>    .load()<br>)</pre><h3>By Cypher query — use this in production</h3><pre>impact_df = (<br>    spark.read<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;query&quot;, &quot;&quot;&quot;<br>        MATCH (wl:WellLog)-[:FEEDS*1..6]-&gt;(asset)<br>        WHERE wl.well_name = &#39;15/9-F-14&#39;<br>        RETURN labels(asset)[0] AS asset_type,<br>               asset.name       AS asset_name,<br>               asset.owner      AS owner,<br>               asset.reg_tag    AS regulatory_flag<br>    &quot;&quot;&quot;)<br>    .load()<br>)</pre><h3>Relationships as a DataFrame</h3><pre>feeds_df = (<br>    spark.read<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;relationship&quot;,               &quot;FEEDS&quot;)<br>    .option(&quot;relationship.source.labels&quot;, &quot;WellLog&quot;)<br>    .option(&quot;relationship.target.labels&quot;, &quot;PetrophysicalModel&quot;)<br>    .load()<br>)<br># Returns: , , rel properties</pre><h3>Partition tuning for large labels</h3><p>Default is one partition. For anything over a few hundred thousand nodes you’ll need to set this explicitly.</p><pre>large_df = (<br>    spark.read<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;labels&quot;,      &quot;Transaction&quot;)<br>    .option(&quot;partitions&quot;,  &quot;12&quot;)<br>    .option(&quot;query.count&quot;, &quot;MATCH (t:Transaction) RETURN count(t)&quot;)<br>    .load()<br>)</pre><p>Set partitions to 2–3× your executor core count. 4 workers × 4 cores = 16 executor cores, so 32 partitions is a reasonable starting point.</p><h3>Writing to Neo4j</h3><p>mode(&quot;Overwrite&quot;) with node.keys set translates to a Cypher MERGE — safe to re-run without creating duplicates. Without node.keys, it&#39;s CREATE. You almost always want MERGE.</p><h3>Write nodes — upsert pattern</h3><pre>wells_gold_df = spark.read.format(&quot;delta&quot;).table(&quot;main.upstream.wells_gold&quot;)<br><br>(<br>    wells_gold_df<br>    .write<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;labels&quot;,    &quot;:Well&quot;)<br>    .option(&quot;node.keys&quot;, &quot;uwi&quot;)   # MERGE key — must be unique<br>    .mode(&quot;Overwrite&quot;)            # MERGE, not CREATE<br>    .save()<br>)</pre><h3>Write relationships</h3><pre># DataFrame columns: src_uwi, tgt_model_name, confidence_score, created_date<br>edges_df = spark.read.format(&quot;delta&quot;).table(&quot;main.upstream.lineage_edges_gold&quot;)<br><br>(<br>    edges_df<br>    .write<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;relationship&quot;,                  &quot;FEEDS&quot;)<br>    .option(&quot;relationship.save.strategy&quot;,    &quot;keys&quot;)<br>    .option(&quot;relationship.source.labels&quot;,    &quot;:WellLog&quot;)<br>    .option(&quot;relationship.source.node.keys&quot;, &quot;src_uwi:uwi&quot;)<br>    .option(&quot;relationship.target.labels&quot;,    &quot;:PetrophysicalModel&quot;)<br>    .option(&quot;relationship.target.node.keys&quot;, &quot;tgt_model_name:name&quot;)<br>    .option(&quot;relationship.properties&quot;,       &quot;confidence_score,created_date&quot;)<br>    .mode(&quot;Overwrite&quot;)<br>    .save()<br>)</pre><h3>Batch and retry config</h3><p>Default batch size is 5,000. For flat node writes on a fast network path you can push to 20,000–50,000. For relationship writes with heavier property sets, stay at 5,000–10,000. Always set retry options — transient deadlocks under concurrent write load are normal and resolve cleanly with retries in place.</p><pre>write_config = {<br>    **neo4j_config,<br>    &quot;batch.size&quot;:                &quot;20000&quot;,<br>    &quot;transaction.retries&quot;:       &quot;5&quot;,<br>    &quot;transaction.retry.timeout&quot;: &quot;30000&quot;,   # ms<br>}</pre><h3>Full Pipeline — Medallion to Graph</h3><p>Five notebooks, one Workflow. Bronze ingestion, Silver transformation, Gold enrichment, Neo4j write, GDS results back into the Feature Store. Each task depends on the previous.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sb265-mzx_8B8vZ7u1rHdw.png" /><figcaption>Five-task Workflow — each notebook runs in sequence. Step 5 reads GDS results back from Neo4j and writes them to Unity Catalog as managed Delta tables.</figcaption></figure><h3>Workflow YAML</h3><pre>name: neo4j_graph_pipeline<br>tags:<br>  team: data-architecture<br>  env: production<br><br>job_clusters:<br>  - job_cluster_key: graph_cluster<br>    new_cluster:<br>      spark_version: &quot;15.4.x-scala2.12&quot;<br>      node_type_id: Standard_DS3_v2<br>      num_workers: 4<br>      libraries:<br>        - maven:<br>            coordinates: org.neo4j:neo4j-connector-apache-spark_2.12:5.3.2_for_spark_3<br><br>tasks:<br>  - task_key: bronze_ingest<br>    job_cluster_key: graph_cluster<br>    notebook_task:<br>      notebook_path: /pipelines/01_bronze_ingest<br><br>  - task_key: silver_transform<br>    depends_on: [{task_key: bronze_ingest}]<br>    job_cluster_key: graph_cluster<br>    notebook_task:<br>      notebook_path: /pipelines/02_silver_transform<br><br>  - task_key: gold_enrich<br>    depends_on: [{task_key: silver_transform}]<br>    job_cluster_key: graph_cluster<br>    notebook_task:<br>      notebook_path: /pipelines/03_gold_enrich<br><br>  - task_key: neo4j_write<br>    depends_on: [{task_key: gold_enrich}]<br>    job_cluster_key: graph_cluster<br>    notebook_task:<br>      notebook_path: /pipelines/04_neo4j_write<br><br>  - task_key: gds_feature_read<br>    depends_on: [{task_key: neo4j_write}]<br>    job_cluster_key: graph_cluster<br>    notebook_task:<br>      notebook_path: /pipelines/05_gds_features</pre><h3>Unity Catalog Integration</h3><p>Graph algorithm results belong in Unity Catalog where ML models and dashboards can consume them. Two flows worth setting up: GDS results back into the Feature Store, and UC PII tags pushed onto Neo4j column nodes so governance state stays in sync.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PUAd5M3DfPQhZ1fOdzeXLQ.png" /><figcaption>GDS results into Feature Store, PII tags back onto Neo4j column nodes, UC Lineage API events captured into the Neo4j lineage graph.</figcaption></figure><h3>GDS results → Feature Store</h3><pre>gds_df = (<br>    spark.read<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;query&quot;, &quot;&quot;&quot;<br>        CALL gds.louvain.stream(&#39;well-graph&#39;)<br>        YIELD nodeId, communityId<br>        WITH gds.util.asNode(nodeId) AS n, communityId<br>        RETURN n.uwi AS uwi, communityId AS community_id, n.field_name AS field_name<br>    &quot;&quot;&quot;)<br>    .load()<br>)<br><br>(<br>    gds_df.write<br>    .format(&quot;delta&quot;)<br>    .mode(&quot;overwrite&quot;)<br>    .option(&quot;mergeSchema&quot;, &quot;true&quot;)<br>    .saveAsTable(&quot;main.upstream_features.well_community_ids&quot;)<br>)<br><br>from databricks.feature_engineering import FeatureEngineeringClient<br>FeatureEngineeringClient().create_table(<br>    name=&quot;main.upstream_features.well_community_ids&quot;,<br>    primary_keys=[&quot;uwi&quot;],<br>    description=&quot;Neo4j GDS Louvain community IDs — refreshed daily&quot;<br>)</pre><h3>PII tags → Neo4j column nodes</h3><pre>pii_df = spark.sql(&quot;&quot;&quot;<br>    SELECT table_name, column_name, tag_value AS pii_flag<br>    FROM   system.information_schema.column_tags<br>    WHERE  tag_name = &#39;pii&#39;<br>&quot;&quot;&quot;)<br><br>(<br>    pii_df.write<br>    .format(&quot;org.neo4j.spark.DataSource&quot;)<br>    .options(**neo4j_config)<br>    .option(&quot;labels&quot;,          &quot;:Column&quot;)<br>    .option(&quot;node.keys&quot;,       &quot;column_name&quot;)<br>    .option(&quot;node.properties&quot;, &quot;table_name,pii_flag&quot;)<br>    .mode(&quot;Overwrite&quot;)<br>    .save()<br>)</pre><h3>What’s Next</h3><p>The pipeline is wired. What Part 2 doesn’t cover is the graph schema itself — which nodes to create, how to model the relationships, what to index, how to handle schema evolution as requirements change. That’s Part 3.</p><p>Getting connectivity right first was deliberate. You can iterate on a graph schema quickly once the pipeline runs. Fixing broken plumbing while also redesigning the schema is miserable.</p><blockquote>A well-wired pipeline with a bad graph schema is still a bad graph. Part 3 is about not designing one.</blockquote><h3>References</h3><ol><li>Neo4j — <a href="https://neo4j.com/docs/spark/current/">Neo4j Connector for Apache Spark v5.3</a></li><li>Neo4j — <a href="https://neo4j.com/docs/spark/current/reading/">Reading data</a> — labels, queries, relationships, partitioning</li><li>Neo4j — <a href="https://neo4j.com/docs/spark/current/writing/">Writing data</a> — MERGE strategy, batch size, relationships</li><li>Databricks — <a href="https://docs.databricks.com/en/security/secrets/index.html">Secret Scopes</a></li><li>Databricks — <a href="https://docs.databricks.com/en/workflows/index.html">Workflows</a></li><li>Databricks — <a href="https://docs.databricks.com/en/data-governance/unity-catalog/data-lineage.html">Unity Catalog Lineage</a></li><li>Databricks — <a href="https://docs.databricks.com/en/machine-learning/feature-store/index.html">Feature Engineering in Unity Catalog</a></li><li>Neo4j — <a href="https://neo4j.com/docs/aura/current/getting-started/connecting/">AuraDB connection guide</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8de76e784354" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SHAP-Based Explainability for Predictive Maintenance: Oil & Gas, Energy & Utilities, and Consumer…]]></title>
            <link>https://medium.com/@dvkumaraws2019/shap-based-explainability-for-predictive-maintenance-oil-gas-energy-utilities-and-consumer-ef8216811d33?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef8216811d33</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 06:52:18 GMT</pubDate>
            <atom:updated>2026-07-02T06:54:11.842Z</atom:updated>
            <content:encoded><![CDATA[<h3>SHAP-Based Explainability for Predictive Maintenance: Oil &amp; Gas, Energy &amp; Utilities, and Consumer Industry.</h3><p>A practical framework built on Azure <a href="https://medium.com/u/5ae67e7eecef">Databricks</a> , applicable to any ML platform.</p><p>Predictive maintenance models in industrial settings frequently achieve strong statistical performance in validation, yet fail to gain sustained operational adoption. The core issue is rarely model accuracy. It is the absence of interpretability. A risk score without an explanation does not give a reliability engineer enough to act on, particularly when the decision involves shutting down expensive equipment or deferring a safety-critical inspection.</p><p><strong>SHAP (SHapley Additive exPlanations)</strong> addresses this gap by attributing each prediction to the specific input features that drove it, in a way that is mathematically consistent and interpretable by domain experts without a machine learning background.</p><p>This article covers what SHAP does, why explainability carries more weight in industrial settings than in typical consumer ML applications, three applied examples spanning oil and gas, energy and utilities, and consumer industry equipment, a reference architecture on Azure Databricks, and how FAIR data principles extend to explainability outputs.</p><h3>What SHAP Does</h3><p>SHAP is based on Shapley values, a concept from cooperative game theory developed by Lloyd Shapley in the 1950s to fairly allocate credit among participants who jointly produce an outcome, accounting for the fact that individual contributions are interdependent.</p><p>Applied to machine learning, features take the place of participants and the model’s output takes the place of the payoff. For each prediction, SHAP calculates the marginal contribution of every input feature relative to a baseline (typically the average prediction across the training set), accounting for feature interactions rather than treating each feature in isolation.</p><p>The result is an additive decomposition of the prediction. For example, a failure-risk score of 0.55 might decompose into a baseline of 0.30, plus 0.20 from motor temperature, plus 0.15 from vibration amplitude, minus 0.10 from other factors combined (recent maintenance history and lower-order terms): 0.30 + 0.20 + 0.15 − 0.10 = 0.55. Every component of that score is accounted for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPpK_UHcHJSmuRH3mPAECA.png" /></figure><p>Standard outputs include:</p><ul><li><strong>Waterfall plots</strong> — the feature-level decomposition of a single prediction</li><li><strong>Summary (beeswarm) plots</strong> — global feature importance and directionality across the full dataset</li><li><strong>Dependence plots</strong> — how a feature’s effect changes across its value range, including interaction effects with a second feature</li></ul><h3>Why Explainability Is a Higher Priority in Industrial ML</h3><p>Three factors distinguish industrial predictive maintenance from lower-stakes ML applications.</p><p><strong>Cost of intervention.</strong> Acting on a false positive is expensive. Pulling an ESP for inspection involves lost production, crew mobilisation, and rig time. Models that generate unexplained false positives are typically abandoned by operations teams within a few cycles, regardless of aggregate accuracy.</p><p><strong>Safety and regulatory consequences.</strong> A missed prediction on rotating or pressure-containing equipment is not simply downtime. Depending on the failure mode, it can result in a safety incident or environmental release. A probability score alone does not meet the evidentiary standard required for HSE sign-off on a deferral decision.</p><p><strong>Domain expertise as a trust prerequisite.</strong> Field and reliability engineers typically hold years of tacit knowledge about equipment behaviour. A model output that cannot be reconciled with known physical indicators, temperature trends, vibration signatures, run hours, is unlikely to be trusted over experienced judgement, regardless of whether the model is statistically correct.</p><p>The relative weight of these three factors shifts by sector. Safety and regulatory exposure dominate in oil and gas and in utilities; cost and operational trust dominate in higher-volume, lower-hazard environments such as consumer manufacturing. All three are present to some degree wherever unplanned downtime is expensive, which is why the same explainability approach carries across sectors even as the primary justification changes.</p><h3>Applied Examples Across Industries</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GWdKaC-wsX8fjoOXeNy0Pw.png" /></figure><h3>Oil &amp; Gas: Gas Compressor Trains</h3><p>On a remaining-useful-life model developed for a compressor fleet, the global SHAP summary plot identified “days since last logged maintenance event” as the most influential feature, ranking above discharge temperature, vibration, and oil pressure combined.</p><p>That pattern indicates leakage, not a genuine predictive signal. Maintenance-log timing correlates with failure records for administrative reasons unrelated to the physical condition of the equipment. The model had learned this correlation and was using it as a substitute for physics-based signals, while still producing strong validation metrics.</p><p>Issues like this are not reliably caught through accuracy or AUC alone. A SHAP summary plot exposes them directly, because an administrative feature with that level of influence is immediately recognisable as anomalous to anyone with domain knowledge of the asset.</p><h3>Energy &amp; Utilities: Power Transformers</h3><p>Power transformer health models commonly use dissolved gas analysis (DGA), the concentration of hydrogen, methane, ethylene, and acetylene dissolved in insulating oil, alongside oil temperature, load factor, and insulation moisture content, to predict incipient failure.</p><p>Transformer engineers already interpret DGA results against established heuristics such as the Duval Triangle and Key Gas methods, where acetylene points to high-energy arcing, hydrogen to partial discharge, and ethylene and methane to thermal faults. A SHAP summary plot on a transformer health model can be checked directly against this domain knowledge. If elevated acetylene and hydrogen are driving a high-risk prediction, that is consistent with an arcing signature an engineer would recognise; if ethylene and methane dominate instead, the model is tracking a thermal fault.</p><p>This alignment matters operationally. Where SHAP attribution matches established fault-gas heuristics, it gives engineers an independent check that the model has learned physically meaningful patterns rather than an unrelated correlation, and it indicates which failure mode to prepare for before the unit is taken offline.</p><h3>Consumer Industry: Packaging and Filling Lines</h3><p>High-speed packaging and filling lines generate near-continuous vibration, motor current, and throughput data, and are a common target for bearing and motor failure prediction. The operational risk here differs from oil and gas or utilities: the biggest threat to model trust is not a single dramatic failure mode, but a high false-positive rate driven by routine operational changes, product changeovers, speed adjustments, SKU switches, that statistically resemble the early signature of bearing wear.</p><p>A SHAP attribution on a flagged prediction separates the two. If a vibration spike’s contribution is concentrated in a narrow window that aligns with a logged changeover and drops out immediately afterward, that is operational noise. If the same features contribute a smaller but sustained score that increases gradually across multiple shifts regardless of changeovers, that is a genuine degradation trend.</p><p>This distinction addresses the adoption problem directly. Plant teams that get paged for every changeover-induced spike stop responding to alerts within a few weeks. Explainability that separates transient operational variation from a real trend is what keeps the alert queue credible.</p><h3>Reference Architecture on Azure Databricks</h3><p>The following architecture treats explainability as a governed, first-class output rather than an ad hoc notebook artifact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8F3xJq9kuomNh-3WudT4bw.png" /></figure><ul><li><strong>Ingestion and storage.</strong> Sensor and SCADA telemetry is ingested into Delta Lake using a medallion architecture: bronze for raw signals, silver for cleaned and conformed time series, gold for feature-ready tables. This layering supports traceability — a SHAP attribution to “discharge temperature” can be traced back through silver to the originating sensor reading and timestamp.</li><li><strong>Feature engineering.</strong> Features are built once in Unity Catalog, versioned, and reused across training and serving. Consistent feature definitions are a precondition for reliable SHAP attribution; if two teams compute the same feature differently, the resulting explanations are not comparable.</li><li><strong>Model tracking and registry.</strong> Model training and SHAP value generation are tracked in MLflow, with the explainer logged as an artifact alongside the model rather than generated ad hoc afterward. Models are registered in Unity Catalog rather than a workspace-scoped registry, supporting cross-workspace discovery and lineage back to the exact model version behind a given decision.</li><li><strong>Serving.</strong> Predictions and their corresponding SHAP explanations are served together, either through Databricks Model Serving into an operational dashboard, or via scheduled jobs writing explanation payloads into a gold table consumed by reporting tools.</li></ul><p>This is a reference pattern, not a platform dependency. The same architecture — governed features, tracked models, explanations logged as first-class artifacts — is implementable on AWS SageMaker with Clarify, GCP Vertex AI’s native explainability tooling, or an open-source stack combining Feast and MLflow. The discipline, not the vendor, determines whether this works in production.</p><h3>Outcomes</h3><p>Organisations that implement SHAP-based explainability as a governed capability, rather than an ad hoc analysis step, typically see the following:</p><ul><li><strong>Higher model adoption.</strong> Field teams are more likely to act on predictions they can interrogate. Trust, not accuracy alone, is generally the limiting factor in whether a predictive maintenance model survives past pilot stage.</li><li><strong>Faster root-cause triage.</strong> SHAP attribution reduces investigation time from a multi-day exercise to a targeted review of the top contributing sensor signals.</li><li><strong>Earlier detection of model defects.</strong> Leakage and spurious correlation, as in the compressor example above, are more reliably caught through feature-attribution review than through aggregate performance metrics.</li><li><strong>Defensible audit trails.</strong> Regulatory and HSE reviews are supported by documented, traceable explanations rather than reconstructed after the fact.</li><li><strong>More defensible resource allocation.</strong> Maintenance and inspection budget prioritisation can be justified in terms directly recognisable to engineering teams.</li></ul><h3>Conclusion</h3><p>Explainability is frequently treated as a downstream addition to a working model rather than a core design requirement. In industrial contexts, where model outputs inform decisions with direct safety, financial, and regulatory consequences, that ordering should be reversed. SHAP does not improve model accuracy. It converts a prediction into an artifact that a domain expert can evaluate, challenge, or act on with confidence — the actual precondition for a predictive maintenance programme to remain in production rather than being shelved after the pilot.</p><p><strong><em>Further reading:</em></strong><em> Lundberg &amp; Lee, “A Unified Approach to Interpreting Model Predictions” (NeurIPS, 2017).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef8216811d33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Machine Learning (ML) Drifts]]></title>
            <link>https://medium.com/@dvkumaraws2019/understanding-machine-learning-ml-drifts-databricks-b85bff084746?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b85bff084746</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[databricks]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 05:40:45 GMT</pubDate>
            <atom:updated>2026-06-25T05:52:38.720Z</atom:updated>
            <content:encoded><![CDATA[<p>A team builds something genuinely impressive — months of feature engineering, careful cross-validation, stakeholder demos that go well. The model goes live. Everyone moves on. Six months later, someone notices the numbers feel off. They pull up the dashboard. The model’s accuracy has cratered.</p><p>“But nothing changed,” someone says.</p><p>That’s exactly the problem.</p><p>The world changed. Your model didn’t. And nobody was watching.</p><p>This is drift. It’s the most common way production ML systems fail, it’s almost never caught early enough, and — if I’m being blunt — it’s chronically under-discussed compared to the amount of energy we collectively spend on model architecture and hyperparameter tuning. Getting from 91% to 93% AUC in your notebook matters a lot less than noticing that your deployed model dropped from 91% to 74% six months after go-live.</p><p>Let me break this down properly.</p><h3>First, think about your pipeline as a set of probability distributions</h3><p>Not as code. Not as an API. As a system of conditional probabilities that can each shift independently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1yxOjesyXGysVlMIKCPS4g.png" /></figure><p>Your model learns a function <em>f</em> that approximates P(Y|X) during training. The trouble is the world at inference time doesn’t have to look anything like the world at training time. And it usually doesn’t, given long enough.</p><p>There are four distinct things that can shift. They look similar on the surface but have completely different root causes and completely different fixes. Treating them as the same problem is one of the more expensive mistakes a team can make.</p><p><strong>The four types, and why each one is its own problem</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FKlGpV3LIyx9-deZucWAkg.png" /></figure><h3>(1) Feature Drift</h3><p><strong>Formal definition:</strong> P(X) changes over time.</p><p>This one feels intuitive once you see it. Your model was trained on data that looked a certain way — certain value ranges, certain category frequencies, certain patterns of missingness. If the incoming data starts looking different, the model is operating outside its training distribution. The learned function <em>f</em> may still be mathematically valid, but it’s extrapolating rather than interpolating.</p><p>A concrete example from energy markets: a settlement system model trained on half-hourly metering data from a period of moderate volatility gets deployed through a period of extreme price spikes. The price feature distribution has shifted so far from training that the model has never seen values remotely close to what it’s being asked to score. It doesn’t throw an error. It just quietly outputs nonsense.</p><p>Feature drift is also where <strong>missing values</strong> come in — and this is underappreciated. If a particular categorical value starts generating missing data more frequently in recent batches (maybe an upstream system changed, maybe a new customer segment doesn’t fill in a field), that shift is detectable and meaningful long before it affects downstream performance.</p><p><strong>How to detect it:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CJLHAuLk_PwKklGpR-E8YQ.png" /></figure><p>Two things worth dwelling on here.</p><p>First — the <strong>one-way vs two-way Chi-squared</strong> distinction matters. If you want to know whether the distribution of a categorical variable has shifted from your training baseline, you use a two-sample (two-way) Chi-squared test. You’re comparing two empirical distributions against each other in a contingency table. The one-way (goodness-of-fit) test compares against a <em>fixed</em> theoretical distribution — it has its uses, but it’s not what you reach for when the question is “has this changed compared to what we saw before?”</p><p>Second — <strong>Jensen-Shannon distance</strong> is a useful metric but it’s a description, not a test. It tells you <em>how much</em> distributions have diverged; it doesn’t tell you whether that divergence is statistically significant. Use it alongside a formal test, not instead of one.</p><h3>(2) Concept Drift</h3><p><strong>Formal definition:</strong> P(Y|X) changes over time.</p><p>This is the one that really keeps you up at night. Feature drift is uncomfortable. Concept drift is existential. The inputs can look completely normal — familiar distributions, no missing values, nothing obviously wrong — and the model is still broken, because the relationship between those inputs and the outcome has fundamentally shifted.</p><p>The signal your model learned to detect has changed meaning. Or disappeared. Or inverted.</p><p>A credit risk model that learned “consistently paying minimum balance = low risk” runs into trouble when a period of wage stagnation means that behaviour pattern now includes people who are quietly running out of headroom. Same feature values, different underlying reality.</p><p>What makes this especially nasty is that concept drift has <strong>four distinct flavours</strong>, and they require different responses:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0av8v6ZjbtCebw1oX0SyWw.png" /></figure><p>Sudden drift tends to follow real-world events — a regulatory change, a market shock, a product pivot. Gradual drift is quieter and harder to catch because performance degrades so slowly that there’s no obvious inflection point. Recurring drift is the most tractable once you’ve identified it — you can build it into your modelling strategy explicitly. Incremental drift is the cruelest: there’s no stable new state to retrain toward.</p><p>Detecting concept drift requires ground truth labels, which means there’s always a lag. By the time you have enough labelled production data to confirm drift, you’ve already been serving degraded predictions for a while. This is why the other three drift types matter — they’re proxy signals you can monitor immediately, without waiting for labels.</p><h3>(3) Label Drift</h3><p><strong>Formal definition:</strong> P(Y) changes over time.</p><p>This one is sometimes treated as a variant of concept drift, but it’s worth separating out because the fix is different. Label drift is when the base rate of your outcome shifts — independent of what’s happening to the inputs.</p><p>The clearest example: a churn model trained when monthly churn was 3% gets deployed during a period when broader market conditions push churn to 9%. The model’s calibration is now wrong. Even if P(Y|X) hasn’t changed — even if “customers with feature profile A still churn at the same relative rate” — the model’s predicted probabilities are systematically low because its prior was baked in at training time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OqmsuOVEEdT9ZOY-Bfbrzw.png" /></figure><p>The good news: label drift is one of the more recoverable forms of drift. You don’t necessarily need to retrain. Recalibrating the decision threshold, or applying Bayes’ theorem to adjust for the new prior, can often restore performance without touching the model weights. The bad news: you need labelled production data to detect it in the first place.</p><p>The practical check here is straightforward — run a two-sample Chi-squared test comparing the label distribution in your training set against the label distribution in a recent window of labelled production data. A significant result tells you the class proportions have shifted.</p><h3>(4) Prediction Drift</h3><p><strong>Formal definition:</strong> P(Ŷ) changes over time.</p><p>Prediction drift is different in character from the other three. It’s not really a root cause — it’s a symptom. What makes it valuable is that it’s the <strong>only one you can monitor without ground truth labels</strong>, which means it’s often the first signal you can observe.</p><p>When feature drift happens, it usually flows through to prediction drift — the inputs look different, so the model outputs look different. When concept drift happens, it often flows through too — the model is being applied to situations its weights weren’t built for, so its outputs start covering unfamiliar territory. Prediction drift is the downstream footprint of upstream problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3fec5AJ5VkPFuWPuD-JXw.png" /></figure><p>you have predictions immediately. If the distribution of those predictions shifts materially — if a model that used to output 80% low-risk scores is now outputting 60% low-risk scores — that’s a signal worth investigating, even before a single label comes back.</p><p>Use the KS test or Population Stability Index (PSI) on your prediction score distribution across time windows. PSI is particularly useful because it gives you an intuitive severity band:</p><p>PSI valueWhat it means&lt; 0.1Distribution is stable. Keep monitoring normally.0.1–0.25Meaningful shift. Start investigating.&gt; 0.25Major shift. Escalate. Don’t wait for labels.</p><pre><br>┌─────────────┬──────────────────────────────────────────────┐<br>│  PSI Value  │  What it means                               │<br>├─────────────┼──────────────────────────────────────────────┤<br>│  &lt; 0.1      │  Distribution is stable. Keep monitoring.    │<br>│  0.1 – 0.25 │  Meaningful shift. Start investigating.      │<br>│  &gt; 0.25     │  Major shift. Escalate. Don&#39;t wait for       │<br>│             │  labels.                                     │<br>└─────────────┴──────────────────────────────────────────────┘<br></pre><h3>The test selection question</h3><p>One thing I see teams get wrong repeatedly: reaching for the wrong statistical test and then either missing real drift or crying wolf constantly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzCFQ2Z6639TmigTnrfU_Q.png" /></figure><p>The key intuition: the <strong>two-way Chi-squared test</strong> is for comparing two empirical distributions against each other — training vs production, this month vs last month, group A vs group B. The <strong>one-way Chi-squared test</strong> is for testing whether an observed distribution matches a fixed, known expected distribution. They answer different questions. Using the one-way test when you mean to compare two samples is a common mistake that can mask real drift.</p><p>And KS is often misapplied to categorical data, which it wasn’t designed for. It compares cumulative distribution functions — a concept that only makes sense for ordered, continuous variables.</p><h3>ML Model Monitoring Architecture</h3><p>Knowing the four drift types is one thing. Wiring them into an operational monitoring system is where most teams struggle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8oAskoRfbknL3ad4RLr3mw.png" /></figure><p>The mistake most teams make is only building Layer 4 — performance monitoring — and thinking that’s enough. It isn’t. By the time your AUC has dropped measurably, you’ve usually been serving degraded predictions for weeks. Layer 1 and Layer 2 give you much earlier warning.</p><p>The ideal setup monitors all four layers simultaneously and treats them as complementary, not redundant. Layer 1 tells you <em>something changed in your inputs</em>. Layer 4 tells you <em>that something has affected your outcomes</em>. Everything between helps you triangulate what happened.</p><h3>When drift is detected ?</h3><p>Detection is step one. The response is where it gets genuinely complicated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pOM_3K2q9XEXRvzwu0E_Cg.png" /></figure><p>One thing the flowchart doesn’t quite capture: <strong>not all drift requires a response</strong>. If you deployed a new version of your app that deliberately changed the feature distribution — say you added a new user onboarding flow that affects session features — then feature drift is expected and correct. The discipline is in distinguishing intentional drift (you changed something) from organic drift (the world changed something).</p><p>This is why logging your deployments, data pipeline changes, and upstream system changes alongside your drift metrics is non-negotiable. Drift without context is just noise.</p><h3>The reference window problem</h3><p>One thing that trips people up: what exactly are you comparing against?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbBkxDgp5AT-5PLjtnBP2Q.png" /></figure><p>A fixed training baseline is simple to implement but becomes less useful over time — if your model was trained 18 months ago, flagging drift against that baseline tells you the world has changed, which you probably already knew. A sliding window avoids stale baselines but can mask gradual drift, because the reference keeps moving with the data. A landmark window — anchored to a specific known-good period, like the month after your last full retrain — is often the most practical compromise.</p><p>There’s no universally right answer. What matters is that your team has made a deliberate choice and documented it, rather than defaulted to whatever was easiest to implement.</p><h3><strong>Putting it all together</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tCn6-UqIQUL5RaX5W9Z_g.png" /></figure><p>The mental model I keep coming back to is this: <strong>feature drift and prediction drift are things you can monitor without labels — start there</strong>. Concept drift and label drift require ground truth, but they’re the ones that actually explain <em>why</em> your model is broken. You need both layers.</p><p>If you only have the capacity to instrument one thing today, make it prediction drift monitoring. It’s imperfect. It’s a downstream proxy. But it’s free of the label latency problem, and it will alert you weeks before a human reviewer notices the numbers feel off.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b85bff084746" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connected by Design: How Databricks + Neo4j Closes the Gap Between Data Volume and Business…]]></title>
            <link>https://medium.com/@dvkumaraws2019/connected-by-design-how-databricks-neo4j-closes-the-gap-between-data-volume-and-business-9ad5ba40241e?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ad5ba40241e</guid>
            <category><![CDATA[neo4j]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-lineage]]></category>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Tue, 19 May 2026 10:50:30 GMT</pubDate>
            <atom:updated>2026-07-07T05:46:40.891Z</atom:updated>
            <content:encoded><![CDATA[<h3>Connected by Design: How <a href="https://medium.com/u/5ae67e7eecef">Databricks</a> + <a href="https://medium.com/u/26bec2028463">Neo4j</a> Closes the Gap Between Data Volume and Business Intelligence</h3><p><em>Most organisations have invested heavily in their data platform. Fewer can answer the questions that actually drive decisions. The gap is almost always relational — and it has a fix.</em></p><p>Part 1 : Every organisation I’ve worked with in the last decade has, at some point, made a significant investment in a data platform. Azure Databricks, Snowflake, Redshift — the specific technology varies, but the shape of the investment is consistent: storage, compute, ingestion pipelines, a governance layer, and a set of dashboards that represent the hoped-for return on all of it. And in most cases, the platform delivers. Reporting is faster. Data quality improves. The data team stops being the bottleneck it once was.</p><p>But then someone asks a question the platform can’t answer. Not because the data isn’t there — it is. But because the answer lives in the connections between data points rather than in the data points themselves. Who is linked to whom through this chain of transactions? If this source schema changes, what breaks downstream — and how far does the damage travel? Which assets in our portfolio share a hidden dependency on the same supplier, the same equipment design, or the same engineer who left the company two years ago?</p><p>These questions have something in common: they are traversal problems. And traversal problems, at any meaningful scale, are graph problems. Databricks — exceptional as it is at everything else — treats relationships as derived things, reconstructed at query time through JOINs. Graph databases like Neo4j store relationships as first-class primitives. Traversing four hops across a billion-edge graph takes milliseconds. The equivalent SQL query on a columnar store either times out or returns three days later with an invoice from your cloud provider.</p><p><em>“The platform gap isn’t storage. It isn’t compute. It’s the inability to answer questions that live in the spaces between rows.”</em></p><p>This is the first in a four-part series on how to close that gap. The goal throughout is practical, not theoretical — working architecture patterns, real query designs, and honest discussion of where the hard work actually sits. Part 1 lays the foundation: what the combined architecture looks like, which problems it solves, and when it makes sense to reach for it versus when it’s overkill.</p><h3>Part 1 — The Architecture Before We Get Into Use Cases</h3><p>The model is straightforward. Databricks is the main engine — ingestion, transformation, enrichment, ML. Everything flows through the Medallion architecture as normal. At the Gold layer, you extract the entities and relationships that matter for graph queries, and write them into Neo4j via the Spark connector. Neo4j handles the topology — the multi-hop traversals, the impact analysis, the knowledge retrieval — and feeds results back into Databricks as enriched features, alerts, or audit outputs.</p><p>Neither tool replaces the other. You don’t move your data warehouse into Neo4j — you mirror the graph-relevant subset of it. What you get back is a qualitatively different class of query capability. The connector makes this a straightforward write operation from a Gold Delta table. What changes is what becomes answerable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iOR3c7-xtYEJTLA3YrOohQ.png" /><figcaption>End-to-end architecture: OSDU + PI Historian + SAP PM + Petrel → Medallion (Databricks) → Neo4j Spark Connector → two graph use cases, with results looped back into the feature store.</figcaption></figure><h3>When does this actually make sense?</h3><p>Not every problem is a graph problem, and this stack isn’t cheap to operate. The honest answer: reach for this when your query patterns involve three or more hops across entity relationships, when the relationship itself carries meaning, or when you’re doing anything involving community structure, influence, or propagation across a network of connected objects.</p><p>Simple aggregations, time-series analysis, batch ML training — Databricks handles all of that without Neo4j. The inflection point is when you need to ask questions about the shape of your data, not just its contents.</p><h3>Use Case 1 — Reservoir Data Lineage</h3><p>Ask any senior reservoir engineer how long it takes to answer the question “why did the forecast change?” after a model update, and they’ll give you an honest answer: days. Possibly a week. There are seismic interpretation projects in Petrel, petrophysical models in Techlog, history-matched grid models in Eclipse or tNavigator, and production forecasts that feed directly into FID decisions and SEC reserves filings. Every one of those assets has inputs. And every time something upstream changes — a log suite gets reprocessed, a formation top gets revised, a PVT analysis gets updated — the downstream impact is a mystery until someone traces it manually.</p><p>OSDU goes a long way here. It brings well logs, seismic, and completion data into a unified data platform with a standardised schema. But OSDU’s lineage capabilities are scoped to data objects within the platform. The moment you step outside it — into Petrel project files, Eclipse deck revisions, or Excel-based economic models — lineage tracking disappears. That’s the gap Neo4j fills.</p><h3>The graph data model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4RwfsRJcXph7ia5kFqdYg.png" /><figcaption>Full subsurface data lineage from OSDU source objects through petrotechnical processing to production forecasts, FID decisions, and SEC reserves filings.</figcaption></figure><h3>The query that changes everything</h3><p>A petrophysicist reprocesses the GR/RHOB/NPHI log suite for well 15/9-F-14 after identifying a depth shift error. Standard procedure. But this particular well is a key calibration input for the petrophysical model underpinning a $2bn FID recommendation due in six weeks. Does the FID model need to be re-run? Does the SEC reserves filing get touched? Who owns the affected assets?</p><p>In a Neo4j lineage graph, that’s a single traversal from the well log node down through its downstream dependencies. The answer — full asset list, owners, regulatory flags — comes back in seconds. Without the graph, it’s a week of emails.</p><pre>MATCH (wl:WellLog {well_name: &#39;15/9-F-14&#39;, log_type: &#39;GR_RHOB_NPHI&#39;})<br>CALL apoc.path.subgraphAll(wl, {<br>    relationshipFilter: &#39;FEEDS&gt;|USED_IN&gt;|CALIBRATES&gt;|TRAINED_ON&gt;&#39;,<br>    maxLevel: 8<br>})<br>YIELD nodes<br>WITH [n IN nodes | {<br>    asset_type:   labels(n)[0],<br>    asset_name:   n.name,<br>    owner:        n.owner,<br>    last_updated: n.last_updated<br>}] AS impacted<br>RETURN impacted,<br>       size(impacted) AS total_downstream_assets<br>ORDER BY size(impacted) DESC</pre><h3>The Databricks ingestion pipeline</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4nt4G-kkASEvP5swkrh2Q.png" /><figcaption>OSDU change events trigger incremental lineage graph updates. The severity router fires alerts when reserves filings or FID models are within the impact radius.</figcaption></figure><p>One practical note on OSDU integration: the platform’s Well Deliverable Schema and Seismic Trace Data objects carry a data.LineageAssertions array that captures upstream provenance. That&#39;s your starting point for the Bronze-to-Silver lineage edge extraction — you&#39;re essentially materialising what OSDU already knows about its own objects into a traversable graph that extends beyond OSDU&#39;s walls.</p><h3>Use Case 2 — The Well Knowledge Graph</h3><p>The knowledge retention problem in upstream O&amp;G is genuinely acute. A mature basin like the North Sea or Permian has fields that have been operated by two or three different companies over fifty years. Each divestment loses institutional memory. Key engineers retire. Interpretive work sits in Petrel projects that nobody has opened in eight years, or in PDF well reports on a SharePoint that gets migrated and loses its metadata. When a new team takes over an asset, the standard approach is a multi-week knowledge-gathering exercise that is, in effect, archaeology.</p><p>A well knowledge graph doesn’t solve the culture problem — people still need to write things down. But it connects what has been written down in a way that makes it findable and traversable in seconds rather than weeks. OSDU is the anchor. Its Well, Completion, and Formation top objects provide canonical entity definitions with standardised identifiers. Neo4j extends those into a broader connected ontology that pulls in SAP PM equipment records, the HSE incident register, engineering work history, and live regulatory filings — the things OSDU was never designed to hold but that operators absolutely need to traverse together.</p><p><em>“OSDU tells you what the well is. The knowledge graph tells you everything that has ever happened to it, who knows most about it, and what you’d be walking into if you recompleted it.”</em></p><h3>The full relationship map</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6TlzTnCqai2o6ZJXB6ofsA.png" /><figcaption>Full relationship map. OSDU anchors the blue nodes. SAP PM feeds the amber nodes. The graph extends to engineers, HSE records, and regulatory filings that OSDU was never designed to hold.</figcaption></figure><h3>The four queries that justify the build</h3><h4>Query 1 — Full asset handover pack</h4><pre>MATCH (w:Well {uwi: &#39;30/6-A-1&#39;})<br>OPTIONAL MATCH (w)-[:DRILLED_INTO]-&gt;(f:Formation)<br>OPTIONAL MATCH (w)-[:LOCATED_IN]-&gt;(field:Field)<br>OPTIONAL MATCH (w)-[:HAS_COMPLETION]-&gt;(c:Completion)<br>OPTIONAL MATCH (c)-[:USES_EQUIPMENT]-&gt;(e:Equipment)<br>OPTIONAL MATCH (e)-[:SERVICED_BY]-&gt;(v:Vendor)<br>OPTIONAL MATCH (w)-[:HAS_INCIDENT]-&gt;(i:HSEIncident)<br>OPTIONAL MATCH (eng:Engineer)-[:WORKED_ON]-&gt;(w)<br>OPTIONAL MATCH (w)-[:SUBJECT_OF]-&gt;(r:RegulatoryFiling)<br>OPTIONAL MATCH (rpt:Report)-[:REFERENCED_IN]-&gt;(w)<br>RETURN w.uwi                         AS well_id,<br>       w.status                       AS current_status,<br>       f.name                         AS reservoir_formation,<br>       f.depth_tvdss                  AS reservoir_depth_m,<br>       field.licence_block            AS licence,<br>       collect(DISTINCT c.type)       AS completion_types,<br>       collect(DISTINCT e.type)       AS equipment_types,<br>       collect(DISTINCT v.name)       AS vendors_on_record,<br>       count(DISTINCT i)              AS hse_incidents_total,<br>       collect(DISTINCT {<br>           name: eng.name,<br>           discipline: eng.discipline<br>       })                             AS engineers_worked,<br>       collect(DISTINCT r.type)       AS live_regulatory_filings,<br>       count(DISTINCT rpt)            AS reports_on_record</pre><p>A new asset team runs this on day one. In a single pass it returns the reservoir context, completion history, every vendor that has touched the well, total HSE incident count, current engineers who have worked on it, and live regulatory obligations. What this used to require — calls with the previous operator, SharePoint archaeology, SAP queries, OSDU searches — now takes one command.</p><h4>Query 2 — Who knows most about this formation?</h4><pre>MATCH (eng:Engineer)-[:WORKED_ON]-&gt;(w:Well)-[:DRILLED_INTO]-&gt;(f:Formation)<br>WHERE f.name IN [&#39;Statfjord&#39;, &#39;Brent&#39;, &#39;Cook&#39;]<br>  AND eng.active_flag = true<br>OPTIONAL MATCH (eng)-[:AUTHORED]-&gt;(rpt:Report)-[:REFERENCED_IN]-&gt;(w)<br>WITH eng,<br>     count(DISTINCT w)   AS wells_on_formation,<br>     count(DISTINCT rpt) AS reports_authored,<br>     collect(DISTINCT w.uwi)[0..4] AS sample_wells<br>RETURN eng.name          AS engineer,<br>       eng.discipline     AS discipline,<br>       wells_on_formation,<br>       reports_authored,<br>       sample_wells,<br>       wells_on_formation + (reports_authored * 2) AS knowledge_score<br>ORDER BY knowledge_score DESC<br>LIMIT 10</pre><p>When your team needs to evaluate a recompletion candidate in the Statfjord formation, you don’t ask around the office — you run this query and have a ranked list of the ten most relevant engineers in the organisation in under a second.</p><h4>Query 3 — HSE risk propagation: active wells sharing flagged vendor equipment</h4><pre>MATCH (v:Vendor)-[:SERVICED]-&gt;(e:Equipment)<br>WHERE v.risk_tier = &#39;HIGH&#39;<br>   OR v.safety_notice_flag = true<br>MATCH (e)&lt;-[:USES_EQUIPMENT]-(c:Completion)&lt;-[:HAS_COMPLETION]-(w:Well)<br>WHERE w.status = &#39;PRODUCING&#39;<br>OPTIONAL MATCH (w)-[:HAS_INCIDENT]-&gt;(i:HSEIncident)<br>WHERE i.date &gt; date() - duration(&#39;P365D&#39;)<br>  AND i.severity IN [&#39;HIGH&#39;, &#39;CRITICAL&#39;]<br>WITH w, v, e, count(DISTINCT i) AS high_severity_incidents_12m<br>RETURN w.uwi                       AS well_id,<br>       w.name                      AS well_name,<br>       v.name                      AS flagged_vendor,<br>       e.type                      AS equipment_type,<br>       e.serial_no                 AS equipment_serial,<br>       high_severity_incidents_12m AS recent_hse_events,<br>       CASE<br>         WHEN high_severity_incidents_12m &gt; 0 THEN &#39;IMMEDIATE REVIEW&#39;<br>         WHEN v.safety_notice_flag = true     THEN &#39;SAFETY NOTICE ACTIVE&#39;<br>         ELSE &#39;MONITOR&#39;<br>       END                         AS action_flag<br>ORDER BY high_severity_incidents_12m DESC, v.risk_tier</pre><p>A vendor gets added to the high-risk register. The immediate question: which of our producing wells have that vendor’s equipment installed, and have any had high-severity incidents in the past year? In a relational world, that’s a three-system query across SAP, the HSE register, and the well completion database. Here it’s a single traversal with built-in action classification.</p><h4>Query 4 — Subsurface analogue finder</h4><pre>MATCH (target:Well {uwi: &#39;30/6-A-1&#39;})<br>      -[:DRILLED_INTO]-&gt;(f:Formation)<br>      &lt;-[:DRILLED_INTO]-(candidate:Well)<br>WHERE candidate.uwi &lt;&gt; target.uwi<br>  AND candidate.status IN [&#39;PRODUCING&#39;, &#39;SUSPENDED&#39;]<br>MATCH (target)-[:HAS_COMPLETION]-&gt;(tc:Completion)<br>MATCH (candidate)-[:HAS_COMPLETION]-&gt;(cc:Completion)<br>WHERE cc.type = tc.type<br>OPTIONAL MATCH (candidate)-[:HAS_INCIDENT]-&gt;(i:HSEIncident)<br>WHERE i.severity IN [&#39;HIGH&#39;, &#39;CRITICAL&#39;]<br>WITH candidate, f.name AS shared_formation, tc.type AS completion_match,<br>     abs(candidate.depth_tvdss - target.depth_tvdss) AS depth_delta_m,<br>     count(DISTINCT i) AS critical_incidents<br>RETURN candidate.uwi              AS analogue_well,<br>       candidate.name             AS well_name,<br>       shared_formation,<br>       completion_match,<br>       depth_delta_m,<br>       critical_incidents,<br>       CASE<br>         WHEN depth_delta_m &lt; 50  THEN &#39;CLOSE ANALOGUE&#39;<br>         WHEN depth_delta_m &lt; 200 THEN &#39;GOOD ANALOGUE&#39;<br>         ELSE &#39;DISTANT ANALOGUE&#39;<br>       END                        AS analogue_quality<br>ORDER BY depth_delta_m ASC<br>LIMIT 8</pre><p>Before you recompletion a well, you want to know what happened when someone tried the same completion type in the same formation nearby. This query finds the closest analogues — same formation, same completion type, ranked by depth proximity — and surfaces critical incident history for each. A rapid pre-screening that used to require a formation evaluation study is now a five-second lookup.</p><h3>The Databricks ingestion pipeline in detail</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*207d7QPqc2YlDIxpGUmRTw.png" /><figcaption>Two-stage Silver layer: UWI reconciliation first, entity linking second. The sequence matters — you can’t link entities reliably until well identity is resolved.</figcaption></figure><h3>The OSDU integration detail</h3><p>OSDU’s Well Master schema is the canonical source for the well identifier. Every other system’s reference to the well — the SAP functional location, the HSE incident’s location code, the regulatory filing’s well reference — gets mapped to the OSDU UWI in the Silver A step. In the North Sea, the same physical well may be identified by UKCS block reference in regulatory filings, by a legacy operator’s internal well number in SAP, and by the UWI in OSDU — none of which automatically match.</p><p>Once UWI reconciliation is done, OSDU’s data.LineageAssertions array on each Well object can be traversed to pull upstream data provenance. This is the bridge between the two use cases: the Well Knowledge Graph and the Reservoir Data Lineage graph can share nodes, allowing a query that starts with a well, traverses to its completion design, then follows the lineage of the petrophysical model that informed that design. You&#39;re navigating institutional knowledge and data provenance in a single traversal. That&#39;s where the real value is.</p><h3>Where This Leaves Us — And What Comes Next</h3><p>The two use cases in this post — reservoir data lineage and the well knowledge graph — are not edge cases or experimental patterns. They are recurring, high-value problems that every organisation running a serious data platform eventually encounters. The reason they remain unsolved in most places isn’t a lack of data. It’s architecture. Trying to answer multi-hop relationship questions with a tool designed for columnar analytics is the wrong fit, and organisations pay for that mismatch in analyst hours, delayed decisions, and business risk that never quite gets quantified because nobody can trace it cleanly.</p><p>The combined Databricks + Neo4j architecture addresses that mismatch directly. Databricks handles what it was built for — scale, transformation, governance, ML. Neo4j handles what it was built for — traversal, topology, connected intelligence. The Spark connector makes the boundary between them operational rather than theoretical. It’s not a research project; it’s a production-ready integration that organisations are running today.</p><p>That said, Part 1 of a four-part series is a foundation, not a full build. There are decisions ahead that will determine whether this architecture delivers its potential or becomes an expensive graph-shaped data dump. Those decisions live in the next three parts.</p><h3>What the rest of this series covers</h3><p>Part 1 — Foundation — Architecture, Use Cases, and When to Use This Pattern</p><p>Part 2 — Connectivity &amp; Setup — Getting Databricks Talking to Neo4j in Production</p><p>Part 3 — Graph Data Modelling — Designing a Schema That Doesn’t Break Under Load</p><p>Part 4 — Production &amp; Scale — Pipelines, Orchestration, and Feeding the Feature Store</p><p>If Part 1 has been useful, the most practical next step is Part 2 — which gets into the connector setup and Unity Catalog integration in enough detail that you can run it in your own environment. The architecture discussions here only become real once the data is actually moving.</p><p>Follow along on <a href="https://medium.com/@dvkumaraws2019">Medium </a>or connect on <a href="https://www.linkedin.com/in/dominickumar/">LinkedIn</a>. And if you’re already running a similar pattern in your own stack, I’d genuinely like to hear what your story looks like. It’s the step everyone underestimates, and I’ve yet to meet two implementations that handled it the same way.</p><p>References</p><ol><li>OSDU Forum — <a href="https://osduforum.org/">Well Deliverable Schema &amp; LineageAssertions specification</a>, OSDU Data Platform R3+</li><li>Neo4j — <a href="https://neo4j.com/docs/spark/current/">Neo4j Connector for Apache Spark</a>, v5.3 documentation</li><li>Databricks — <a href="https://docs.databricks.com/en/data-governance/unity-catalog/data-lineage.html">Unity Catalog Data Lineage</a></li><li>PPDM Association — <a href="https://www.ppdm.org/">Professional Petroleum Data Management standards</a>, Well Identifier specification</li><li>Neo4j Graph Data Science — <a href="https://neo4j.com/docs/graph-data-science/current/">GDS Library documentation</a>: Louvain, PageRank, Betweenness Centrality</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ad5ba40241e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databricks Multi-Table Transactions: A Big Step Forward for Enterprise Lakehouse Design]]></title>
            <link>https://medium.com/@dvkumaraws2019/databricks-multi-table-transactions-a-big-step-forward-for-enterprise-lakehouse-design-9d7b5e50bfe2?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d7b5e50bfe2</guid>
            <category><![CDATA[finance-and-banking]]></category>
            <category><![CDATA[azure-databricks]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Thu, 23 Apr 2026 18:12:08 GMT</pubDate>
            <atom:updated>2026-04-24T06:28:08.548Z</atom:updated>
            <content:encoded><![CDATA[<p>For years, Delta Lake gave us strong ACID guarantees — but only at the table boundary. That has now changed.</p><p>That was fine for a lot of data engineering work. If you were loading a Delta table, running a MERGEbuild, medallion layers, or managing incremental pipelines, Delta Lake already gave you the atomicity and consistency you needed.</p><p>But the moment you tried to model a business action that naturally touched more than one table, things became awkward.</p><p>You could still build it, of course. But you usually ended up solving the problem outside the transaction itself. You relied on orchestration, retries, compensation logic, reconciliation jobs, or carefully designed idempotent writes. It worked, but it was never especially elegant.</p><p>That is why Databricks multi-table transactions are a meaningful step forward.</p><p>Databricks has now introduced support for multi-table transactions for eligible Unity Catalog managed tables, which means you can group multiple SQL statements into one atomic unit of work. In plain English: either the whole thing commits, or none of it does.</p><p>That may sound like a small platform enhancement. It is not. For data architects, it changes how certain classes of workflows can be designed inside the lakehouse.</p><h3>Why the old model was not enough</h3><p>Traditional Delta Lake ACID guarantees were table-scoped. Each table had its own transaction log, its own commit process, and its own concurrency handling. That design is one of the reasons Delta has been so effective and reliable at scale. But it also meant there was no native atomic boundary across multiple tables in the older model.</p><p>In practice, that created friction in scenarios like these:</p><ul><li>updating a balance table and an audit table together</li><li>inserting an order header and order lines together</li><li>changing a business status and logging an approval event together</li><li>writing operational state changes across related entities</li></ul><p>These are not exotic use cases. They are normal enterprise workflows.</p><p>And the problem was never that Databricks could not support them at all. The problem was that the platform did not natively treat those changes as one business transaction. Architects had to create that safety at the orchestration level instead.</p><h3>What has changed</h3><p>The important shift is that Databricks now supports a transaction model that can coordinate writes across multiple eligible tables through Unity Catalog and catalog commits. Databricks documents this with transaction syntax such as BEGIN ATOMIC ... END;, and describes the behavior as all changes succeeding together or being rolled back together.</p><p>That moves the conversation from:</p><p><strong>“Each table commits on its own.”</strong></p><p>to:</p><p><strong>“The platform can coordinate one atomic boundary across multiple participating tables.”</strong></p><p>That is a big architectural difference.</p><h3>The catch, which architects should pay attention to</h3><p>This is not a blanket capability across every Databricks table.</p><p>The feature applies to <strong>eligible Unity Catalog-managed Delta tables</strong>, and Databricks documents it as a newer capability tied to <strong>catalog commits</strong>. At the moment, this is still something platform teams should evaluate carefully rather than assume is universally available in every environment and every workload shape.</p><p>That is important because the older design guidance saying “Databricks transactions are table-level” was not wrong. It reflected the platform’s long-standing behavior. The correct update now is more nuanced:</p><p><strong>Historically, Delta transactions were table-scoped. Now Databricks can support cross-table atomicity for supported Unity Catalog-managed tables.</strong></p><p>That is the version I would use in architecture discussions.</p><h3>A simple example: transferring money between two accounts</h3><p>Let’s use a straightforward example.</p><p>Imagine you are implementing a transfer workflow. You need to:</p><ul><li>Deduct money from Account A</li><li>Add money to Account B</li><li>Insert a record into an audit table</li></ul><p>From a business point of view, that is one action. Nobody thinks of it as three unrelated writes.</p><p>And that is exactly why table-by-table atomicity is not enough here.</p><p>If one statement succeeds and another fails, you can end up in the worst kind of state: technically valid rows, but logically broken data. Money may be deducted but not credited. Or both balances may change, but the audit record is missing. Either way, you now have to recover after the fact.</p><p>With a multi-table transaction, that risk drops sharply because the platform can treat the whole operation as one atomic unit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUu8XARZKhG1FINcvJH8hw.png" /></figure><p>Below is a practical example using <strong>PySpark in a Databricks notebook</strong>.</p><p>This example assumes:</p><ul><li>You are using <strong>Unity Catalog</strong></li><li>The tables are <strong>managed in Delta tables</strong></li><li>Multi-table transactions are supported in your environment</li></ul><p><strong>Step 1: Create demo tables</strong></p><pre>spark.sql(&quot;CREATE CATALOG IF NOT EXISTS demo_catalog&quot;)<br>spark.sql(&quot;USE CATALOG demo_catalog&quot;)<br><br>spark.sql(&quot;CREATE SCHEMA IF NOT EXISTS finance_demo&quot;)<br>spark.sql(&quot;USE SCHEMA finance_demo&quot;)<br><br>spark.sql(&quot;&quot;&quot;<br>CREATE TABLE IF NOT EXISTS accounts (<br>    account_id STRING,<br>    account_name STRING,<br>    balance DECIMAL(18,2)<br>) USING DELTA &quot;&quot;&quot;)<br><br>spark.sql(&quot;&quot;&quot;<br>CREATE TABLE IF NOT EXISTS transfer_audit (<br>    transfer_id STRING,<br>    from_account_id STRING,<br>    to_account_id STRING,<br>    amount DECIMAL(18,2),<br>    transfer_ts TIMESTAMP<br>) USING DELTA &quot;&quot;&quot;)</pre><p><strong>Step 2: Seed sample data</strong></p><pre>spark.sql(&quot;DELETE FROM accounts&quot;)<br>spark.sql(&quot;DELETE FROM transfer_audit&quot;)<br><br>spark.sql(&quot;&quot;&quot;INSERT INTO accounts VALUES (&#39;A100&#39;, &#39;Alice&#39;, 1000.00), <br>(&#39;B200&#39;, &#39;Bob&#39;,   500.00)<br>&quot;&quot;&quot;)</pre><p><strong>Step 3: Run a multi-table transaction</strong></p><pre>transfer_id = &quot;T001&quot;<br>from_account = &quot;A100&quot;<br>to_account = &quot;B200&quot;<br>amount = 100.00<br><br>transaction_sql = f&quot;&quot;&quot;<br>BEGIN ATOMIC<br><br>  UPDATE accounts<br>  SET balance = balance - {amount} WHERE account_id = &#39;{from_account}&#39;;<br><br>  UPDATE accounts SET balance = balance + {amount}<br>  WHERE account_id = &#39;{to_account}&#39;;<br><br>  INSERT INTO transfer_audit<br>  VALUES ( &#39;{transfer_id}&#39;, &#39;{from_account}&#39;, &#39;{to_account}&#39;, {amount},<br>    current_timestamp() );<br>END<br>&quot;&quot;&quot;<br><br>spark.sql(transaction_sql)</pre><p><strong>Step 4: Validate the results</strong></p><pre>print(&quot;Accounts after transfer:&quot;)<br>display(spark.sql(&quot;SELECT * FROM accounts ORDER BY account_id&quot;))<br><br>print(&quot;Audit log:&quot;)<br>display(spark.sql(&quot;SELECT * FROM transfer_audit ORDER BY transfer_ts DESC&quot;))</pre><h3>What This Code Is Doing</h3><p>The transaction block performs three actions:</p><ol><li>Subtracts <strong>100</strong> from Alice’s account</li><li>adds <strong>100</strong> to Bob’s account</li><li>inserts a transfer record into the audit table</li></ol><p>These changes are treated as <strong>one atomic transaction</strong>.</p><p>That means:</p><ul><li>if the insert into transfer_audit fails, the balance updates are rolled back</li><li>If one of the updates fails, the whole transaction is rolled back</li><li>No partial transfer is left behind</li></ul><p>That is the real value of multi-table transactions.</p><h3>Why This Matters</h3><p>Before this capability, architects typically had to solve this with:</p><ul><li>orchestration logic</li><li>retries</li><li>compensating transactions</li><li>reconciliation jobs</li><li>status tables</li></ul><p>Those patterns still have value, but they introduce extra complexity.</p><p>With multi-table transactions, the platform can now enforce a stronger transactional boundary directly.</p><p>That makes your implementation:</p><ul><li>simpler</li><li>easier to reason about</li><li>safer for sensitive workflows</li><li>better aligned to business processes</li></ul><h3>A More Realistic Enterprise Use Case</h3><p>The same pattern applies far beyond banking.</p><p>For example, in an order-processing workflow, you may need to:</p><ul><li>insert an order into orders</li><li>insert rows into order_items</li><li>decrement stock in inventory</li><li>insert an event into order_audit</li></ul><p>Without atomicity, one part may succeed while another fails.</p><p>With multi-table transactions, you can make sure the whole business event is treated as one consistent operation.</p><h3>Key Takeaway</h3><p>This is the main shift:</p><p><strong>Databricks is no longer limited to table-level transactional thinking for certain supported workloads.</strong></p><p>Instead, you can now model a complete business action across multiple tables as one atomic unit.</p><p>That is a major step forward for enterprise lakehouse design.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d7b5e50bfe2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Your Model Works on Your Laptop and Fails in Prod (And How to Stop It)..Anaconda]]></title>
            <link>https://medium.com/@dvkumaraws2019/why-your-model-works-on-your-laptop-and-fails-in-prod-and-how-to-stop-it-anaconda-a0d57e195004?source=rss-c28a38f3f58d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0d57e195004</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Dominic K]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 07:43:41 GMT</pubDate>
            <atom:updated>2026-04-13T07:43:41.545Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Your Model Works on Your Laptop and Fails in Prod (And How to Stop It)..Anaconda × Databricks Integration.</h3><p>If you’ve ever shipped a machine learning model into a regulated enterprise, you already know the dirty secret: the model itself is rarely the thing that breaks. What breaks is everything <em>around</em> it. A pinned NumPy version drifts. A transitive dependency pulls in a GPL-licensed package your legal team hasn’t cleared. A CVE lands on a Friday evening in a library buried four levels deep in someone’s requirements.txt. And suddenly a model that was performing beautifully in a notebook on Monday is a compliance incident by Wednesday.</p><p>This is the “last mile” problem of enterprise AI. And the recent native integration between Anaconda and Databricks is — quietly — one of the more interesting attempts I’ve seen to fix it.</p><p>Let me walk through why.</p><h3>A short story</h3><p>A few years back, I was working on an ML pipeline on Azure Databricks for a team that, by any reasonable measure, was doing everything right. Feature store. MLflow tracking. CI/CD through Azure DevOps. Unity Catalog for governance. Proper promotion path from dev → test → prod.</p><p>And yet we lost the better part of a sprint because a data scientist’s local conda environment had a slightly newer version of scikit-learn than the cluster runtime. The model trained locally produced subtly different predictions than the model trained on the cluster. Not dramatically different. Just… different enough that our drift monitors started screaming, and nobody could work out why, because <em>on paper</em> the environments were identical.</p><p>They weren’t, of course. They never are. A pip install at cluster init time is not the same thing as a locked, curated, signed package coming from a known-good source. It <em>looks</em> the same until it doesn&#39;t.</p><p>Multiply that by thirty data scientists, four workspaces, three cloud regions, and a regulator who wants to know — in writing — exactly which open-source components shipped with the model that decided for a customer. That’s the real problem. And it has almost nothing to do with AI.</p><h3>The architect’s lens: where this actually fits</h3><p>If you draw out a modern Lakehouse + MLOps reference architecture, the Python package layer is usually the bit everyone waves their hands over. “Oh, we use conda.” Or, “we pin versions in cluster_init.sh.&quot; Or the most terrifying one: &quot;the data scientists manage their own envs.&quot;</p><p>Here’s how the Anaconda × Databricks integration slots in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ItEYTR3WCti8FQD6iWX-OQ.png" /></figure><p>The key move is that curated packages arrive inside the Databricks runtime <em>natively</em>, via a custom container image, rather than being pulled at runtime from the open internet. That sounds small. It is not small.</p><h3>What actually changes: before and after</h3><p>The easiest way to explain the value is to show the workflow on both sides of the integration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yH-oAdnYQihRv3kUGsEl8A.png" /></figure><p>On the “before” side, most of us have been living with some version of this for a decade. On the “after” side, the thing that matters is not any single feature — it’s that the <em>same</em> packages flow end-to-end, from a data scientist’s laptop, through Databricks Container Services, into the runtime, and eventually into an MLflow-registered model that lands in production. One chain of custody.</p><h3>The governance story — which is really the business story</h3><p>Here’s where this gets interesting for anyone working in financial services, healthcare, pharma, or the public sector. Regulators don’t care about your model’s F1 score. They care about <em>what went into the decision</em>, and whether you can prove it hasn’t been tampered with.</p><p>Open-source Python is, by default, spectacularly hard to govern. PyPI has hundreds of thousands of packages. Typosquatting is a real attack vector. Transitive dependencies mean a project with five direct imports can easily pull in two hundred packages you’ve never heard of. And the CVE feed never stops.</p><p>What the Anaconda integration brings to the Databricks side is three things that governance teams genuinely care about:</p><ol><li><strong>A known-good source of truth.</strong> Packages are curated, signed, and continuously maintained — not pulled at random from PyPI at cluster init time.</li><li><strong>Vulnerability and license metadata baked in.</strong> You can filter what’s allowed into an environment <em>before</em> it gets deployed, not after an auditor finds it.</li><li><strong>A Private Security Mirror option.</strong> For shops that can’t let clusters talk to the public internet — and there are more of these than you might think — the mirror can sit on-prem or in a locked-down VNet and enforce policy there.</li></ol><p>Wire that into your MLOps lifecycle and the governance story starts to look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WXjSOwalzTQQQ37mFONp8w.png" /></figure><p>Every promotion step carries the <em>same</em> package lineage. When the auditor asks “what version of cryptography was linked into the model that approved this loan?&quot;, the answer is a lookup, not an archaeology expedition.</p><h3>Why it matters for data scientists, not just architects</h3><p>It would be easy to read this as a governance-and-compliance story. It’s not only that. The under-appreciated benefit is that it takes a category of work <em>off the data scientist’s plate entirely</em>.</p><p>In my experience, senior data scientists spend a surprising percentage of their week on things that are not data science: fighting ResolutionImpossible errors, rebuilding environments after a cluster upgrade, explaining to a junior team member why their notebook works locally but fails on the job cluster. None of that creates value. All of it is friction.</p><p>If the curated stack is just <em>there</em> when the cluster spins up — identical across AWS, Azure, and GCP, identical across dev and prod, identical to what the person next to them is running — that friction goes away. The team gets to spend its time on feature engineering, model design, and evaluation. Which, presumably, is why you hired them.</p><h3>Why to use it — the short version</h3><ul><li><strong>Reproducibility without ceremony.</strong> Same packages from laptop to cluster to production, by default.</li><li><strong>Security that doesn’t block velocity.</strong> CVE scanning and license filtering happen at the package layer, not as a late-stage audit.</li><li><strong>Cross-cloud consistency.</strong> Works the same way on AWS, Azure, and GCP Databricks — useful for multi-cloud or migration scenarios.</li><li><strong>On-prem option.</strong> The Private Security Mirror matters for regulated industries that can’t phone home to the public internet.</li><li><strong>Less time lost to dependency hell.</strong> Which is, let’s be honest, the tax every ML team pays and nobody budgets for.</li></ul><h3>The broader signal</h3><p>Zoom out, and this partnership is a signal about where enterprise AI is heading. The easy part — training a model that performs well on a benchmark — is increasingly commoditised. The hard part is everything around it: governance, reproducibility, supply-chain security, audit trails. The teams that win at enterprise AI over the next few years will be the ones who treat the <em>platform</em> as a first-class concern, not an afterthought.</p><p>Curated open source inside a governed Lakehouse runtime is exactly the kind of unglamorous plumbing that separates a production AI platform from an expensive collection of notebooks. It’s not as exciting as the latest foundation model. But if you’ve ever been paged at 2 a.m. because a transitive dependency update broke a scoring pipeline, you know which one you’d rather have.</p><p><em>Thanks for reading. I’d love to hear how other architects are solving the Python supply-chain problem on Databricks — drop a comment.</em></p><p><em>Source and further reading: Anaconda’s original announcement on the Databricks native integration —</em><a href="https://www.anaconda.com/blog/how-anaconda-and-databricks-are-solving-enterprise-ai-biggest-open-source-challenge"><em> anaconda.com/blog.</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0d57e195004" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>