<?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 Sanjeeb Mohapatra on Medium]]></title>
        <description><![CDATA[Stories by Sanjeeb Mohapatra on Medium]]></description>
        <link>https://medium.com/@sanjeebiitg?source=rss-2293b0945f1e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oGEvVWYzzcOE4NaMBnEYZQ.jpeg</url>
            <title>Stories by Sanjeeb Mohapatra on Medium</title>
            <link>https://medium.com/@sanjeebiitg?source=rss-2293b0945f1e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 10 Nov 2026 05:51:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanjeebiitg/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[Fundmentals — Characteristics of an AI Agent]]></title>
            <link>https://sanjeebiitg.medium.com/fundmentals-characteristics-of-an-ai-agent-5d556dfc0f35?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d556dfc0f35</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 11:52:25 GMT</pubDate>
            <atom:updated>2026-10-10T11:52:25.291Z</atom:updated>
            <content:encoded><![CDATA[<p>Every organisation wants to unlock more value from data through AI, and many are investing heavily in agentic AI applications. Before building these solutions, however, it is essential to understand what makes an agentic application different from a conventional AI chatbot.</p><p>This blog covers the fundamental characteristics of agentic AI in simple terms.</p><p>The simplest way to picture an AI agent is as a digital teammate. An end user provides a prompt or desired outcome. The agent gathers relevant information, interprets the goal, creates a plan, uses different tools where needed, and verifies results through human review points before delivering the required outcome.</p><p>The main charactertsics of Agentic AI are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0JEzmGZx0Bq78LZPAK8aGw.png" /></figure><p>Keep learning.. Keep growing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d556dfc0f35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Multi-Cloud, Multi-Region Databricks Platform]]></title>
            <link>https://sanjeebiitg.medium.com/building-a-multi-cloud-multi-region-databricks-platform-968825aff080?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/968825aff080</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[databricks-basics]]></category>
            <category><![CDATA[multi-cloud]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 05:20:00 GMT</pubDate>
            <atom:updated>2026-09-26T05:20:00.011Z</atom:updated>
            <content:encoded><![CDATA[<p>As organisations expand globally, a single Databricks workspace in one cloud or one region may not be enough. Data residency requirements, disaster recovery needs, local performance, and cloud strategy often require a platform that works across <strong>AWS, Azure, and multiple regions</strong>.</p><p>The diagram shows a simple approach: centralise standards and operations, but keep data processing and storage local to each cloud and region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DFYulPT4YfeCitw23g_iVw.png" /></figure><h4>1. Common services ( At Top):</h4><p>The top layer contains services shared across all Databricks environments.</p><p><strong>Central CI/CD platform</strong></p><blockquote>A central DevOps platform manages how code, notebooks, workflows, and infrastructure are deployed. Instead of manually creating jobs in every Databricks workspace, teams use automated pipelines. The same code can be tested and deployed to AWS or Azure with environment-specific configuration. This improves consistency and reduces manual errors.</blockquote><p><strong>Central Identity Provider</strong></p><p>A central Identity Provider manages user access through services such as</p><ol><li>Single Sign-On (SSO)</li><li>SCIM user and group provisioning</li><li>Enterprise security groups</li></ol><blockquote>Users should log in with the same corporate identity regardless of whether they use Databricks on AWS or Azure. Access should be granted through groups, not individual user permissions.</blockquote><p><strong>Common observability</strong></p><p>A common observability tool, such as Datadog, can collect operational information from all platforms. It helps teams monitor:</p><ol><li>Job failures</li><li>Pipeline delays</li><li>Cluster usage</li><li>Platform health</li><li>Cost and resource consumption</li><li>Security and audit events</li></ol><p>This creates one operational view across clouds and regions.</p><h4>2. AWS and Azure operate as independent platforms</h4><p>The lower part of the diagram shows separate Databricks deployments in AWS and Azure.</p><blockquote>On AWS, each regional Databricks workspace uses Amazon S3 for storage.</blockquote><blockquote>On Azure, each regional Databricks workspace uses Azure Data Lake Storage Gen2 (ADLS Gen2).</blockquote><blockquote>Each workspace should have its own:Databricks workspaceUnity Catalog and governance setupCloud storage</blockquote><p>Each workspace should have its own:</p><ol><li>Databricks workspace</li><li>Unity Catalog and governance setup</li><li>Cloud storage</li><li>Network configuration</li><li>IAM roles or managed identities</li><li>Encryption keys</li><li>Compute policies</li><li>Monitoring and cost controls</li></ol><p>This separation is important because a Databricks workspace is regional. Simply using the same AWS account or Azure subscription does not make the platform multi-region automatically.</p><p><strong>Conclusion</strong></p><p>A successful multi-cloud, multi-region Databricks design is not about creating one giant global platform. It is about creating independent regional data platforms with:</p><ol><li>Common identity</li><li>Common deployment standards</li><li>Common monitoring</li><li>Consistent governance</li><li>Local storage and processing</li><li>Controlled data sharing</li></ol><p><em>In short: centralise the standards, decentralise the execution.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=968825aff080" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Fundamentals — What is Context Layer ?]]></title>
            <link>https://sanjeebiitg.medium.com/ai-fundamentals-what-is-context-layer-a43162d534cf?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a43162d534cf</guid>
            <category><![CDATA[context-layer]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 13:19:14 GMT</pubDate>
            <atom:updated>2026-07-15T13:19:14.545Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*7sS3Uecl-9hdWYBGy-0PcQ.png" /></figure><p>AI Fundamentals — What is Context Layer ?</p><p>Many business organizations fail in AI implementation not because of a lack of technology or data, but because of missing or fragmented context. Business context is often scattered across systems, documents, processes, and teams. As a result, AI systems cannot easily understand what the data means, how it should be used, or which business rules apply. When that context is missing, AI tries to fill the gaps through inference, which can lead to incorrect or unreliable outcomes and not aligned with business context.</p><p>With the evolution of AI agents, the problem is now more complex. Agents often try to improve answers through loops, reasoning steps, and iterative processing. While this can increase accuracy in some cases, it can also make responses slower, more expensive, and still incorrect if the underlying context is incomplete.</p><p>To generate meaningful outcomes from data through AI intelligence, organizations need a centralized context layer. This layer helps AI systems understand data in the right business, technical, governance, and operational context. It enables organizations not only to implement AI and agentic solutions more effectively, but also to solve real business challenges and create measurable business value.</p><p>The fundamental question, what is a <strong><em>context layer</em></strong>?</p><p>A context layer in a data platform is the layer that transforms raw data into something understandable, discoverable, trustworthy, and usable by people, applications, analytics platforms, and AI systems. It sits above the raw storage and processing layers and adds the business, technical, governance, and operational meaning required to use data effectively.</p><p>For an enterprise data ecosystem, data context refers to the information that helps people, applications, analytics platforms, and AI systems understand what data means, where it comes from, how it should be used, and whether it can be trusted. It typically includes:</p><blockquote>· Metadata — Technical details about the data, such as data type, format, schema, structure, and source system.</blockquote><blockquote>· Business definition — The business meaning of the data, including definitions, rules, and interpretation.</blockquote><blockquote>· Lineage — The end-to-end flow of data from source to target, including transformations, dependencies, and consumption points.</blockquote><blockquote>· Data ownership — Information about accountable owners, such as business owners, data owners, data stewards, and technical custodians.</blockquote><blockquote>· Data quality — Details about the quality of the data, including quality rules, metrics, completeness, validity, accuracy, and null versus non-null percentages.</blockquote><blockquote>· Relationships — How the data relates to other data entities, domains, systems, or business concepts.</blockquote><blockquote>· Freshness — How frequently the data is updated, refreshed, or synchronized, and when it was last available.</blockquote><blockquote>· Granularity — The level of detail represented by the data, including what each row or record represents from a business perspective.</blockquote><blockquote>· Classification — The sensitivity and regulatory classification of the data, such as public, internal, confidential, personal, or restricted.</blockquote><blockquote>· Usage — Guidance on how the data can be used, including access restrictions, permitted use cases, departmental limitations, and compliance constraints.</blockquote><p>The high-level flow for context layer is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*JhBROCJnBdgUM6lrrnqxCQ.png" /></figure><p>In practice, the context layer helps answer critical questions such as:</p><blockquote>· What does this field mean?</blockquote><blockquote>· Can I trust this dataset?</blockquote><blockquote>· Who owns it?</blockquote><blockquote>· How fresh is the data?</blockquote><blockquote>· Which reports, dashboards, models, or applications use it?</blockquote><blockquote>· Which other datasets or entities can it be joined with?</blockquote><blockquote>· Am I allowed to use it for this purpose?</blockquote><blockquote>· Which metric definition should I use?</blockquote><p>For AI and self-service analytics, the context layer is especially important. It prevents users, models, and AI agents from guessing meanings, applying incorrect joins, using inconsistent metric definitions, or exposing restricted data. In a mature data platform, the context layer becomes the shared understanding between data producers, data consumers, governance teams, analytics platforms, and intelligent applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a43162d534cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databricks: Part-15: All About Lakeflow Connect !!]]></title>
            <link>https://sanjeebiitg.medium.com/databricks-part-15-all-about-lakeflow-connect-691c89669242?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/691c89669242</guid>
            <category><![CDATA[databricks-lakeflow]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-ingestion]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 13:37:58 GMT</pubDate>
            <atom:updated>2026-06-01T13:37:58.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*n7EIw_3INRDySIH3nAqUeg.png" /></figure><p>Building any enterprise data platform starts with a foundational step — bringing data from various source systems into a centralized platform. This process is known as <strong>Data Ingestion</strong>. Today, the data engineering landscape offers a wide range of ingestion tools which are no-code, connector-based, and purpose-built to replicate or move source system data into a target platform with minimal friction.</p><p>In this blog, we explore <strong>Lakeflow Connect</strong> — Databricks’ fully managed, no-code/low-code data ingestion solution designed to simplify and accelerate how teams bring data into the Databricks Data Intelligence Platform.</p><p>The key features for LakeFlow connect is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*9sOwvXuVxfzML9CqFcHnNQ.png" /></figure><p>The following diagram provides high level flow how LakeFlow connect work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ozj5mblXsAZzUyCMBRjsBA.png" /></figure><p>To make this concrete, let’s walk through a live demo using an <strong>AWS RDS PostgreSQL database</strong> as the source system.</p><p><strong>Before you begin</strong>, make sure the following are in place:</p><ol><li><strong>AWS RDS PostgreSQL instance</strong> — a running Postgres database on AWS RDS.</li><li><strong>Network connectivity</strong> — Databricks must be able to reach the Postgres instance. For this demo, all inbound connections on <strong>port 5432</strong> have been allowed.</li><li><strong>Database user</strong> — a DB user provisioned with the necessary privileges to read from the source.</li></ol><p><strong>Note:</strong> Setting up the AWS RDS PostgreSQL instance itself is outside the scope of this blog. We assume it is already available.</p><p><strong>Step -1 : Configure AWS Postgres Database for configuration.</strong></p><p>1. Enable the logical replication on RDS database, To do the same, update the value of<em> rds.logical_replication = 1</em> in parameter groups.</p><p>Note — You can not update the default parameter group, create a new parameter group of the same database type, update the logical_replication parameter and attach the new parameter group to the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*UbCaS1BmJ1SxF5SXcltLlw.png" /></figure><p>2. Create a dedicate user for the lakeflow connect</p><p>a. Run the below commands in Postgres ( connect postgres database via any client tool and execute the below command)</p><blockquote>· <em>create user databricks_lakeflow with password ‘xxxx’</em></blockquote><blockquote>· <em>grant connect on database postgres to databricks_lakeflow</em></blockquote><blockquote>· <em>grant usage on schema public to databricks_lakeflow</em></blockquote><blockquote>· <em>grant select on all tables in schema public to databricks_lakeflow</em></blockquote><blockquote>· <em>grant rds_replication to databricks_lakeflow</em></blockquote><p><strong>Note:</strong></p><p>If you are not using AWS RDS database, you need to give the replication privilege to the user — ALTER USER &lt;&lt;user&gt;&gt; WITH REPLICATION;</p><p>3. Create a table, in this case we created a customer table and insert sample 100 rows.</p><pre>        CREATE TABLE public.customer (<br>    id BIGSERIAL PRIMARY KEY,<br>    name VARCHAR(100) NOT NULL,<br>    email_id VARCHAR(255) UNIQUE NOT NULL,<br>    telephone VARCHAR(20),<br>    enroll_date DATE NOT NULL<br>);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*O1bzr0aZNLbMTi6BUwwFVw.png" /></figure><p><strong>Give the permission to the table as well ( We faced select issue) so explicitly provide the access.</strong></p><p>Grant select on table public.customer to darabricks_lakeflow.</p><p>4. For each table, to replicate run, run the below command in postgres. For our customer table, the command is:</p><p>ALTER TABLE public.customer REPLICA IDENTITY DEFAULT;</p><p>This tells PostgreSQL what columns to include in the WAL (Write-Ahead Log) for CDC. <em>DEFAULT uses the primary key.</em> Use FULL if the table has no primary key.</p><p>5. Create a Publication and Replication Slot</p><p>CREATE PUBLICATION databricks_pub FOR ALL TABLES;</p><p>If you want to run for specific table, you can put specific table details</p><p>CREATE PUBLICATION databricks_pub FOR TABLE public.customer;</p><p>SELECT pg_create_logical_replication_slot(‘databricks_slot’, ‘pgoutput’);</p><p><strong>Publication</strong> = what data to replicate. <strong>Replication Slot</strong> = the pointer that tracks how far Databricks has read the change log.</p><p><strong>Step -2 : Set up Lakeflow connect in Databricks</strong></p><p>1. Go to Databricks UI -&gt; Data Engineer ( Left bar) -&gt; Click on Data Ingestion.</p><p>2. Search for Postgres -&gt; select postgres -&gt; click on create connection</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*hqLiajUobja0Q1d3KhjGCQ.png" /></figure><p>3. Give the connection name, give the postgres user name and password and host details and click on create connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*ZnluM_j82rT6Oivfuqgwgg.png" /></figure><p>4. Select the connection and click next, give the pipeline name and select catalog and schema name to whom data will be ingested and click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*xA-zWPiVtRweIXNnDYUAXg.png" /></figure><p>5. Search for postgres and it will list the source details. Select the schema and table name, then select the cursor column ( on which incremental data can be fetched) and the primary key and make historical tracking ON and then click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*1aP4w5mmfhMrbhvW5uAsEg.png" /></figure><p>6. Select the destination and then finally click save and run the pipeline. User can adjust the schedule of the pipeline as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*IlyLX2ZSg8fK58FXE6etgA.png" /></figure><p>7. Go to Jobs and Pipeline ( left menu) and look for the job created above. It will start running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*qBe5XIyijqXy-h0aihk__Q.png" /></figure><p>8. To validate the data, run the sample query in SQL editor</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*xcR71VNTeH7z2ZN1Eal3SQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*WpQbtdqB6sMchdKA9vCrCQ.png" /></figure><p>9. To run incremental, insert sample data to the table and wait for the job to run in defined schedule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*EUr2q3MGmEiYFXUJ5Nq8rA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*4WGjKTkRv-guGYDPgK6uvA.png" /></figure><p>This gives a complete e2e details from zero to a live CDC data ingestion pipeline using Lakeflow connect.</p><p>Keep learning, keep growing and keep sharing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=691c89669242" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Fundamentals — Chunking Strategies in RAG]]></title>
            <link>https://sanjeebiitg.medium.com/ai-fundamentals-chunking-strategies-in-rag-e4de1b84d3c0?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4de1b84d3c0</guid>
            <category><![CDATA[agentic-rag]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Fri, 29 May 2026 10:25:00 GMT</pubDate>
            <atom:updated>2026-05-29T10:25:00.718Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*lPzwL1TNk7E5IhnjtyP50w.png" /></figure><p>At its core, an LLM (Large Language Model) takes an input and produces an output — but its answers come strictly from what it learned during training, not from your specific domain or private data.</p><p>RAG (Retrieval-Augmented Generation) bridges that gap by enabling the model to answer using up-to-date, domain-specific, and private information. A RAG-powered AI application searches a knowledge base first, pulls the most relevant information, and combines it with the user’s prompt to deliver a precise and contextually accurate response. In simple terms:</p><p>Without RAG — the AI returns a generic answer that may have no relevance to your context</p><p>With RAG — the AI searches your knowledge base, finds the best match, and feeds that to the LLM for a focused, accurate output</p><p>The three core steps of RAG are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*pSQnmEQ9YIGKzdLBzQEF9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Wl2hArFOl-lJalU4DMzaXg.png" /></figure><p>In this blog, we focus on chunking — one of the most critical components of any RAG application. Chunking is the process of breaking large text into smaller, meaningful pieces so an AI application can process and retrieve them efficiently.</p><p>We will walk through the core chunking strategies conceptually, and the next blog will cover hands-on implementation. To get the best results from a RAG pipeline, choosing the right chunking strategy matters. Several approaches are available, each suited to different document types and use cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*RcetqZNqB0J1RA7lVq1azA.png" /></figure><p>The below table provides the comparison matrix for different Chunking Strategies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*DTT5kxATItKGCc5dB8czyA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4de1b84d3c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databricks: Part-14: Time Travel & Vacuum !!]]></title>
            <link>https://sanjeebiitg.medium.com/databricks-part-14-time-travel-vacuum-7a41da7bd6ca?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a41da7bd6ca</guid>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[lakehouse-architecture]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-lake]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Sun, 28 Dec 2025 04:18:19 GMT</pubDate>
            <atom:updated>2025-12-28T04:18:19.598Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*so38t0ySdDveGkGIUxRRSw.png" /></figure><h3>Databricks: Part-14: Time Travel &amp; Vacuum !!</h3><p>In the world of Data Lakehouse architecture, understanding Time Travel and Vacuum are two critical concepts. This blog post will take a deep dive into these functionalities, explaining their features, providing examples, and outlining best practices w.r.t Databricks Delta Tables.</p><p><strong>What is Time Travel?</strong></p><p>Time Travel in Delta Lake provides the ability to query previous versions of the Delta tables. This is achieved by leveraging the immutable snapshots and transactional logs that Delta Lake maintains.</p><p><strong>Key Features of Time Travel:</strong></p><ol><li><strong>Data Accessibility:</strong> As long as the transactional log and the underlying data files exist, user can access any past version of your data.</li><li><strong>Powerful Use Cases:</strong> Time Travel is invaluable for:</li></ol><ul><li><strong>Auditing:</strong> Trace back changes to your data over time for compliance and analysis.</li><li><strong>Rollback:</strong> Easily revert to a previous good state in case of data corruption or erroneous updates.</li><li><strong>Disaster Recovery:</strong> A lifesaver in scenarios like accidental table drops or mass deletions, allowing you to restore data effortlessly.</li></ul><ol><li><strong>Default Retention:</strong> By default, Delta Lake retains transaction logs and data files for 30 days. This means you can “time travel” back up to a month into your table’s history.</li><li><strong>Configurable Retention:</strong> This default retention period is not rigid. You can easily modify it using the delta.logRetentionDuration TBLPROPERTIES. For example, user might increase it for highly sensitive data or decrease it for less critical tables to save storage.</li></ol><p><strong>Understanding Vacuum</strong></p><p>While Time Travel keeps historical data, VACUUM serves the opposite but equally important purpose: cleaning up old, unreferenced data files. Its primary goal is to free up storage space by removing data files that are no longer part of any active snapshot of your Delta table.</p><p><strong>Key Features of Vacuum:</strong></p><ol><li><strong>Default Deletion Threshold:</strong> By default, VACUUM targets files older than 7 days for deletion. This period ensures that files still potentially referenced by short-term time travel windows or concurrent queries are not prematurely removed.</li><li><strong>Manual/Scheduled Execution:</strong> VACUUM is <strong>not</strong> an automatic process. It needs to be executed manually or scheduled as a regular job to effectively manage storage. This gives you control over when and how frequently cleanup occurs.</li><li><strong>Configurable Retention:</strong> Similar to Time Travel, the retention period for VACUUM can be adjusted. You can modify this via the delta.deletedFileRetentionDuration TBLPROPERTIES, allowing you to fine-tune how long old files are kept before being eligible for deletion.</li></ol><p><strong>Example: Time Travel and Vacuum in Action</strong></p><p>Let’s walk through an example to illustrate how Time Travel and Vacuum work with a Databricks Delta table.</p><p><strong>Step 1: Create a Delta Table and Insert Data</strong></p><p>First, we’ll create a simple employee table and populate it with some sample records.</p><p>SQL</p><p>CREATE OR REPLACE TABLE employee (</p><p>id INT,</p><p>name STRING</p><p>);</p><p>INSERT INTO employee VALUES</p><p>(1,’sanjeeb1&#39;),</p><p>(2,’sanjeeb2&#39;),</p><p>(3,’sanjeeb3&#39;),</p><p>(4,’sanjeeb4&#39;),</p><p>(5,’sanjeeb5&#39;);</p><p>SELECT * FROM employee;</p><p><strong>Step 2: Verify and Update Default Retention Properties</strong></p><p>Now, let’s check the default Time Travel and Vacuum settings for our new table and then modify them.</p><p>SQL</p><p>DESCRIBE DETAIL employee; — Provides detailed metadata including retention properties</p><p>SHOW TBLPROPERTIES employee; — Shows specific table properties</p><p>— Let’s update the time travel log retention to 90 days and deleted file retention for vacuum to 30 days</p><p>ALTER TABLE employee SET TBLPROPERTIES (</p><p>‘delta.logRetentionDuration’ = ’90 days’,</p><p>‘delta.deletedFileRetentionDuration’ = ’30 days’</p><p>);</p><p><strong>Step 3: Perform Data Modifications and Explore Time Travel</strong></p><p>We’ll perform some DELETE and UPDATE operations to create different versions of our table, then use Time Travel to query past states.</p><p>SQL</p><p>— Create a new version by deleting records</p><p>DELETE FROM employee WHERE id &gt; 4;</p><p>— Create another version by updating a record</p><p>UPDATE employee SET name=’sanjeeb_update’ WHERE id = 3;</p><p>— View the current state of the table</p><p>SELECT * FROM employee;</p><p>— To see all versions (snapshots) of the table</p><p>DESCRIBE HISTORY employee;</p><p>— Time travel by version number (e.g., version 1)</p><p>SELECT * FROM employee VERSION AS OF 1;</p><p>— Time travel using the ‘@v’ syntax</p><p>SELECT * FROM employee@v1;</p><p>— Time travel by timestamp (replace with an actual timestamp from your history)</p><p>— SELECT * FROM employee TIMESTAMP AS OF ‘2025–12–27 10:00:00.000’;</p><p><strong>Step 4: Using Vacuum to Clean Up</strong></p><p>Finally, we’ll demonstrate how to use VACUUM. Remember, VACUUM will only remove files that are older than the delta.deletedFileRetentionDuration (which we set to 30 days) and are no longer referenced by active snapshots. Since we just created the table and performed recent operations, there might not be many files eligible for deletion immediately.</p><p>SQL</p><p>— 1. Always do a dry run first to see which files would be deleted</p><p>VACUUM employee DRY RUN;</p><p>— 2. To actually run the vacuum and delete files</p><p>VACUUM employee;</p><p>— Note: Since we’ve just created the table and changed retention,</p><p>— it’s likely no files will be deleted by VACUUM immediately,</p><p>— unless enough time has passed for files to exceed the retention period.</p><p><strong>Best Practices for Time Travel and Vacuum</strong></p><p>To effectively manage your Delta Lake tables, consider these best practices:</p><ol><li><strong>Always execute DRY RUN first before running actual VACUUM.</strong> This allows you to preview the files that would be deleted without actually removing them, preventing accidental data loss.</li><li><strong>Always ensure Time Travel parameter (delta.logRetentionDuration) is greater than the Vacuum parameter (delta.deletedFileRetentionDuration).</strong> If your VACUUM retention is shorter than your Time Travel retention, VACUUM might delete data files that Time Travel still expects to find, potentially breaking your ability to query older versions. A good rule of thumb is delta.logRetentionDuration &gt;= delta.deletedFileRetentionDuration.</li><li><strong>Do not set retention values too low.</strong> Setting delta.logRetentionDuration or delta.deletedFileRetentionDuration to very low values can have adverse effects. A low logRetentionDuration might limit your ability to recover from disasters or audit changes. A low deletedFileRetentionDuration could potentially lead to VACUUM deleting files that concurrent long-running queries might still need, leading to query failures.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a41da7bd6ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ML Fundamentals- Part 01 — ML Life Cycle]]></title>
            <link>https://sanjeebiitg.medium.com/ml-fundamentals-part-01-ml-life-cycle-49b2b8f262d2?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/49b2b8f262d2</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Sun, 21 Dec 2025 11:57:22 GMT</pubDate>
            <atom:updated>2025-12-21T11:57:22.600Z</atom:updated>
            <content:encoded><![CDATA[<h3>ML Fundamentals- Part 01 — ML Life Cycle</h3><p><em>ML life cycle is the step by step process which outlines understanding the business problem statement to developing, deploying and maintaining ML models</em></p><p>In this blog, I presented ML life cycle in a single page. This will help everyone who wants ML Life cycle fundamentals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JNnAIVfjf1yxDxu961tkNg.png" /></figure><p>Keep Learning.. Keep Growing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49b2b8f262d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databricks: Part-11: Fundamentals — All About Databricks Genie!!]]></title>
            <link>https://sanjeebiitg.medium.com/databricks-part-11-fundamentals-all-about-databricks-genie-7f7352e55162?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f7352e55162</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[databricks-basics]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Sat, 27 Sep 2025 04:01:18 GMT</pubDate>
            <atom:updated>2025-10-19T03:40:31.856Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*wV5pPvHf47edIYkGMvT9FA.png" /></figure><h3><strong>Databricks: Part-13: Fundamentals — All About Databricks Genie!!</strong></h3><p>Databricks Genie provides a platform to ask questions about your data in natural language. This is designed to enable the easy access of data to end business users to analyze the data without writing complex SQL code. This is a self-analytics platform for data engineer to business users.</p><p><strong>Key Capabilities of Genie</strong></p><p>1. Natural language to SQL — Ask questions in plain and simple English</p><p>2. Automatic SQL generation — Converts natural language to SQL code</p><p>3. Context Knowledge — user can give the context to Genie and it also understands the follow up questions and maintain context history for better response.</p><p>4. Schema Understanding — From Unity catalog, data structure, Genie understand the data structure. for better refinement, user can provide the more instructions and description about the data.</p><p>5. Data Profiling — Genie provide the details on data quality insights by automatic profiling the data.</p><p>6. Intelligent Data Relation discovery — Genie identifies relationship between tables which enable to wrote complex query which involved join as well.</p><p>7. Auto generated Charts — Depending upon the user prompt, Genie can create charts which can be editable and added to Dashboard as well.</p><p>8. Row Level Security — Genie support access control set in unity catalog.</p><p>Let’s do a demo. This demo is created using Databricks free tier.</p><p><strong>Step 1: Create a Genie workspace</strong></p><ol><li>Login to Databricks -&gt; Click on Genie -&gt; Click on New to create a new Genie workspace -&gt; select your data set ( tables) -&gt; click create</li></ol><p>2. Give a suitable name of Genie space, here we provided the name as demo_genie</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*aKHjYs4JL4D9uAtgzvC0Pw.png" /></figure><p>Step -2: Explore Sample questions</p><ol><li>Genie provided a sample questionnaires for the users so that they can understand the data. In this case, users can select any sample questions and see the result.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Jel5DPg7j1SNGoLQ4CExkw.png" /></figure><p>Step -3: Additional configurations for Genie</p><p>1. Add Data — User can add more data sets to Genie space, by select the data -&gt; Add data -&gt; select the data set -&gt; confirm. This enable user to ask complex question which involve joins.</p><p>2. Instructions — To provide more context to Genie, users can add more context to Genie space by select instruction -&gt; provide the context details. User can provide join details and sample query for Genie as well and click Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*gN0orZ4yzsPT4eY9rnjOzw.png" /></figure><p>Step -3: Provide sample prompt and verify the result</p><p>Once the details have been configured, users can ask any question in natural language, genie will convert the natural language to SQL and run the sql and provide the details to users. Users can also verify the SQL and if they want to modify it, they can do it.</p><p>Here we have asked a simple question “Provide me the total number of customers”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*C6tCYz8IihFIOCwNQoa2Wg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*TgQrWeDJ1xANP8Q6hOmKRQ.png" /></figure><p>Let’s ask another complex question to Genie,</p><p>Question: Provide a graph which provide the total number of customer w.r.t state</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*d6l6sf-49qLK8tTISZTegA.png" /></figure><p><strong>Summary:</strong></p><p>In this blog, we have explored Databricks Genie, how to configure and use it. Users can onboard many datasets, configure joins and set more details instructions to get more value from Genie.</p><p>Keep learning, keep growing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f7352e55162" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databricks: Part-12: Call Lambda Function from Databricks !!]]></title>
            <link>https://sanjeebiitg.medium.com/databricks-part-12-call-lambda-function-from-databricks-c67370930560?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c67370930560</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[databricks-basics]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Sat, 20 Sep 2025 03:52:21 GMT</pubDate>
            <atom:updated>2025-09-20T03:52:21.193Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*9_wyd6j0a38AkCd_37pw8w.png" /></figure><h3><strong>Databricks: Part-12: Call Lambda Function from Databricks !!</strong></h3><p>For any enterprise data platform, integration with external data source or external services is required sometimes. This enable to execute some process in the external services.</p><p>In this blog we will explore step by step guide to connect external service like AWS lambda and execute a AWS lambda from Databricks notebook. The same approach can be followed for services like AWS Glue and AWS secrets manager etc.</p><p>To configure connections to external services, we need to create a securable object in Unity catalog called service credential. A service credential is a long term cloud credential which provide the access to external services.</p><p>The below steps are followed to call a lambda function from Databricks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*J_efW5_41P7ySY4pY1B3SQ.png" /></figure><p>Let’s do the demo.</p><p>Step -1: Create a IAM Role and Policy in AWS</p><p>To execute AWS lambda function from AWS, first create a IAM role and attach the require policy to that Role. This role arn will be added to service credential at Databricks side.</p><ol><li>Go to AWS management console -&gt; search IAM -&gt; click on IAM Role to create a IAM role and click create role -&gt; select the AWS Service -&gt; select Lambda and click Next</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*3tWO_Ie_35zCK1dTAdVmGA.png" /></figure><p>2. Do not select any policy, we will customer policy, give the role name (in this case we gave the name as lambda-databricks, the remaining settings are default and click create role to create it.</p><p>To create trust between Databricks and AWS, update the trust policy with below code</p><p><strong>Code: Change the role arn, and Databricks account</strong></p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: {<br>                &quot;AWS&quot;: [<br>                    &quot;arn:aws:iam::414351767826:role/unity-catalog-prod-UCMasterRole-14S5ZJVKOTYTL&quot;,<br>                    &quot;&lt;&lt;Give the arn of the role&gt;&gt;&quot;<br>                ]<br>            },<br>            &quot;Action&quot;: &quot;sts:AssumeRole&quot;,<br>            &quot;Condition&quot;: {<br>                &quot;StringEquals&quot;: {<br>                    &quot;sts:ExternalId&quot;: &quot;&lt;&lt; Give the databricks account id&gt;&gt; &quot;<br>                }<br>            }<br>        }<br>    ]<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*rGJsU6mhn2-Nr9m_Iv41qA.png" /></figure><p>3. Create a policy and attach the policy to the role.</p><p>To create a custom policy, click on policy on IAM role -&gt; click create policy -&gt; give the policy name and click Json and paste the below policy ( Note — change the role arn).</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;cloudformation:DescribeStacks&quot;,<br>                &quot;cloudformation:ListStackResources&quot;,<br>                &quot;cloudwatch:ListMetrics&quot;,<br>                &quot;cloudwatch:GetMetricData&quot;,<br>                &quot;ec2:DescribeSecurityGroups&quot;,<br>                &quot;ec2:DescribeSubnets&quot;,<br>                &quot;ec2:DescribeVpcs&quot;,<br>                &quot;kms:ListAliases&quot;,<br>                &quot;iam:GetPolicy&quot;,<br>                &quot;iam:GetPolicyVersion&quot;,<br>                &quot;iam:GetRole&quot;,<br>                &quot;iam:GetRolePolicy&quot;,<br>                &quot;iam:ListAttachedRolePolicies&quot;,<br>                &quot;iam:ListRolePolicies&quot;,<br>                &quot;iam:ListRoles&quot;,<br>                &quot;lambda:*&quot;,<br>                &quot;logs:DescribeLogGroups&quot;,<br>                &quot;states:DescribeStateMachine&quot;,<br>                &quot;states:ListStateMachines&quot;,<br>                &quot;tag:GetResources&quot;,<br>                &quot;xray:GetTraceSummaries&quot;,<br>                &quot;xray:BatchGetTraces&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;*&quot;<br>        },<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: &quot;iam:PassRole&quot;,<br>            &quot;Resource&quot;: &quot;*&quot;,<br>            &quot;Condition&quot;: {<br>                &quot;StringEquals&quot;: {<br>                    &quot;iam:PassedToService&quot;: &quot;lambda.amazonaws.com&quot;<br>                }<br>            }<br>        },<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;logs:DescribeLogStreams&quot;,<br>                &quot;logs:GetLogEvents&quot;,<br>                &quot;logs:FilterLogEvents&quot;,<br>                &quot;logs:StartLiveTail&quot;,<br>                &quot;logs:StopLiveTail&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;arn:aws:logs:*:*:log-group:/aws/lambda/*&quot;<br>        },<br>        {<br>      &quot;Action&quot;: [&quot;sts:AssumeRole&quot;],<br>      &quot;Resource&quot;: [&quot;&lt;&lt;Give the IAM role arn&gt;&gt;&quot;],<br>      &quot;Effect&quot;: &quot;Allow&quot;<br>    }<br>    ]<br>}</pre><p>Attach the policy to the role we created in the previous step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*bGcZ9QVm97PhY3OFm7vBKA.png" /></figure><p>Step -2: Set up Service credential in Databricks.</p><p>To set up a service credential in Databricks, login to Databricks (In our case we used Databricks Free Edition) -&gt; click on Catalog -&gt; click settings icon and select create external connection -&gt; Select Service credential -&gt; Give the credential name -&gt; give the role arn (from AWS) -&gt; click create</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*kFrvix1Z-dMY_roK1W904Q.png" /></figure><p>To test validate the credential, click validation configuration, if all setup is good, the Test connection will successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*jBNsoxwjxwQ_gZLVcXZ-JQ.png" /></figure><p>Step -3: Create a lambda function in AWS</p><p>To create a test lambda function, go to AWS management console -&gt; search for lambda -&gt; click create function -&gt; select Author from Scratch -&gt; give the lambda function name -&gt; select Run time python (as we will create the lambda in python) -&gt; select an execution role (here we have used a lambda execution role)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*lJeF5Zf6t_uQtOwYRbRxIw.png" /></figure><p>Run the below sample code for lambda , click on deploy to save the code, click on Test and create a test event to test the code.</p><p><strong>Code:</strong></p><pre>import json<br><br>def lambda_handler(event, context):<br>    # TODO implement<br>    print(&quot;This is my databricks lambda&quot;)<br>    return {<br>        &#39;statusCode&#39;: 200,<br>        &#39;body&#39;: json.dumps(&#39;Hello from Lambda!&#39;)<br>    }<br><br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*JKbHfXVRmsmBdZgJXWQDEg.png" /></figure><p>Step -4: Create a note book and call lambda function from Databricks</p><p>Create a note book in Databricks. To interact with AWS service, we need to install the boto3 package.</p><p>Command:</p><pre>%pip install boto3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*ezzK1-GTN-A2lQXoa4qTIQ.png" /></figure><p>Use the below code to call lambda from Databricks.</p><p>Code:</p><pre>import boto3<br>import json<br><br># --- Lambda details ---<br>lambda_function_name = &quot;test-databricks&quot;  <br>region_name = &quot;ap-south-1&quot;                   <br><br>boto3_session = boto3.Session(botocore_session=dbutils.credentials.getServiceCredentialsProvider(&#39;lambda-datrbricks&#39;), region_name=region_name)<br>lambda_client = boto3_session.client(&quot;lambda&quot;)<br><br># --- Payload to send to Lambda ---<br>payload = {<br>    &quot;key1&quot;: &quot;value1&quot;,<br>    &quot;key2&quot;: &quot;value2&quot;<br>}<br><br># --- Invoke Lambda ---<br>response = lambda_client.invoke(<br>    FunctionName=lambda_function_name,<br>    InvocationType=&quot;RequestResponse&quot;,  # &quot;RequestResponse&quot; waits for result, &quot;Event&quot; = async<br>    Payload=json.dumps(payload)<br>)<br><br># --- Parse the response ---<br>response_payload = json.loads(response[&quot;Payload&quot;].read())<br>print(&quot;Lambda response:&quot;, json.dumps(response_payload, indent=2))</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*J_ys9WwpHmNWZVE70f74jw.png" /></figure><p>The high level details of the code is available below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*hUX-x237NZDrYeFJfIiZ-w.png" /></figure><p><strong>Summary:</strong></p><p>In this blog, we walkthrough the details how aws services can be called from Databricks.</p><p>Keep learning, Keep Growing..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c67370930560" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databricks: Part-11: Fundamentals — All About Databricks Alerts!!]]></title>
            <link>https://sanjeebiitg.medium.com/databricks-part-11-fundamentals-all-about-databricks-alerts-c8ac8b0a01da?source=rss-2293b0945f1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8ac8b0a01da</guid>
            <category><![CDATA[databricks-basics]]></category>
            <category><![CDATA[awscommunitybuilder]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Sanjeeb Mohapatra]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 06:44:24 GMT</pubDate>
            <atom:updated>2025-09-15T06:44:24.562Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*AcfdNQMUDY6zry-msZDKjw.png" /></figure><h3><strong>Databricks: Part-11: Fundamentals — All About Databricks Alerts!!</strong></h3><p>Imagine you have a system that keeps an eye on your data, jobs and lets you know the moment something goes wrong. That’s exactly what Databricks Alerts do. It is a powerful tool for monitoring your Databricks environment in real-time. When there is any abnormal behavior, if it spots anything, it sends a notification as per set up. This help organization fix the issue before encounter a bigger problem.</p><p>The key features of Databricks Alert is available below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*h98VKRPF7WwKmSttVIISug.png" /></figure><p>Let us do a demo to understand how Databricks alerts work. We are using Databricks Free edition for this demo.</p><p>This demo will show you how to set up an alert to notify you whenever a job fails. First, we’ll need a table to track our job executions.</p><p><strong>Prerequisites</strong></p><p>Create a simple table that logs job executions and populate it with some sample data. This table should include a column to track errors.</p><p>Command (for creating table)</p><pre>create table job_execution_log<br>(job_id bigint,<br>job_name string,<br>start_time timestamp,<br>end_time timestamp,<br>status string,<br>error_description string)</pre><p>Note — The status column in the table contain the job status which is R -&gt; Running, S -&gt; Success and F -&gt; Failure</p><p>Setting up the Databricks Alert</p><p><strong>Step -1: Create an alert</strong></p><p>Go to Databricks Workspace -&gt; Navigate to SQL -&gt; Click on Alerts -&gt; Click on Create Alert to create an alert</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*woPpUHPnPK2iV3tOklqd-A.png" /></figure><p><strong>Step -2: Provide the details on Alert configuration</strong></p><p>To set up an alert, define the query. In this case we defined the query from last 30 Mins, if the failure job count &gt; 0, send an alert. You can test the query by click Run command.</p><p>Query:</p><pre>select count(1) as error_count<br>from dev.bronze.job_execution_log<br>where status = &#39;F&#39;<br>and end_time &gt;= current_timestamp() - INTERVAL &#39;30&#39; MINUTES</pre><p>Set the below conditions.</p><p>· Under the Condition tab, select SUM to get the total number of errors.</p><p>· Choose the column that tracks errors (e.g., `error_count`).</p><p>· Select the condition `&gt;` (greater than) and set the value to `0`. This means the alert will trigger if even one job has failed.</p><p>· Click Test condition to see if your setup works.</p><p><strong>Step -3: Schedule the Alert</strong></p><p>Under Schedule, choose how often you want the alert to check the query. The schedule uses a format called cron syntax.</p><p><strong>Step -4: Choose Notification Method</strong></p><p>In the Notification section, select the users who want to be notified when the alert is triggered.</p><p><strong>Step -5: Save the Alert</strong></p><p>Give the alert a clear name, such as `job_failure_alert`, and choose a folder to save it in. Click Create to finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*HaX5aAOYpGJ_I6GShPiIpg.png" /></figure><p><strong>Step -6: Test the alert</strong></p><p>User can manually run the alert to see if it works. If everything is set up correctly, user will receive a notification, such as an email, telling you that the alert was triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*gg2jvho3NeJy5AjwqzOFxw.png" /></figure><p>User can find all alerts in the Alerts section. To delete an alert, open it, click the three dots (`…`), and select Delete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*CC22ErcijaRC8EajpNNGbg.png" /></figure><p><strong>Summary</strong></p><p>In this blog, we have explored Databricks alert which help in monitoring and notifying different target when certain conditions meet.</p><p>keep learning keep growing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8ac8b0a01da" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>