<?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 Siddharth on Medium]]></title>
        <description><![CDATA[Stories by Siddharth on Medium]]></description>
        <link>https://medium.com/@sidpasumarthy?source=rss-5463ac8f063e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OiW6Kai13fCIk_G2GX48Dw.png</url>
            <title>Stories by Siddharth on Medium</title>
            <link>https://medium.com/@sidpasumarthy?source=rss-5463ac8f063e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 13:35:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sidpasumarthy/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[Patterns for AI agents to access data on Databricks]]></title>
            <link>https://medium.com/data-science-collective/patterns-for-ai-agents-to-access-data-on-databricks-a21b293bde6e?source=rss-5463ac8f063e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a21b293bde6e</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Siddharth]]></dc:creator>
            <pubDate>Thu, 20 Aug 2026 22:16:46 GMT</pubDate>
            <atom:updated>2026-08-20T22:16:46.924Z</atom:updated>
            <content:encoded><![CDATA[<p>If your data is governed by Databricks today and you want to build AI agents that can access this data, you are not confined to building agents on Databricks. Through <a href="https://docs.databricks.com/aws/en/agents/mcp-tools/managed-mcp"><strong>managed MCP servers</strong></a>, Databricks exposes your governed data and tools to any agent, whether that agent runs on Databricks, any of the hyperscalers or any other SaaS platform. There should be no reason to move data outside of Databricks to build your agentic solution.</p><p>Following the patterns I have mentioned in this blog will help you avoid</p><ul><li>creating duplicate data silos and dual governance</li><li>challenges with authentication and authorization</li><li>latency due to multiple hops</li><li>moving large volumes of data</li></ul><h3>A quick overview on MCPs</h3><p>The Model Context Protocol (MCP) is an open standard which is being adopted across the industry, providing a standardized way for AI applications to connect with external data sources and tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nkA_CXQD1TGHr3ZgGrCvmA.png" /></figure><p>For example, if you want Claude code or ChatGPT to access your calendar, Slack, emails, etc., you shouldn’t have to figure out which APIs to access and how to set it up. Installing or enabling MCP access to these services is enough to enable this feature. Similarly, at enterprise organizations, MCP servers provided by various data platforms such as Databricks, Salesforce, SAP, etc., can be used to reach these external data sources easily. Below is an example of how easy it is to add custom MCP connectors within Claude</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_6Eyom_7NanyybLHj6tQFg.png" /><figcaption>You can connect to external data sources on claude code seamlessly using MCP servers</figcaption></figure><p>A number of well-known platforms, such as Databricks, now offer managed MCP servers, which are endpoints that are hosted natively and can be integrated within your AI applications easily. While custom MCP servers can be built and <a href="https://docs.databricks.com/aws/en/agents/mcp-tools/custom-mcp">hosted on platforms as well (including databricks)</a>, it adds additional costs, maintenance and effort to implement the auth stack and any additional features. Managed MCP servers solve for that.</p><h3>Recommended patterns when deciding where to build your AI agents</h3><h4>Pattern 1: All the data lives in Databricks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oqEh66HX8yV7UuyQFScbLw.png" /></figure><blockquote><strong>Recommendation</strong></blockquote><ul><li>Build and serve the agents on Databricks.</li><li>Host the LLMs which your agents need through <a href="https://docs.databricks.com/aws/en/ai-gateway/">Unity AI Gateway</a>. Databricks supports most frontier models (Anthropic, OpenAI, Gemini etc.) and open source models.</li><li>If you are also building a front end app to serve your agents, these can also be built and deployed on <a href="https://docs.databricks.com/aws/en/dev-tools/databricks-apps/">Databricks Apps</a> (frameworks such as react, express, streamlit, gradio, dash etc. are supported).</li></ul><blockquote><strong>Advantages of following this pattern</strong></blockquote><ul><li>Access controls you have painstakingly built for your data on Unity Catalog now extends to agents, front end apps, models, tools, and any other component of your AI stack. Your governance investment carries over automatically.</li><li>You don’t have to solve for authentication and authorization. Use Databricks Single Sign-On for all of your users and everything works out of the box natively</li><li>When serving LLMs on Databricks, Unity AI Gateway gives you access to smart routing, cost controls, tracing, payload logging, rate limiting, and guardrails, all from a single, centrally managed interface.</li></ul><h3>Pattern 2: Bulk of the data lives in Databricks and you have to access external systems for additional inputs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hLZgyjEjVHdnoEo74ajSaA.png" /></figure><blockquote><strong>Recommendation</strong></blockquote><ul><li>Build and serve the agents on Databricks.</li><li>Use Unity AI Gateway as the single control plane for all tool calls, both to Databricks data and to external systems</li><li><a href="https://docs.databricks.com/aws/en/ai-gateway/register-mcp-service">Register external systems</a> such as Salesforce, SAP, or any REST service as MCP Services in Unity Catalog. Databricks AI Gateway acts as a governed proxy, routing and auditing every call to the external system on behalf of the agent.</li><li>Avoid replicating external data into Databricks just to make it accessible to agents. The MCP proxy pattern lets agents reach external data in place without building custom connectors.</li></ul><blockquote><strong>Advantages of following this pattern</strong></blockquote><ul><li>Your core data in Databricks remains governed by Unity Catalog with all access controls intact.</li><li>External system access is also routed through Unity AI Gateway, so governance does not fragment as you add more data sources.</li><li>Users authenticate once via Databricks SSO. That identity flows through to both internal Unity Catalog queries and external MCP service calls.</li><li>Full audit trail across all tool calls is maintained in one place, whether the underlying data lives in Databricks or an external system.</li><li>You avoid copying external data into Databricks just to make it accessible to agents. The data stays where it lives; only the query travels.</li><li>MLflow tracing covers the full agent execution, including tool calls to external systems, giving you end-to-end observability in one place without any additional instrumentation.</li></ul><h3>Pattern 3: Databricks is just one of the data sources for your AI application</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A04PTk8t6LC5vErAMZvhCw.png" /></figure><blockquote><strong>Recommendation</strong></blockquote><ul><li>Build the agent on your preferred platform, whether that is, Azure AI Foundry, Vertex AI, the OpenAI Agents SDK, or any other MCP compatible framework.</li><li>Connect the agent to Databricks via Databricks Managed MCP servers. These are endpoints hosted natively by Databricks that expose Genie, Databricks SQL, Unity Catalog functions, Vector Search, and more.</li><li>Authenticate via OAuth U2M so each user’s Databricks identity and permissions propagate through every tool call the agent makes on their behalf.</li><li>Grant callers EXECUTE on specific MCP services in Unity Catalog. This is the only permission required.</li></ul><blockquote><strong>Advantages of following this pattern</strong></blockquote><ul><li>Data stays in Databricks. No migration, no duplication, no new sync pipelines to maintain.</li><li>Unity Catalog access controls, including row and column level security, enforce themselves on every tool call regardless of which platform the agent runs on.</li><li>Full lineage and audit trail are maintained in Databricks even when agents run externally. You do not lose observability just because the agent lives on another platform.</li><li>The managed MCP server means there is no custom connector to build or maintain. Databricks hosts the endpoints, manages the auth stack, and keeps everything current.</li><li>Any MCP compatible agent framework works. The protocol is an open standard, so switching between agent platforms does not require changing how the agent connects to Databricks.</li><li>MLflow tracing and Unity AI Gateway payload logging still capture what the agent requested and what data was returned, even though the agent itself runs on an external platform.</li></ul><h3>Pattern 4: Multi agent architectures where multiple platforms are involved</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*S35cnIQDE06ysjA0_L8NQg.png" /></figure><p>In an organization with multiple platforms, there are situations where a single agent accessing Databricks through a managed MCP server is not enough. When tasks become too complex for a single agent to handle in one pass, a multi-agent architecture becomes the right choice. An orchestrator agent coordinates multiple specialized worker agents, each focused on a specific domain or capability. In this pattern, the supervisor agent and/or some of the worker agents can run on Databricks</p><blockquote><strong>Use cases that call for a multi-agent approach</strong></blockquote><ul><li>Parallel fan-out across large data volumes: When you need to run the same analysis across many segments, documents, or time periods simultaneously, a single agent executes tool calls sequentially and becomes a bottleneck. A supervisor agent dispatches concurrent worker agents and aggregates the results. For example, analyzing demand signals across 20 product categories simultaneously and surfacing anomalies in each would take far too long as a sequential operation.</li><li>Too many tools on a single agent: LLM tool selection accuracy degrades noticeably past 15 to 20 tools. Routing to specialized workers — one for structured data queries, one for semantic retrieval, one for external system calls — keeps each agent’s tool set focused and accurate.</li><li>Subtasks requiring different models or specialized reasoning: A compliance review and a forecasting step may need different prompts, different instructions, or even a different model entirely. You cannot swap a single agent’s reasoning mode mid-execution, so separate agents with distinct configurations are the right structure.</li><li>Human-in-the-loop approval checkpoints: In high-stakes workflows, a human needs to review and approve intermediate results before the next step runs. An orchestrator can pause, surface the result, and resume only after confirmation. A single agent cannot pause mid-execution at a defined checkpoint.</li><li>Long-horizon workflows that exceed context windows: A multi-step task spanning research, analysis, and validation will exhaust a single agent’s context. An orchestrator spins up fresh worker agents per step, passing only the context relevant to that step.</li></ul><blockquote><strong>Recommendation</strong></blockquote><ul><li>Designate an orchestrator agent on your preferred platform (including Databricks) to manage the overall workflow and routing decisions.</li><li>Deploy one or more specialized worker agents on Databricks responsible for data-intensive tasks like querying Unity Catalog, Genie, or vector search indexes.</li><li>Expose the Databricks worker agents to external orchestrator agents using the Databricks A2A protocol</li><li>Keep each worker agent’s tool set focused. Load only the MCP tools relevant to that agent’s domain so that tool selection stays accurate.</li></ul><blockquote><strong>Advantages of following this pattern</strong></blockquote><ul><li>Each agent is specialized, which improves reasoning accuracy and makes the overall system easier to debug and iterate on.</li><li>The Databricks worker agents remain fully governed by Unity Catalog which means access controls, audit logging, and lineage still apply regardless of which external orchestrator is calling them.</li><li>MLflow tracing covers the full execution of each Databricks worker agent, giving you observability into what data was accessed and what reasoning was applied, even in a distributed multi-agent system.</li><li>The orchestrator can retry or reroute a failed Databricks subtask without restarting the entire workflow, making the system more resilient in production.</li><li>As the workflow grows in complexity, you can add new specialized agents without touching the existing ones, keeping each agent’s scope manageable.</li></ul><h3>Databricks Managed MCP servers and how to use them</h3><p><a href="https://docs.databricks.com/aws/en/agents/mcp-tools/managed-mcp#available-managed-servers">Databricks managed MCP servers</a> are endpoints hosted natively within your Databricks workspace. They expose your governed data and tools to any external agent using the standardized MCP protocol, and because they are backed by Unity Catalog, every tool call is subject to the same access controls, audit logging, and lineage tracking you have already set up.</p><p>Through these managed servers, agents can access:</p><ul><li><strong>Genie One</strong>: Natural language analytics across your Databricks workspace</li><li><strong>Genie Agent</strong>: Natural language analytics scoped to one Genie agent</li><li><strong>Unity Catalog functions</strong>: any function (predefined SQL logic) registered in Unity Catalog can be surfaced as an MCP tool. Agents discover and call these functions with RBAC enforced on every execution.</li><li><strong>AI Search</strong>: Access vector search databases on Databricks for RAG use cases.</li><li><strong>Databricks SQL</strong>: Run prexdetermined SQL queries within a Databricks workspace</li></ul><p>External MCP services can also be registered via Unity AI Gateway: Databricks proxies calls to external systems like Salesforce or SAP, registered as MCP Services in Unity Catalog.</p><p>Connecting an external agent to a Databricks managed MCP server is straightforward.</p><ul><li>Every managed MCP server has a URL that points at your workspace.</li><li>For e.g. Unity Catalog functions follows the format https://&lt;workspace&gt;/api/2.0/mcp/functions/{catalog}/{schema}. Any MCP compatible client, including Claude Code, Claude Desktop, and the OpenAI Agents SDK, can connect by pointing at this URL with OAuth credentials and the available tools are immediately discoverable. Agents can also dynamically discover all available tools by querying Unity Catalog directly, so there is no need for hardcoded tool lists.</li><li>For authentication, <a href="https://docs.databricks.com/aws/en/dev-tools/auth/oauth-u2m">OAuth U2M (user-to-machine) is recommended for interactive agents</a>. The user authenticates once against Databricks and their identity propagates to all tool calls, meaning the same row and column level access controls that apply when they query data directly also apply when an agent queries on their behalf. For automated or backend agents, OAuth M2M with a service principal is the right choice.</li></ul><h3>Conclusion</h3><p>Regardless of where your agents run, the goal is the same: your data should not have to move to be useful, and your governance should not have to be rebuilt just because you chose a new agent platform. Through Databricks managed MCP servers and Unity AI Gateway, Databricks acts as a universal data and tool layer for any AI agent, whether it runs on Databricks, a hyperscaler, or a third-party SaaS platform.</p><p>The patterns described in this blog are not mutually exclusive and the diagrams are high level representations. Large enterprises often start with one of these patterns and then expand. The point is that at each stage, your Databricks investment compounds rather than fragments. Your access controls, audit trails, and cost governance follow the data regardless of which agent accesses it or from where.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a21b293bde6e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/patterns-for-ai-agents-to-access-data-on-databricks-a21b293bde6e">Patterns for AI agents to access data on Databricks</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting the Most Out of Databricks Genie: A Guide to being Token Efficient]]></title>
            <link>https://sidpasumarthy.medium.com/getting-the-most-out-of-databricks-genie-a-guide-to-being-token-efficient-73bc11e7f6f0?source=rss-5463ac8f063e------2</link>
            <guid isPermaLink="false">https://medium.com/p/73bc11e7f6f0</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[genie]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Siddharth]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 19:49:23 GMT</pubDate>
            <atom:updated>2026-08-04T23:55:56.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7r5x5WU8ZibaH02P" /><figcaption>Genie One in action</figcaption></figure><p>This blog will cover best practices for setting up Databricks Genie family of products and how to maximize your token usage by being efficient</p><p><a href="https://docs.databricks.com/aws/en/genie/">Databricks Genie</a> moved to pay-as-you-go pricing starting Aug 2026, so how you and your teams use it now shows up directly on the bill. This guide explains how Genie is priced, why some questions cost more than others, and the concrete steps to keep spend under control. None of this is about using Genie less. It is about getting the same answers for fewer tokens.</p><p>The guidance covers all three Genie products:</p><ul><li><a href="https://www.databricks.com/product/genie/agents">Genie Agents</a> (the curated, domain-specific spaces, formerly called Genie Spaces)</li><li><a href="https://www.databricks.com/product/genie/one">Genie One </a>(the account-wide assistant that routes questions to the right space)</li><li><a href="https://www.databricks.com/product/genie/code">Genie Code</a> (the AI coding assistant in a Databricks workspace)</li></ul><p>The goal for any team should not be to ration Genie or push heavy users to higher budgets and move on. It is to help everyone get the answer they need and increase their productivity while being efficient with their spend.</p><h3>How Genie is priced</h3><p>Genie bills on two separate components.</p><p><strong>The LLM component</strong> is the new part. Every question you ask sends tokens to a large language model and gets tokens back, and the charges you incur are directly proportional to the number of input and output tokens in that exchange.</p><p><strong>The compute component</strong> is unchanged from before. When Genie runs the SQL it generates, that query executes on your SQL warehouse and is billed at the usual warehouse rates. These compute costs sit outside the Genie LLM budgets as always.</p><p>A few things worth knowing up front:</p><ul><li><strong>Every named user gets 150 free DBUs per month</strong>, roughly $10.50 in US East, resetting on the first of the month. This is per user, so adding people to the account adds free allowance rather than a seat fee. There are no per-seat charges, unlike most other agent solutions out there.</li><li><strong>As an </strong><a href="https://www.databricks.com/product/genie/code"><strong>introductory offer</strong></a><strong>,</strong> Genie Agents and Genie One are free of cost (excluding service principals, which will be charged at list prices) and Genie Code will get a 25% discount, until January 31, 2027.</li><li><strong>Service principals get no free allowance.</strong> They are billed from the very first token. If you have automations calling Genie under a service principal, audit them, because they cost money that a named user would not.</li><li><strong>You never see per-token rates or which model ran.</strong> Databricks converts tokens to DBUs internally, and the DBU charge reflects whichever model was used. This is done to smartly route the question to the appropriate model and maintain a consistent user experience.</li></ul><p>There is no published “typical monthly usage per persona” number, because it depends entirely on how a team works. The reliable way to forecast is to let real usage run for a few weeks and measure it, rather than guess up front.</p><h3>How Genie chooses a model, and why it changes cost</h3><p>Genie picks its underlying model automatically, per request. There is no model selector for users or admins to select from today.</p><p>The important part for cost is that Genie balances quality against price on every request. If a question can be answered well by a cheaper model, it uses one, and you are charged less. Heavier, more capable models get pulled in for the harder work: multi-step reasoning, ambiguous questions, and agent-mode tasks that verify their own results. This is why the same product can cost very different amounts depending on what you ask for.</p><p>The practical consequences:</p><ul><li><strong>A vague question is more expensive than a precise one.</strong> Ambiguity pushes Genie into deeper reasoning loops and retries, and each one burns tokens.</li><li><strong>Agent mode in Genie agents costs more than a simple chat question.</strong> It does more work per turn (planning, calling tools, checking answers), so it consumes more tokens. Use it when the depth is worth it, not for a quick lookup.</li></ul><h3>Actions at the user level</h3><p>Most of the day-to-day savings come from how people ask questions.</p><h3>Universal habits</h3><ul><li><strong>Land the answer on the first prompt.</strong> A precise, well-scoped question is cheaper than a vague one plus three corrective follow-ups. Say what you want, name the time window, name the tables or metrics.</li><li><strong>Start a fresh thread for each new task.</strong> A long conversation carries all of its accumulated context, and that context is re-sent to the model on every turn. When you switch topics, start over rather than continuing a bloated thread.</li><li><strong>Use your named identity, not a service principal</strong>, when building customer solutions using Genie APIs. Named users get the free allowance and proper governance; service principals are billed from the first token.</li><li><strong>Before doing any heavy Genie work, do a directional estimation</strong> of how much your work might cost. Start with a planning phase and provide clear instructions on which steps to take action on.</li></ul><h3>Best practices when setting up Genie</h3><p>The number of tokens consumed by end users is also directly proportional to how much effort has been put in creating the foundation layer for Genie to access.</p><h3>Genie Agents</h3><p>The context Genie sends to the model on every question comes from your genie agent design. Smaller, cleaner agents mean fewer tokens per question and better routing.</p><ul><li><strong>Pre-join tables and drop columns you do not need</strong> before adding tables to a space. A wide table with irrelevant columns bloats the context on every single question.</li><li><strong>Keep a space to one domain.</strong> A tight, well-scoped space routes better and answers more cheaply than a sprawling mega-space.</li><li><strong>Write concise instructions.</strong> Each instruction and each general-instruction text block counts toward the 100-instruction limit, and verbose prose is re-processed on every question. Prefer short, specific instructions and prefer example SQL over long explanations.</li><li><strong>Mind the limits.</strong> A space allows up to 30 tables, 200 knowledge-store snippets (table descriptions, join relationships, and SQL expressions all share this), and 100 instructions. Genie’s smart context window only sends the relevant slice per question, but leaner spaces still help.</li><li><strong>Size warehouses sensibly.</strong> SQL execution is billed separately on the warehouse. Oversized warehouses cost more, and queries that scan huge tables without filters can hit the 90-second timeout, which wastes both the failed query and the tokens spent generating it.</li><li><strong>Use trusted assets (parameterized queries) for common questions.</strong> When Genie matches a question to a certified parameterized query, it skips model generation entirely and just runs the trusted SQL. This is the cheapest possible path for a known, repeated question, and it is worth curating the top questions your team asks.</li><li><strong>Add example SQL queries.</strong> They anchor Genie toward the right patterns and cut down on retry loops.</li><li><strong>Add an instruction to default to a recent time window</strong> for high-cardinality data, so a loose question does not trigger an accidental full-history scan.</li><li><strong>If you call Genie from an app via the API,</strong> cache known question-and-answer pairs so repeat questions skip the model round trip entirely, and use OAuth with request queuing and backoff.</li></ul><h3>For Genie One</h3><ul><li><strong>Certify tables, metric views, and glossary entries.</strong> Genie prioritizes certified sources, which improves accuracy and reduces reasoning over raw tables.</li><li><strong>Route domain questions to a curated Genie Agent</strong> rather than relying on the open fallback.</li><li><strong>Name a Genie Agent in your question</strong> to steer routing, when you know which one you want.</li><li><strong>Invest in the ontology:</strong> certified metric views for KPIs, clear domains, and a UC glossary for business terms. This is what makes routing land the first time.</li><li><strong>Define KPIs once as metric views</strong> so Genie reasons over a single governed definition instead of reconstructing the calculation from raw tables each time.</li></ul><h3>For Genie Code</h3><ul><li><strong>Scope the task instead of asking for an end-to-end build.</strong> Asking Genie Code to build a whole thing in one go tends to spawn long chains of agentic steps, which is where tokens pile up. Break the work into smaller, specific asks and you keep control of both the output and the cost. This is the single habit that most separates heavy token users from efficient ones.</li><li><strong>Reference tables with the @ sign</strong> and name the catalogs and schemas you are working in. This gets the first response right and cuts back-and-forth.</li><li><strong>Say when you only want an explanation.</strong> A prompt like “I only need an explanation, do not run any code” prevents Genie from launching a multi-step execution you did not intend to pay for.</li><li><strong>Keep tool approval on “Ask First” rather than Auto-Approve</strong> so you stay in control of when work actually runs.</li></ul><p>Give Genie Code standing context so it does not have to ask or guess. Set personal instructions for what is always true about how you work (preferred libraries, conventions, where to find authoritative docs), and keep them tight since they are sent on every interaction. For repeatable procedures, use skills, which load only when a request matches, so they cost nothing on the questions where they do not apply. Your admins can also set these up for the whole team (see “Give Genie Code shared context for teams” below).</p><h3>Actions at the account and workspace level</h3><p>These are the levers platform admins and workspace admins can control.</p><ul><li>Socialize best practices for teams to create efficient and lean Genie agents</li><li>Provide transparency on Genie product usage to all users at an individual level through dashboards and a dedicated Genie space for analyzing their previous sessions</li><li>Trash deprecated Genie Agents so they stop confusing routing when users are asking questions in Genie One</li><li>Set up workspace level instructions for Genie Code. Genie Code workspace instructions live at /Workspace/.assistant_workspace_instructions.md. These instructions can be maintained in Git, and the Databricks CLI or the Workspace API can be used to push this file to every workspace.</li></ul><h3>Set budgets before you need them</h3><p>Genie spend is governed through budgets. Admins create budgets from the account console under Usage.</p><ul><li><strong>Scope budgets</strong> to the whole account, specific workspaces, user groups, or individual users. Account and per-user limits are evaluated independently, and whichever is hit first blocks further paid usage.</li><li><strong>Choose the threshold type.</strong> Shared thresholds pool a cap across a group; per-user thresholds give each person their own cap; per-user overrides raise the cap for known power users.</li><li><strong>Pick the action:</strong> alert by email, block usage, or both.</li><li><strong>Setting a paid budget to $0 blocks all paid usage but never touches the 150-DBU free tier.</strong> That free allowance cannot be turned off by budget settings.</li><li><strong>Budgets are shared across all three Genie products.</strong> You cannot set a separate cap for Genie Code versus Genie Agents versus Genie One directly. The workaround is to put users into product-specific groups and apply per-user thresholds per group.</li><li>A budget created mid-month backfills to the start of that month.</li></ul><h3>Monitor what is actually happening in system tables</h3><p>Paid Genie usage: system.billing.usage where billing_origin_product = ‘GENIE’.</p><p>Free 150DBU/User Genie usage: system.billing.usage where billing_origin_product = ‘GENIE’ and sku_name = ‘GENIE_FREE_USAGE’</p><p>Genie Agents activity: system.access.audit where service_name = ‘aibiGenie’.</p><p>Genie One activity: system.access.audit where service_name = ‘genieChat’.</p><p>Genie Code activity: system.access.assistant_events.</p><h3>Give Genie Code shared context for teams</h3><p>Genie Code gets faster and cheaper when it already knows how your teams work, so set up shared context once rather than having every user re-explain it.</p><ul><li><strong>Share conventions through the repository.</strong> Genie Code automatically discovers AGENTS.md and CLAUDE.md files in a project. Check these into the repo and everyone on the team picks up the same conventions without configuring anything individually, and the context travels with the code.</li><li><strong>Publish shared workspace skills.</strong> Skills placed in Workspace/.assistant/skills/ are available to everyone in the workspace without opting in. Use them for workflows that should be consistent across the team, such as an ingestion pattern, a review checklist, or a deployment runbook, so people are not re-explaining the same procedure and paying tokens for it each time.</li><li><strong>Approve MCP servers for context that already exists elsewhere.</strong> Connect Genie Code to Confluence runbooks, internal platform APIs, or GitHub through admin-approved MCP servers. This makes the right context available on demand instead of having users paste the same documentation into prompt after prompt, and giving Genie a direct tool rather than making it reason its way to an answer can cut the number of steps a task takes.</li></ul><h3>Common questions</h3><p><strong>How much does a typical question cost?</strong> There is no single number, and that is deliberate: cost depends on the length of the question, the size of the answer, how many turns the conversation runs, and whether the work needs a heavier model. A quick, well-scoped lookup is cheap; a long agent-mode session that reasons over many steps is not. The honest way to size your own usage is to work normally for a couple of weeks and look at what accrues. As a rule of thumb, light question-and-answer usage tends to stay comfortably inside the free monthly allowance.</p><p><strong>How do I see how much I have used?</strong> Today, usage visibility lives at the admin level through billing system tables. Usage dashboards can be made available by the admins to individual users.</p><p><strong>What happens when I hit my limit</strong>? Your admin sets budgets that either warn by email, block further paid usage, or both. The 150-DBU monthly free allowance is always preserved; no budget setting can take it away, and it resets at the start of each month. If paid usage is blocked, you will need your admin to raise the cap. The exact in-product message and whether you get an advance warning depend on how your admin configured the budget, so confirm the specifics with them before you are in the middle of something important.</p><p><strong>Is a wrong or failed answer still charged?</strong> Generally yes. Tokens are spent generating a response even if the SQL is wrong or a query times out, and each regeneration is a fresh interaction. That is why a precise first prompt saves money: it avoids the corrective back-and-forth, and each correction is its own charge.</p><p><em>*All of these opinions are my own personal opinions and not an official recommendation from Databricks.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73bc11e7f6f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A framework for agentic architectures on Databricks]]></title>
            <link>https://sidpasumarthy.medium.com/a-framework-for-agentic-architectures-on-databricks-115f901fb9cd?source=rss-5463ac8f063e------2</link>
            <guid isPermaLink="false">https://medium.com/p/115f901fb9cd</guid>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[databricks]]></category>
            <dc:creator><![CDATA[Siddharth]]></dc:creator>
            <pubDate>Thu, 28 May 2026 21:38:37 GMT</pubDate>
            <atom:updated>2026-05-28T21:38:37.107Z</atom:updated>
            <content:encoded><![CDATA[<p>I get asked some version of this question every other week: <em>“We’re building an agentic solution and should we use a multi-agent setup?”</em> And eight times out of ten, the honest answer is “not yet.”</p><p>Multi-agent architectures look impressive in a slide deck. A supervisor routing to four specialized sub-agents, each with its own prompt, model, and tool set — that’s the kind of diagram that gets attention. But most of the questions a user actually wants answered might not need that complexity. They need a working dashboard, a working text-to-SQL surface, or a single agent with the right tools wired up.</p><p><strong>Databricks</strong> offers an agent stack that spans the full range — from “no agent at all” all the way through “multi-agent across organizations.” This article walks through how to think about that stack: when each tier earns its keep, what the components are, how they interact, and where MCP fits in.</p><p>If you’re building or evaluating agents on Databricks, this is the mental model you can keep coming back to.</p><h3>The five-tier ladder</h3><p><a href="https://docs.databricks.com/aws/en/dashboards/concepts">AI/BI Dashboards</a>, <a href="https://docs.databricks.com/aws/en/genie/">Genie Spaces</a>, <a href="https://docs.databricks.com/aws/en/generative-ai/agent-bricks/knowledge-assistant">Managed agents</a> and <a href="https://docs.databricks.com/aws/en/generative-ai/agent-framework/author-agent">Custom agents</a> on Databricks give you the ability to build agentic solutions across a wide range. Pick the simplest tier below that provides a solution for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*28bAabOxoPFOeW6U.png" /></figure><h3>How to pick the agent tier?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K1v-r48SDVIOn3MG.png" /></figure><h3>The Databricks agent menu</h3><p>The agent menu splits cleanly into pre-built (managed by Databricks) and custom (you build).</p><h3>Pre-built and managed agents</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AfNCl1iLT83OaYNs.png" /></figure><h3>High-code / custom agents</h3><p>You author the agent — LLM, tools, system prompt, orchestration logic — using <a href="https://docs.databricks.com/aws/en/generative-ai/agent-framework/author-agent"><em>ResponsesAgent</em></a> or <em>ChatAgent</em> as the MLflow interface, with any framework underneath (OpenAI Agents SDK, LangGraph, DSPy, LangChain, plain Python). Two deployment hosts: <a href="https://docs.databricks.com/aws/en/generative-ai/agent-framework/author-agent"><strong>Databricks Apps</strong></a> (recommended for new agents — OBO user-token forwarding, MLflow tracing, git-backed deploy, custom UI, long-running async support) and <a href="https://docs.databricks.com/aws/en/generative-ai/agent-framework/author-agent-model-serving"><strong>Model Serving</strong></a> (existing GA path with inference tables, AI Gateway, autoscaling, traffic splitting).</p><h4>Responses Agent</h4><p>The MLflow agent interface Databricks now recommends. Wraps any framework — OpenAI Agents SDK, LangGraph, DSPy, LangChain, plain Python. It’s an integration contract, not a framework.</p><h3>Interaction patterns</h3><p>A useful way to standardize interaction patterns is through the lens of <em>how agents talk to other things</em>. There are five patterns that cover almost every architecture I see:</p><h3>Single agent — direct tool invocation</h3><p>An agent calls tools (MCP, UC Functions, vector search) directly without an LLM routing layer. The dominant pattern for single-agent designs.</p><ul><li><strong>When.</strong> Tools are non-overlapping in purpose. The LLM picks unambiguously from short tool descriptions.</li></ul><h3>Multiple agents — no supervisor</h3><p>Multiple agents share a UI shell but never call each other. They’re separate workflows the user picks between, dressed in a single chatbot UI.</p><ul><li><strong>When.</strong> Use cases have non-overlapping users or data, but business wants one branded entry point.</li><li><strong>Why call it out.</strong> Avoids needless coupling. Each agent ships, evals, and rate-limits independently. Comes up repeatedly in field discussions as the “do we need a supervisor here?” anti-pattern check.</li></ul><h3>Managed Supervisor agent on Databricks</h3><p>One LLM-driven router with a declared sub-agent list. The simplest path to a multi-domain agent on Databricks. Trades model choice and routing flexibility for a managed runtime, a pricing model, and a built-in observability surface.</p><h3>Custom Supervisor agent on Databricks</h3><p>A Responses or Chat agent with a <em>tools</em> array, looping until the LLM stops calling tools. Replaces older regex-based routers; gives full model choice and unrestricted routing logic. Built on Databricks Apps or Model Serving.</p><ul><li><strong>When.</strong> Need model choice, custom caching, persona switching, parallel fan-out, semantic caching, or sub-agents not yet supported by the managed Supervisor.</li><li><strong>Trade-off.</strong> You own the loop, the retries, the eval scaffolding, and the upgrade path. The managed Supervisor gives those back to you.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ybROWNwxAPAwXx6x9Wvt-A.png" /></figure><h3>Agent-to-Agent (A2A)</h3><p>Google’s open A2A protocol. A version-aware HTTP handshake between agents that can live on different platforms, clouds, and identity providers. The pattern on Databricks: a thin proxy mints a Databricks OAuth M2M token to pass the App front door, then forwards to the agent.</p><ul><li><strong>When.</strong> A sub-agent lives outside Databricks — Gemini Enterprise, Vertex AI Search, a third-party orchestrator, a customer-owned agent on a different cloud.</li></ul><h3>Trade-offs across the five patterns</h3><p>How each pattern scores on the four dimensions that drive most decisions. <strong>Latency</strong> and <strong>cost</strong> read as you’d expect. <strong>Build effort</strong> covers initial authoring plus ongoing maintenance — the upgrade path, retries, eval scaffolding, observability features. <strong>Governance</strong> combines surface area (how many distinct security boundaries you have to manage) and OBO posture (whether on-behalf-of user-token forwarding works natively across those boundaries)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wt0ginDnYYXWDaDn.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xZjIQF7L9A0OVxdP.png" /></figure><h3>Building custom agents on Databricks</h3><p>If you’re going the custom-agent route, there are two places your agent code can live: a <strong>Databricks App</strong> or a <strong>Model Serving endpoint</strong>. Both are GA.</p><p><strong>Databricks Apps is now the recommended home for custom agents.</strong> It’s the option to start with for new builds. You author the agent with the MLflow ResponsesAgent interface, define UC resources the agent needs (warehouses, vector indexes, secrets, functions), and deploy. The App takes care of serving, user-token forwarding, scaling, and exposing the agent as a callable endpoint.</p><p><strong>Model Serving remains a fully-supported path</strong> for teams already running custom agents on it. If you’ve invested in a Model Serving deployment, you don’t need to migrate; the path is still GA and the agent author docs cover both.</p><h3>The build loop — Databricks apps as agent host</h3><p><strong>Author locally:</strong> Start from a template in <em>databricks/app-templates</em>. Wrap the agent in <em>ResponsesAgent</em>. ResponsesAgent is the integration contract; the framework underneath is your call can be OpenAI Agents SDK, LangGraph, DSPy, LangChain, plain Python etc.</p><p><strong>Run the server: </strong>FastAPI or Starlette on port 8000. Full logs, full transparency, normal debugger.</p><p><strong>Declare resources:</strong> In <em>app.yaml</em> declare UC functions, vector search indexes, UC tables, MLflow experiments, UC connections, other Apps, MCP OBO scopes. One DAB file grants the service principal everything it needs.</p><p><strong>Tracing:</strong> <em>@mlflow.trace</em> decorators or auto-instrumentation for LangChain / OpenAI Agents. Real-time MLflow trace server captures spans during execution. Set <em>app_version</em> to the git commit SHA for traceability.</p><p><strong>Evaluate:</strong> <em>mlflow.genai.evaluate()</em> on an eval dataset built from traces. Built-in scorers: Guidelines, Correctness, Safety, RetrievalGroundedness. Custom <em>@scorer</em> functions for anything else. Run in CI on each commit.</p><p><strong>Deploy: </strong><em>databricks apps deploy</em> from a git-backed App. Versioned by commit SHA. Roll back by re-deploying a prior commit. Use DAB for first-time setup (resources, SP grants); DAB is heavyweight for code-only iteration.</p><p><strong>Operate: </strong>Deploying databricks apps automatically spins up compute. Static horizontal scaling is also available, which unlocks scale-to-zero and stronger governance. Opentelemetry sidecar pushes logs and metrics to UC-governed Delta tables.</p><h3>MCP strategy — what it is, where it matters</h3><p>Model Context Protocol (MCP) is an industry-standard way for an LLM client to call a tool. The client (Claude Desktop, ChatGPT Enterprise, Cursor, Copilot Studio, your own agent, anything else that speaks MCP) connects to an MCP server and gets back a typed list of tools it can invoke. The protocol handles the request/response shape; the server provides the actual capabilities.</p><p>The reason MCP matters for the Databricks story is that <strong>the most valuable tools an agent can call are the ones that touch your governed data</strong> — and those tools should live as close to the data as possible.</p><h3>Why host MCP servers on Databricks</h3><p>Anchor MCP servers next to the platform where data is sensitive and stateful. For a number enterprises who are building agents, that’s Databricks — UC holds the catalog, the access controls, the lineage, and the audit log. MCP belongs inside the same trust boundary as the data it acts on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*faqBQR5oJgktMc-L.png" /></figure><p>These advantages compound when most of your analytical data lives in Unity Catalog. The closer the tool surface is to the governance layer, the less translation and audit work you have to do.</p><h3>Three MCP shapes on Databricks</h3><p>Databricks gives you three ways to expose MCP servers, and they cover different needs:</p><ul><li><strong>Managed MCP</strong> — Databricks runs these. They expose Genie Spaces, Vector Search indexes, and Unity Catalog Functions as MCP tools. Zero code on your end; you point a client at the endpoint and you’re done.</li><li><strong>Custom MCP</strong> — You write the MCP server (it’s just a small Python service) and deploy it as a Databricks App. Use this when the tool you want to expose isn’t a vanilla UC table query — maybe it composes multiple internal APIs, applies business logic, or hits a third-party service through governed credentials.</li><li><strong>External MCP</strong> — A third-party SaaS already publishes an MCP server (Slack, GitHub, Linear, an internal SaaS your team uses). You connect to it through Unity Catalog Connections so the credentials, audit, and access controls flow through UC, even though the actual MCP server lives outside Databricks.</li></ul><h3>MCP vs UC Function vs in-code tool</h3><p>A common point of confusion: if a UC Function is already a tool, why expose it via MCP? Quick decision rule:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fs2hGUR5FYvNwMPX.png" /></figure><h3>Who consumes Databricks MCP</h3><ul><li><strong>Genie, Vector Search, UC Functions MCPs</strong> are built for customers building agents — in and outside Databricks.</li><li><strong>Glean, Copilot Studio, ChatGPT Enterprise, Claude Enterprise</strong> are explicitly encouraged to integrate via Genie MCP for talk-to-your-data. Genie MCP is positioned as the surface for cross-platform data Q&amp;A.</li><li><strong>DBSQL MCP</strong> is for IDE / data-engineering workflows inside Cursor — a different audience than agent builders.</li></ul><h3>Closing thought</h3><p>The agent space moves fast enough that any specific component list will age. The mental model in this article is the part that doesn’t.</p><p>The honest goal of multi-agent architecture isn’t to have more agents. It’s to have just enough agents to answer the question well, and not one more.</p><p><em>I am a Field Engineer at Databricks. Views here are my own and don’t represent Databricks’s official positioning.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=115f901fb9cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databricks doesn’t have to be expensive!!]]></title>
            <link>https://sidpasumarthy.medium.com/databricks-doesnt-have-to-be-expensive-bcdc1458fcb5?source=rss-5463ac8f063e------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcdc1458fcb5</guid>
            <category><![CDATA[roi]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[azure-databricks]]></category>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[Siddharth]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 15:27:28 GMT</pubDate>
            <atom:updated>2025-01-21T16:45:24.769Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Sometimes you have to spend some to make more.</strong> For example, spending money on conveniences like getting my lawn mowed can free up my time to do other productive things. The same principle applies to organizations when they use <strong>Databricks</strong>. They want to spend less time integrating different parts of their data estate, and more time being the leader in their industry and growing their business.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SdpKJTxihSGnykTU-zPCXw.png" /></figure><p>While that is the premise behind investing in a managed SaaS platform, things can become unruly quickly. What initially seemed like an investment may soon start to resemble a cost center.</p><p>In this blog we will explore some proactive and reactive ways to keep your Databricks costs in check. We will also discuss steps you can take to quantify your investments in an enterprise application like Databricks.</p><h3>Decisions made early on have an exponential effect on future costs</h3><h4>Cloud and region selection</h4><p>While databricks is available in most regions, some regions across the 3 major cloud providers might receive new features earlier. For e.g. AWS regions like West US 2 and East US 1 often get new features first. This alone can determine speed to market, adoption of more tools to fill gaps, spend on integrations etc. all because of feature unavailability.</p><h4>Double compute, double storage and egress costs</h4><p>If you are already using Databricks for ETL and warehousing, adopting platforms like Snowflake or Azure Fabric in the enterprise architecture might lead to double compute, double storage and egress costs. I have seen a lot of expensive architectures where cost is an afterthought and money is being spent on moving data around and processing it on multiple platforms, to cater to end user needs.</p><h4>Storage and lifecycle policies</h4><p>Though this doesn’t affect Databricks costs directly, storage costs can add up quickly on your cloud service provider’s bill. Setting up data lifecycle policies to avoid prolonged data retention, archiving cold data, evaluating dual/multi region buckets to understand data egress costs, choosing the right data formats (e.g delta parquet integrated natively with Databricks) and enabling auto maintenance tasks on Databricks can bring down storage costs drastically</p><h4>Skills enablement</h4><p>You can’t expect me to become a barista at Starbucks without proper training. Well you can, but you are in for a lot of trouble. Same goes with Databricks. Setting up a Center of Excellence and <a href="https://www.databricks.com/learn/training/home">providing training</a> opportunities to employees, will go a long way</p><h4><a href="https://www.databricks.com/product/unity-catalog">Unit Catalog</a> as your enterprise data catalog</h4><p>Unity catalog has become the centerpiece of Databricks in the past few years and has become table stakes if you want to save costs (or move fast). Serverless compute, predictive optimization, lineage, data classification etc. are just few features which often need Unity Catalog.</p><h3>Optimizing your existing Databricks environment</h3><p>Let’s use the 80/20 rule and go in the order of which 20% of the actions might bring down 80% of your costs. As you can imagine, compute and storage make up the bulk of Databricks and associated cloud costs.</p><p>As you start implementing some of these recommendations, it will be a good idea to document the steps you are taking and setting up a <strong>Center of Excellence</strong> at your organization, which will become the north star for all future projects</p><h3>Managing Compute Costs</h3><h4><strong>Rightsize compute</strong></h4><ul><li>Select the right clusters for the right job. All-purpose compute for adhoc jobs, Job compute for scheduled/triggered jobs and SQL warehouses for adhoc queries. All purpose clusters cost up to <strong>thrice</strong> as much as job compute. <a href="https://docs.databricks.com/en/compute/cluster-metrics.html"><strong>Run this SQL query</strong></a> to find all the jobs that are being run on all-purpose compute and change them to job compute</li><li>Right size existing compute by checking <a href="https://docs.databricks.com/en/compute/cluster-metrics.html"><strong>compute metrics</strong></a> for all purpose clusters, <a href="https://docs.databricks.com/en/compute/sql-warehouse/monitor.html"><strong>monitoring</strong></a> dashboards for SQL warehouses and the <a href="https://docs.databricks.com/en/compute/cluster-metrics.html"><strong>compute metrics</strong></a><strong> </strong>for jobs compute instances.</li><li>Import the <a href="https://docs.databricks.com/en/admin/system-tables/jobs-cost.html"><strong>jobs monitoring dashboard</strong></a><strong> </strong>to start optimizing your most expensive and least utilized job clusters. The dashboard also has a ton of information on which jobs are running on outdated DBR versions, don’t utilize autoscaling, fail often, produce datasets which are used by no one and run with a high frequency.</li><li>Talk to business stakeholders to evaluate if their jobs need to be a streaming job or have to run at the current frequencies. I have seen a lot of my customers save costs just by changing the job frequency</li></ul><h4>Use <a href="https://docs.databricks.com/en/compute/serverless/index.html">serverless compute</a> when appropriate (and if available)</h4><p>When using serverless you don’t spend on compute with your cloud provider anymore. You might see your compute costs on Databricks increase but don’t forget to compare it with Databricks + Cloud VM costs. Use serverless when</p><ul><li>SLAs are short. Serverless compute takes seconds to spin up</li><li>You don’t know how to size your compute (most adhoc and variable use cases). Serverless takes care of autoscaling and optimized resource allocation</li><li>Light workloads or short lived workloads often underutilize compute and can be moved to serverless</li><li>Management overhead costs can creep up and are often not accounted. Serverless takes care of DBR upgrades, autoscaling and auto-optimizations. If you don’t want dedicated folks worrying about effective compute utilization, go with serverless.</li></ul><h4>Take advantage of Databricks native compute optimizations</h4><p>Compute costs are directly correlated to how long your jobs run, which is further correlated to if you are taking advantage of all spark related optimizations to make your jobs faster. is This process might be time intensive, however can be adopted as a best practice for ongoing workloads</p><ul><li>Use delta tables instead of parquet or other table formats. Databricks tightly integrates with delta format and uses data skipping, indexing and clustering to make jobs run faster</li><li>Use Databricks managed tables. This enables <a href="https://docs.databricks.com/en/optimizations/predictive-optimization.html">predictive optimization</a> which takes care of automated <a href="https://docs.databricks.com/en/delta/clustering.html">clustering</a>, <a href="https://docs.databricks.com/en/sql/language-manual/delta-vacuum.html">vacuum</a> and <a href="https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-aux-analyze-table.html">analyze</a>. For external tables run these commands manually or in a scheduled fashion to reduce job times and costs</li><li>Upgrade DBRs. Latest <a href="https://docs.databricks.com/en/release-notes/runtime/index.html">DBR versions</a> often come with optimizations under the hood which can directly save costs</li></ul><h4>Proactive measures you can take to keep compute costs in check</h4><ul><li>Establish <a href="https://docs.databricks.com/en/admin/clusters/policies.html">compute policies</a> for users/groups. You don’t want everyone running GPUs</li><li>Set up <a href="https://docs.databricks.com/en/compute/clusters-manage.html#automatic-termination">auto-termination</a>, <a href="https://docs.databricks.com/en/compute/configure.html#enable-autoscaling">auto-scaling</a>, <a href="https://docs.databricks.com/en/compute/configure.html#spot-instances">spot instances</a>, <a href="https://docs.databricks.com/en/compute/configure.html#spot-instances">cluster pools</a></li><li>Set up <a href="https://docs.databricks.com/en/admin/account-settings/budgets.html">budgets </a>and <a href="https://docs.databricks.com/en/admin/usage/budget-policies.html">budget policies for serverless</a> usage to alert you</li><li>Establish a showback or chargeback model (using tags) for projects/LOBs in your organization, to keep them aware of their costs</li></ul><h3>Evaluate Storage Costs</h3><ul><li>Automating maintenance tasks such as <a href="https://docs.databricks.com/en/sql/language-manual/delta-vacuum.html">Vacuum</a> (removes unused files from table directory) bring down storage costs by a lot. I have seen customers who reduced storage by 80% using this.</li><li>Evaluate data lifecycle policies in your cloud environment and ensure you are not paying for retrieval of archival data and if your data retention policies are in place</li><li>Data egress costs can add up if there is cross region activity. Evaluate tools like <a href="https://docs.databricks.com/en/delta-sharing/index.html">delta sharing</a> to reduce that</li></ul><h3>Set up Monitoring and Observability</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZB-MzDvKXuYDmtywN2ldg.png" /></figure><p>While this is a reactive measure, spending some time and creating your own <a href="https://docs.databricks.com/en/dashboards/index.html">AI/BI dashboards </a>to track costs is important. <a href="https://docs.databricks.com/en/admin/system-tables/index.html"><strong>Databricks System Tables</strong> </a>provide the foundation for all cost, access and resource utilization data on Databricks. Here are some dashboards you can use as a baseline to get started quickly</p><ul><li><a href="https://docs.databricks.com/en/admin/account-settings/usage.html">Account usage</a></li><li><a href="https://docs.databricks.com/en/admin/system-tables/jobs-cost.html">Jobs monitoring</a></li><li><a href="https://www.databricks.com/resources/demos/tutorials/governance/system-tables">Consumption forecast, Model serving costs, Unity Catalog and Volume analysis, Warehouse cost attribution</a></li><li><a href="https://github.com/databricks-industry-solutions/security-analysis-tool">Security analysis tool</a> dashboard</li></ul><h3>Attaching business value to your Databricks spend</h3><p>Databricks costs can end up being one of the biggest line items for a data platform team. It is important start quantifying the business value from the enterprise wide projects that are being powered by Databricks. Here are some ideas</p><ul><li>Implement a showback or chargeback model to let projects/LOBs take responsible decisions. This makes it very easy to secure funding and showcase the business value. I have seen organizations deploy this model in two ways. A new Databricks workspace can be set up for each LOB/project and costs can be tracked at a workspace level. The other way is to start using tagging for all resources in a workspace that are needed for a project.</li><li>Set up a demand planning process before embarking on a new project. This should include estimating compute, storage, operational and build costs for deploying a project on Databricks.</li><li>Quantifying business value can be more of an art than science (I sound like a broken record saying this). Run hypothetical scenarios where you quantify the value of a project (e.g. recommendation engine for a grocery app) and establish how much of that success can be attributed to running those ML models on Databricks. It’s important to track these success stories and socialize all the good work which data teams do.</li><li>Create a dashboard which takes all the cost and business value inputs, and can be accessed by leadership in real time. This is easier said than done, but can be improved upon as the organization matures.</li></ul><h3><strong>Socialize</strong></h3><p>It’s hard to run things efficiently at all times and even harder to justify costs to leadership, if there is no method to the madness. Socialize the measures you take and the ongoing impact. I hope some of these steps will help you on the journey to adopt Databricks without worrying about the costs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcdc1458fcb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Delta Sharing Demystified: A Comprehensive Guide to Cross-Platform Data Exchange]]></title>
            <link>https://sidpasumarthy.medium.com/delta-sharing-the-easiest-way-for-enterprises-to-share-data-securely-81b72b7542ee?source=rss-5463ac8f063e------2</link>
            <guid isPermaLink="false">https://medium.com/p/81b72b7542ee</guid>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[data-sharing]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-collaboration]]></category>
            <category><![CDATA[delta-sharing]]></category>
            <dc:creator><![CDATA[Siddharth]]></dc:creator>
            <pubDate>Mon, 11 Nov 2024 16:23:38 GMT</pubDate>
            <atom:updated>2024-11-11T17:14:45.779Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog, we will understand what delta sharing is, how it works under the hood, various scenarios where you can use it and what kind of data you can share</p><h3>What is delta sharing?</h3><p>It is an open protocol, developed by Databricks, to share data assets between organizations across different platforms, clouds and regions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G_FR0W3wTWtrQ0sN43q0vw.png" /></figure><p><strong>Delta Share:</strong> A collection of read only data assets that a provider creates and shares with one or more recipients.</p><h3>FAQ: Let’s start with answering a few questions which come to mind immediately</h3><p><strong>Q: Is this for organizations to share data internally or with other organizations externally?<br></strong>A: Both.</p><p><strong>Q: Do I have to use Databricks?</strong><br>A: <strong>No.</strong> While the easiest way to use delta sharing is if two organizations are already using Databricks, a <a href="https://github.com/delta-io/delta-sharing">self managed implementation of the open source delta sharing Server</a> lets you share data between any two platforms, whether Databricks or not.</p><p><strong>Q: What kind of data can I share?</strong><br>A: In the open source delta sharing implementation, you can share read only versions of tables and table partitions (delta or parquet). In the Databricks managed delta sharing where you are using U<a href="https://docs.databricks.com/en/data-governance/unity-catalog/index.html">nity Catalog</a>, you can also share notebooks, views (including <a href="https://docs.databricks.com/en/views/dynamic.html">dynamic views</a>), ML models and volumes (you can put any kind of files in a volume)</p><p><strong>Q: Do I have to share data within the same cloud and same region? </strong><br>A: Delta sharing allows cross cloud and cross region sharing. This feature is also inbuilt into the Databricks platform. You can expect data egress costs.</p><p><strong>Q: What makes it secure?</strong><br>A: Delta sharing protocol uses signed URLs and token based authentication to securely let recipients access data sitting in cloud storage buckets directly. The delta share server acts as a middleware managing access and authentication</p><p><strong>Q: Is it expensive to use?<br></strong>A: Both the open source version and the Databricks managed delta sharing are free to use (no licensing fees). For open source implementations, you will incur costs for the compute needed to set up the delta sharing server (can be small because data doesn’t flow through the server), whereas this is provided free of cost if you are using Databricks. <br>In both cases, providers incur the usual data storage costs and any egress fees. The recipients incur compute costs for materializing and reading the data from a delta share.</p><p><strong>Q: Can SaaS platforms and BI tools interact directly with data shared through delta sharing?</strong><br>A: There are <a href="https://github.com/delta-io/delta-sharing?tab=readme-ov-file#the-community">connectors available</a> for platforms like PowerBI, Tableau, Excel and many more, which allow you to interact with data in a delta share directly. You can also access delta shares with open source clients like pandas, R, Spark etc. This ecosystem keeps growing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9lRdk6PSV66BbEsLNc5IFQ.png" /><figcaption>The Delta Sharing Ecosystem</figcaption></figure><h3>Delta sharing under the hood</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TP4H62fSfydZm7vz.jpg" /></figure><ul><li>Provider creates the delta share, adds data assets to it and shares the delta share with the recipient <a href="https://docs.databricks.com/en/delta-sharing/share-data-open.html#delta-sharing-open-sharing-workflow">using a token</a> (when recipient is not on databricks) or through a <a href="https://docs.databricks.com/en/delta-sharing/share-data-databricks.html#share-data-using-the-delta-sharing-databricks-to-databricks-protocol-for-providers">sharing identifier</a> (when recipient is on Databricks).</li><li>When recipient wants to access the data in a delta share, they authenticate to the sharing server using the bearer token.</li><li>Delta sharing server verifies if the client is allowed to access the data, logs the request and determines which data to send back.</li><li>Delta sharing server generates short-lived pre-signed URLs which the recipient client can use to read data directly from the cloud provider, which makes the whole process very efficient.</li></ul><h3>Delta Sharing Implementation Scenarios</h3><p>I have summarized the high level steps that you need to take to implement each scenario. Please go through the links in the headings for detailed steps.</p><h4><a href="https://docs.databricks.com/en/delta-sharing/share-data-databricks.html#">Databricks to Databricks</a></h4><ul><li>Get the sharing identifier(a unique code which has information about the cloud, region and metastore id) from the recipient.</li><li><a href="https://docs.databricks.com/en/delta-sharing/share-data-databricks.html#">Create a delta share </a>by going to Catalog -&gt; Delta Sharing -&gt; Shared by me -&gt; Share data, follow the steps and use the sharing identifier.</li><li>Recipient can see the delta share in their databricks workspace and add the shared data assets (tables, volumes, models etc. )to their catalog.</li><li>New recipients can be added/removed from existing delta shares.</li></ul><h4><a href="https://docs.databricks.com/en/delta-sharing/share-data-open.html">Databricks to Other</a></h4><ul><li>Create a delta share by going to Catalog -&gt; Delta Sharing -&gt; Shared by me -&gt; Share data, follow the steps and add a recipient using Token.</li><li>Provider sends the activation link that gets generated, to the recipient, over a secure channel.</li><li>Recipient uses the activation link to download the credential file, which is used to access the shared data.</li><li>Recipient can use clients like spark, pandas etc. or connectors for PowerBI, Tableau etc. and <a href="https://docs.databricks.com/en/delta-sharing/read-data-open.html">use the credential file to access the shared data</a>. <a href="https://docs.databricks.com/en/delta-sharing/read-data-open.html">The steps</a> will depend on what the recipient uses.</li></ul><h4><a href="https://github.com/delta-io/delta-sharing?tab=readme-ov-file#delta-sharing-reference-server">Self hosted delta share implementation</a></h4><ul><li>The provider creates their own implementation of a delta share server using the open source delta sharing protocol. <a href="https://github.com/delta-io/delta-sharing?tab=readme-ov-file#delta-sharing-reference-server">Follow these steps</a>. This implementation is generally more technically demanding and not recommended for individual users. You will have to build out the APIs to create new shares, create a recipient profile etc. It is used only by data vendors to build their own data sharing solutions. <a href="https://delta.io/blog/2023-04-24-open-source-selfhosted-delta-sharing-server/">See an example here</a>.</li><li>Recipient can use the packages created by the provider to get access to the shared data.</li></ul><h3>Which data assets can you share based on the scenario?</h3><p>These can change as the blog gets older.</p><h4>Databricks to Databricks</h4><p>Tables (delta or parquet format), Table Partitions, <a href="https://docs.databricks.com/en/query-federation/index.html">Lakehouse Federated</a> Tables (Private Preview), Views, Materialized Views (Private Preview), Dynamic Views, ML models, Volumes, Schemas and Notebooks <strong>can be shared</strong> with recipients also on Databricks workspaces with Unity Catalog enabled.</p><p>Tables with <a href="https://docs.databricks.com/en/tables/row-and-column-filters.html">row filters and columns masks</a> and <a href="https://docs.databricks.com/en/delta/uniform.html">iceberg uniform tables</a> cannot be shared.</p><h4>Databricks to Other</h4><p>Tables stored in delta or parquet formats and table partitions can be read using open source clients or connectors. Other data assets like volumes, models etc. are not supported yet. Tables with row filters and column masks are also not supported.</p><h3>Databricks: Access Management</h3><p>Please follow the <a href="https://docs.databricks.com/en/delta-sharing/create-share.html">detailed steps here</a>, to make sure you have the right access to create delta shares and manage access to them. Contact your Unity Catalog metastore admin to get the right access.</p><p>I hope, you learned a few things along the way. Please reach out if you have any questions on this topic. Happy delta sharing!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81b72b7542ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thinking of being Sustainable?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://sidpasumarthy.medium.com/thinking-of-being-sustainable-147df3984406?source=rss-5463ac8f063e------2"><img src="https://cdn-images-1.medium.com/max/2600/1*bvJ_eXhQ6TcN7aRwtSgWcQ.jpeg" width="4110"></a></p><p class="medium-feed-snippet">Are you morally/ethically obliged to care of the environment? Maybe, maybe not. Personally i think of it as keeping my own house clean&#x2026;</p><p class="medium-feed-link"><a href="https://sidpasumarthy.medium.com/thinking-of-being-sustainable-147df3984406?source=rss-5463ac8f063e------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://sidpasumarthy.medium.com/thinking-of-being-sustainable-147df3984406?source=rss-5463ac8f063e------2</link>
            <guid isPermaLink="false">https://medium.com/p/147df3984406</guid>
            <category><![CDATA[eco-friendly]]></category>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[carbon-emissions]]></category>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[recycling]]></category>
            <dc:creator><![CDATA[Siddharth]]></dc:creator>
            <pubDate>Mon, 08 Feb 2021 05:06:01 GMT</pubDate>
            <atom:updated>2021-02-08T05:06:01.579Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Educated Illiterate]]></title>
            <link>https://sidpasumarthy.medium.com/the-educated-illiterate-947f01d73f7d?source=rss-5463ac8f063e------2</link>
            <guid isPermaLink="false">https://medium.com/p/947f01d73f7d</guid>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[travel]]></category>
            <dc:creator><![CDATA[Siddharth]]></dc:creator>
            <pubDate>Fri, 19 Feb 2016 16:25:31 GMT</pubDate>
            <atom:updated>2016-02-19T16:31:37.402Z</atom:updated>
            <content:encoded><![CDATA[<p>Mark Twain had once quoted, “Education is the path from cocky ignorance to miserable uncertainty”. We live in a world which is full of activity, cut-throat competition and uncertainty. Often the horizon is blurry, and busy in the rat race we forget the importance of a thing as beautiful and as serene as life.</p><p>I come from a middle-class family in India which gives me the advantage of taking a peek into lives of many people during traveling and I consider myself very lucky for that.</p><p>I have a habit of traveling in sleeper class train (coaches without air-conditioning) with the average Indian population who cannot afford the luxuries of a costly commute. Every time I travel, I am always excited about meeting new people and listening to their side of life. Today I am going to share one such story which made me a little better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dYflbOU9x4TlH2QhKwqJgg.jpeg" /><figcaption><a href="https://i.ytimg.com/vi/4qSwVZYXToA/maxresdefault.jpg">Indian Railways - https://i.ytimg.com/vi/4qSwVZYXToA/maxresdefault.jpg</a></figcaption></figure><p>It was 10:30 in the morning. It was summer, the heat was scorching and I boarded the train amongst a lot of activity. On a first glance the people around looked amicable and I was happy to find that I was sharing my side berth with a person roughly my own age (23 now). His features were rugged, skin tanned and there was a hint of a self-satisfied smile on his face. His clothes were old but clean. I could somewhat predict that he was on his way home after a yearlong stint of hard work in the city. As to me, I was wearing cargo pants and a loose t-shirt, clearly the odd one out in the vicinity. A broad smile from me was enough to bring him in my good books. He helped me fit in my luggage under our berths voluntarily and we finally settled down.</p><p>I am going to skip the part where we both introduced ourselves, and after some time of awkward silence I couldn’t help to resist my urges to know him more. I’ve often noticed a beautiful trait among villagers that they are always self content and carry a small smile around.</p><p>It’s a long journey to my city and we began talking. He had come to Hyderabad (a metropolitan city in southern India) 9 years ago, at the age of 14 and hails from a small village in West Bengal. It was 3 years since he had visited his family. A series of unfortunate events had brought him to this city far far away. His mother had passed away during his childhood and his father was suffering from some disease. Due to lack of medical attention, and paucity of funds, he was now bedridden. It was a family of 4 brothers and this guy was the second eldest. Some contractor had got him a job in the timber industry and he finally reached Hyderabad. He was a small boy at that time and it was hard to understand this new culture.With just clothes on his body and will to do work he started his career at such a small age. In the meager salary of Rs. 2000 a month (roughly $30) he had to manage his living and send home some money. Time passed by and he got used to this daily routine.</p><p>During all this time, his emotions went like an ECG graph with some peaks of excitement and many troughs of bad memories. He told that he was lucky to have a master who was very kind and appreciated loyalty. The woes he had experienced as a child made him strong and ready for all the challenges. With time his father recovered and started his own timber business in the village. Time heals everything. His eldest brother got married and had a daughter. This guy’s face was beaming when he told that he is an uncle now and could not wait to see his niece.</p><p>In a rush of excitement he took out his bag which was there in his hand all the time and took out the most beautiful thing I had ever seen. It was a small golden ring for his niece. He had saved up all his extra money only to buy this. My throat was choked with emotion. I still get goosebumps writing about this. It is one of the cultures of giving away things without expectations which makes India special. These things can’t be taught to a person in school or college, it flows in the blood. He was going to visit her finally.</p><p>He asked me if I was still studying and was determined that his kids would too one day. While I was listening to all this, the train stopped at a station. He took out some money to buy a pet cold-drink bottle and ended up buying two glasses of tea, just because he wanted to share with me. That is the tradition in India I am proud of. It was my turn to stop him from paying and get it myself.</p><p>Finally we departed. I have no inkling about his whereabouts now but the experience taught me many things. Appreciating life is the least we can do.</p><blockquote><strong><em>Of what use is good education when we are illiterates in understanding it’s essence.</em></strong></blockquote><p>This is the first time I am posting on my blog. Comments are welcome :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=947f01d73f7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>