<?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 Madhuri Duvvuri on Medium]]></title>
        <description><![CDATA[Stories by Madhuri Duvvuri on Medium]]></description>
        <link>https://medium.com/@madhuriduvvuri15?source=rss-21d681b8d9b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KxqwKzFWGjt_3CXf.jpg</url>
            <title>Stories by Madhuri Duvvuri on Medium</title>
            <link>https://medium.com/@madhuriduvvuri15?source=rss-21d681b8d9b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 30 May 2026 09:18:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@madhuriduvvuri15/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[Day 2 — Large Language Models]]></title>
            <link>https://medium.com/@madhuriduvvuri15/day-2-large-language-models-cc37c964ecb5?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc37c964ecb5</guid>
            <category><![CDATA[llm-applications]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 04:03:01 GMT</pubDate>
            <atom:updated>2025-04-23T04:04:24.014Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 2 — Large Language Models</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yA1vScpeLKxV6dd1.jpg" /></figure><p><strong>Large Language Models (LLMs)</strong> are advanced neural networks trained on massive amounts of text data to understand, generate and manipulate human language. They’re the <strong>foundation of modern Generative AI</strong> tools like ChatGPT, Claude, Copilot, and more.</p><p><em>An </em><strong><em>LLM</em></strong><em> is a deep learning model, typically based on a </em><strong><em>Transformer architecture</em></strong><em>, trained on large-scale to perform a wide range of natural language processing tasks by learning statistical patterns and contextual relationships in text.</em></p><p>Before LLMs, traditional NLP systems relied on rule-based or shallow ML approaches that:</p><ul><li>Couldn’t generalize well to complex or unseen language.</li><li>Needed task-specific data and architecture.</li><li>Required lots of manual effort and customization.</li></ul><p>LLMs revolutionized this by:</p><ul><li><strong>Being general-purpose:</strong> Same model works for summarization, question answering, translation, etc.</li><li><strong>Learning context and nuance:</strong> Understanding sarcasm, emotion, slang</li><li><strong>Reducing need for labeled data:</strong> Thanks to pretraining on large corpora.</li><li><strong>Enabling few-shot/zero-shot learning:</strong> Use a few examples or just a prompt to perform a task. (Zero-shot learning is the ability of a model, especially a Large Language Model to perform a task it has never been explicitly trained on, without seeing any labeled examples of that task during inference)</li></ul><h3>How do LLMs work?</h3><h3>1. Pretraining (unsupervised learning)</h3><ul><li>Trained on huge datasets (web pages, books, code).</li><li>Learn by predicting next words (causal) or filling in blanks (masked language modeling).</li></ul><h3>2. Fine-tuning (supervised)</h3><ul><li>Trained on specific datasets for downstream tasks like summarization or classification.</li></ul><h3>3. Inference (prediction)</h3><ul><li>You send a <strong>prompt</strong>, and the model responds by predicting tokens based on learned context.</li></ul><h3>Key terms</h3><h4>Tokenization</h4><ul><li>Converts input text into chunks (tokens).</li><li>“ChatGPT is great!” → [&quot;Chat&quot;, &quot;G&quot;, &quot;PT&quot;, &quot;is&quot;, &quot;great&quot;, &quot;!&quot;]</li><li>LLMs don’t understand characters or words, only tokens.</li></ul><h4>Embeddings</h4><ul><li>Vector representations of tokens, sentences or documents.</li><li>Capture semantic meaning — similar meanings → similar vectors.</li><li>Form the input to Transformer layers.</li></ul><h4>Vectorization</h4><ul><li>The process of converting text → numerical vectors (embeddings).</li><li>Enables similarity search, semantic search, clustering, etc.</li></ul><h4>Attention Mechanism</h4><ul><li>LLMs use <strong>self-attention</strong> to decide which parts of the input are most relevant at each step.</li><li>Example: In “The cat sat on the mat”, the model learns that “cat” and “sat” are closely related.</li></ul><h4>Prompt Engineering</h4><ul><li>Art of crafting inputs to guide LLM outputs.</li><li>Includes: system messages, instructions, examples, formatting, etc.</li></ul><h4>Pretraining vs Fine-tuning vs Instruction Tuning</h4><ul><li><strong>Pretraining:</strong> General learning on large data.</li><li><strong>Fine-tuning:</strong> Domain/task-specific training.</li><li><strong>Instruction tuning:</strong> Training the model to follow natural language instructions better.</li></ul><p>You can interact with LLMs through:</p><ul><li><strong>APIs</strong> (e.g., OpenAI, Anthropic, Google PaLM)</li><li><strong>Open-source models</strong> (e.g., Hugging Face Transformers)</li><li><strong>Cloud platforms</strong> (e.g., Azure OpenAI, Amazon Bedrock, Vertex AI)</li></ul><p>LLMs are <strong>not just language tools</strong> — they’re evolving into <strong>reasoning engines</strong>, able to process and synthesize knowledge at scale. Understanding <strong>how they work under the hood</strong> (like embeddings, attention and transformers) is crucial to use them responsibly and innovatively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc37c964ecb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 1: Introduction to Generative AI]]></title>
            <link>https://medium.com/@madhuriduvvuri15/day-1-introduction-to-generative-ai-5259fcb20861?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5259fcb20861</guid>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Tue, 22 Apr 2025 03:10:43 GMT</pubDate>
            <atom:updated>2025-04-22T12:38:01.342Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1eoNNppc-J99lftO" /></figure><h4>What is Artificial Intelligence (AI)?</h4><p>Artificial Intelligence refers to the simulation of human intelligence in machines, enabling them to perform tasks typically requiring human intelligence, such as:</p><ul><li><strong>Learning:</strong> Gaining information and adapting over time (Machine Learning).</li><li><strong>Reasoning:</strong> Logical decision-making and problem-solving.</li><li><strong>Understanding:</strong> Processing and interpreting human language (Natural Language Processing).</li><li><strong>Perceiving:</strong> Interpreting visual or sensory information (Computer Vision).</li></ul><p>Artificial Intelligence (AI) is the capability of a machine to imitate intelligent human behavior, enabling it to perform complex tasks by learning from data and reasoning logically.</p><h3>Understanding Generative AI (GenAI)</h3><p>Generative AI is a subset of artificial intelligence focused specifically on generating new, original content. It’s about creating data rather than just processing or analyzing existing data.</p><ul><li>It learns from vast amounts of data and patterns.</li><li>Uses this learning to produce new, unique outputs that resemble the original data.</li><li>Includes text, images, audio, video, code, or even entire virtual environments.</li></ul><p><strong><em>Generative AI</em></strong><em> is a branch of AI that uses statistical and probabilistic models, such as neural networks, to produce novel and original content resembling the input data it’s trained on.</em></p><p><strong>Examples of outputs:</strong></p><ul><li><strong>Text Generation:</strong> GPT-4, ChatGPT</li><li><strong>Image Generation:</strong> DALL-E, Midjourney, Stable Diffusion</li><li><strong>Audio Generation:</strong> OpenAI Whisper, Google DeepMind’s AudioLM</li><li><strong>Video Generation:</strong> Runway Gen-2</li><li><strong>Code Generation:</strong> GitHub Copilot</li></ul><h3>How is Generative AI different from Traditional AI?</h3><p>Traditional AI typically involves:</p><ul><li>Classifying data (spam vs. not spam).</li><li>Predicting outcomes based on learned patterns (weather predictions).</li><li>Recognizing patterns or objects (face recognition).</li></ul><p>In contrast, Generative AI is primarily focused on:</p><ul><li>Creating entirely new data/content.</li><li>Learning deeper patterns in datasets to reproduce realistic outputs.</li><li>Going beyond simple recognition to generation.</li></ul><h3>What are AI Agents?</h3><p>An <strong>AI Agent</strong> is a self-contained software program that:</p><ul><li>Perceives its environment (through sensors or data).</li><li>Makes decisions autonomously to achieve specific goals.</li><li>Acts upon its environment based on its decisions.</li></ul><p>An AI Agent is an autonomous entity utilizing AI algorithms, capable of perceiving, reasoning and interacting independently with its environment to achieve defined objectives or tasks.</p><p><strong>Types of AI Agents:</strong></p><ul><li><strong>Simple Reflex Agents:</strong> Respond only to immediate inputs (chatbots).</li><li><strong>Model-Based Agents:</strong> Maintain internal states to handle partially observable environments (recommendation systems).</li><li><strong>Goal-Based Agents:</strong> Decide actions based on defined goals (Autonomous Vehicles).</li><li><strong>Utility-Based Agents:</strong> Choose actions based on utility, optimizing overall performance (personalized marketing agents).</li><li><strong>Learning Agents:</strong> Adapt and improve from past experiences (Generative AI-based virtual assistants).</li></ul><h3>Types and Examples of Generative AI</h3><p>Commonly used Generative AI methods:</p><ul><li><strong>Generative Adversarial Networks (GANs):</strong> Generate images or videos (StyleGAN).</li><li><strong>Variational Autoencoders (VAEs):</strong> Image synthesis and data compression.</li><li><strong>Transformer-based Language Models:</strong> GPT-4, GPT-4o, PaLM, LLaMA.</li><li><strong>Diffusion Models:</strong> Stable Diffusion, DALL-E, Midjourney.</li></ul><h3>Practical Examples of Generative AI Applications</h3><ul><li><strong>Writing Assistants:</strong> Grammarly, ChatGPT.</li><li><strong>Graphic Design:</strong> Canva’s generative design tools.</li><li><strong>Gaming:</strong> Procedurally generated game environments (Minecraft worlds).</li><li><strong>Education:</strong> Personalized learning materials.</li><li><strong>Healthcare:</strong> Synthetic medical images/data generation for diagnostics.</li></ul><h3>Quick Summary &amp; Key Takeaways</h3><ul><li><strong>Artificial Intelligence (AI):</strong> Simulates human intelligence processes like learning, reasoning, and perception.</li><li><strong>Generative AI:</strong> Subfield of AI focused on creating original and novel content by learning from data.</li><li><strong>AI Agents:</strong> Autonomous entities that perceive, reason, and act within their environment.</li><li><strong>Generative AI vs Traditional AI:</strong> Generative AI emphasizes creative outputs rather than just classifying or predicting.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5259fcb20861" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[30 Days of AI: A Hands-on Journey into Generative AI]]></title>
            <link>https://medium.com/@madhuriduvvuri15/30-days-of-ai-a-hands-on-journey-into-generative-ai-530416df3634?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/530416df3634</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[gen-ai-review]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 16:00:25 GMT</pubDate>
            <atom:updated>2025-04-21T16:00:25.620Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ahcSqwLeJDIRs72_" /></figure><p><strong>Starting today, I’m kicking off a 30-day series dedicated to mastering Generative AI through hands-on learning!</strong></p><p>AI today is all about exciting new developments like <strong>Modal Context Protocol (MCP)</strong>, <strong>Retrieval-Augmented Generation (RAG)</strong>, <strong>Vector Databases</strong> and integrations with platforms like <strong>Firebase</strong>. I decided it’s the perfect time to dive deep into these trending concepts, learn practically by doing and share concise insights along the way.</p><p>This blog series will serve both as my personal quick-reference guide and hopefully as a valuable resource to anyone looking to enhance their understanding of <strong>Generative AI</strong>, <strong>AI Agents</strong>, <strong>Large Language Models (LLMs)</strong> and much more.</p><p>Stay tuned for daily posts filled with practical implementations, examples, and real-world applications! I’d greatly appreciate hearing your thoughts, questions or suggestions — feel free to share them in the comments section below!</p><p><strong>Let’s learn and grow together over the next 30 days!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=530416df3634" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[dbt- Data Build Tool]]></title>
            <link>https://medium.com/@madhuriduvvuri15/dbt-data-build-tool-9a082e14e603?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a082e14e603</guid>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data-build-tool]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Tue, 18 Mar 2025 23:18:41 GMT</pubDate>
            <atom:updated>2025-03-18T23:18:41.339Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern data teams deal with massive amounts of raw data, but <strong>raw data alone is not useful</strong>. It needs to be <strong>transformed, cleaned and structured</strong> before it can drive business decisions.</p><p>This is where <strong>dbt (Data Build Tool) Core</strong> comes in. dbt enables <strong>data analysts and engineers</strong> to write modular, testable and reusable SQL code for <strong>transforming raw data into meaningful insights inside a data warehouse</strong>.</p><h3>dbt?</h3><p>dbt is an <strong>open-source transformation tool</strong> that allows data teams to write <strong>SQL-based models</strong> to structure and prepare data inside a <strong>cloud data warehouse</strong> like Snowflake, BigQuery, or Redshift.</p><h3>Key Features of dbt Core:</h3><ol><li><strong>SQL-Based Transformations</strong> — Write SQL queries to clean and aggregate data.</li><li><strong>Version Control with Git</strong> — Track changes and collaborate easily</li><li><strong>Modular and Reusable Code</strong> — Define SQL models that build on each other.</li><li><strong>Automated Testing</strong> — Catch data quality issues early.</li><li><strong>Dependency Management</strong> — Use dbt’s <strong>DAG (Directed Acyclic Graph)</strong> to track model relationships.</li><li><strong>Documentation and Lineage</strong> — Generate <strong>interactive</strong> documentation with data flow graphs.</li></ol><h4>Why dbt?</h4><p>Traditional data transformations were done using:</p><ol><li><strong>BI tools</strong> (like Tableau) — Transformations were slow and repeated every time a dashboard loaded.</li><li><strong>ETL pipelines</strong> (like Apache NiFi, Talend) — Required <strong>engineering-heavy workflows</strong> and <strong>custom Python/Spark scripts</strong>.</li></ol><h4>dbt offers a <strong>better approach</strong>:</h4><ul><li><strong>Transformations happen inside the data warehouse</strong> — Faster, scalable, cost-efficient.</li><li><strong>SQL is the main language</strong> — No need to learn Spark/Python for transformations.</li><li><strong>Version-controlled, testable, and modular</strong> — Ensures consistency and reliability.</li></ul><h4>Jinja and dbt: Adding Flexibility to SQL</h4><p>dbt uses <strong>Jinja</strong>, a templating engine that allows <strong>dynamic SQL generation</strong>.</p><p>Why Use Jinja in dbt?</p><ol><li><strong>Reusability</strong> — Write dynamic SQL instead of duplicating queries.</li><li><strong>Parameterization</strong> — Create conditional logic inside SQL models.</li><li><strong>Automation</strong> — Generate complex queries automatically.</li></ol><p>Jinja reduces duplication, automates query generation and makes dbt models more efficient.</p><h4>dbt is ideal when:</h4><ol><li>You work with a cloud data warehouse (Snowflake, BigQuery, Redshift).</li><li>You need repeatable, tested, and version-controlled SQL transformations.</li><li>Your team wants modular, reusable SQL workflows.</li><li>You want automated documentation and data lineage tracking.</li></ol><h4>When dbt Might Not Be a Good Fit</h4><ol><li>You work with <strong>real-time streaming data</strong> (dbt is batch-based).</li><li>Your team does <strong>not use SQL</strong> (dbt is SQL-first, with Jinja templating).</li><li>You need <strong>complex workflow orchestration</strong> (use dbt with Apache Airflow for this).</li></ol><p>dbt Core brings <strong>software engineering best practices</strong> to data analytics by enabling <strong>version-controlled, testable and modular</strong> SQL transformations.</p><p><strong>TL;DR:</strong></p><ul><li>dbt transforms raw data inside the data warehouse.</li><li>Uses SQL + Jinja for dynamic and reusable transformations.</li><li>Automates testing, documentation and dependency tracking.</li><li>Works best for batch processing on cloud data warehouses.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a082e14e603" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Parameters, Triggers, Variables and Activities in Azure Data Factory]]></title>
            <link>https://medium.com/@madhuriduvvuri15/parameters-triggers-variables-and-activities-in-azure-data-factory-77a5d9a99c37?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/77a5d9a99c37</guid>
            <category><![CDATA[azure-data-factory]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 04:47:00 GMT</pubDate>
            <atom:updated>2025-02-24T04:47:00.065Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure Data Factory is a cloud-based ETL (Extract, Transform, Load) service used for orchestrating and automating data workflows. To make data pipelines more dynamic and reusable, ADF provides <strong>parameters, triggers, variables and activities</strong>. These elements play a crucial role in enhancing flexibility, automation and efficiency in data processing.</p><h4>1. Parameters in ADF</h4><p><strong>Parameters</strong> in ADF are used to pass values dynamically into pipelines, datasets, linked services and data flows. These are defined at different levels and help create reusable components.</p><p>Types of Parameters</p><p><strong>Pipeline Parameters</strong>: Used to pass dynamic values at runtime.</p><p><strong>Dataset Parameters</strong>: Allow datasets to be dynamically configured.</p><p><strong>Linked Service Parameters</strong>: Help in creating dynamic connections to external services.</p><h4>2. Triggers in ADF</h4><p>Triggers automate pipeline execution based on schedules or events. ADF supports three types of triggers:</p><p>Types of Triggers</p><p><strong>Schedule Trigger</strong></p><p>Executes pipelines at a pre-defined schedule.</p><p>Example: Running a pipeline <strong>every day at 6 AM</strong>.</p><p><strong>2. Tumbling Window Trigger</strong></p><p>Processes data in a <strong>fixed time-based window</strong>.</p><p>Example: Processing hourly logs by executing a pipeline every hour.</p><p><strong>3. Event-Based Trigger</strong></p><p>Responds to events like new file creation in <strong>Azure Blob Storage or ADLS</strong>.</p><p>Example: A pipeline starts when a new CSV file lands in a storage container.</p><h4>3. Variables in ADF</h4><p><strong>Variables</strong> store temporary values within a pipeline execution and help maintain <strong>state management</strong>.</p><p>Types of Variables</p><p><strong>String</strong>: Stores text values.</p><p><strong>Boolean</strong>: Holds true or false values.</p><p><strong>Array</strong>: Stores lists of values.</p><p>Using Variables in ADF</p><p>Variables can be <strong>set, appended or used in expressions</strong> to control flow.</p><p>Key Differences: Parameters vs. Variables</p><p>Feature Parameters Variables Scope Available throughout the pipeline Used within a single pipeline execution Mutability Read-only Can be modified Usage Passed dynamically to activities Stores temporary values</p><h4>4. Activities in ADF</h4><p><strong>Activities</strong> in ADF are the processing steps within a pipeline. They define the actions performed on data and can be categorized based on functionality.</p><p>Types of Activities</p><p><strong>Data Movement Activities</strong>: Copy data between sources and destinations.</p><p><strong>Data Transformation Activities</strong>: Perform data processing using services like Data Flow or Azure Functions.</p><p><strong>Control Activities</strong>: Manage the pipeline flow using loops, conditions, and execution dependencies.</p><p><strong>External Activities</strong>: Interact with external services like Databricks or stored procedures.</p><p>Commonly Used Activities</p><p><strong>Copy Activity</strong>: Transfers data between different storage locations.</p><p><strong>ForEach Activity</strong>: Iterates over a collection of values.</p><p><strong>If Condition Activity</strong>: Implements conditional logic.</p><p><strong>Wait Activity</strong>: Introduces a delay in execution.</p><h4>5. GetMetadata vs. Lookup Activity</h4><p><strong>GetMetadata</strong> and <strong>Lookup</strong> activities are used for retrieving data but serve different purposes.</p><p>The <strong>GetMetadata</strong> activity is primarily used to retrieve metadata information about a dataset, such as file names, sizes, last modified timestamps and schema details. It is useful when you need to check whether a file exists, determine its properties or inspect the structure of a table before performing further operations.</p><p>On the other hand, the <strong>Lookup</strong> activity is used to retrieve actual data from a dataset, typically by executing a query on a database or reading a specific row from structured storage.</p><p>Unlike GetMetadata, which provides dataset attributes, Lookup extracts specific values that can be used in downstream activities for decision-making or transformation.</p><p>For example, if you want to verify whether a file is available before initiating data movement, GetMetadata is the right choice. However, if you need to fetch a configuration value or reference data from a database table to use in a pipeline, Lookup would be the better option. Understanding these differences ensures that you select the appropriate activity based on the data retrieval needs of your ADF workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77a5d9a99c37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kafka Basics]]></title>
            <link>https://medium.com/@madhuriduvvuri15/kafka-basics-059ad89ef95f?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/059ad89ef95f</guid>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Tue, 14 Jan 2025 16:36:32 GMT</pubDate>
            <atom:updated>2025-01-14T16:36:53.982Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is Kafka?</h4><p>Kafka is a distributed event store, stream processing platform.</p><p><strong>Producer</strong>: An application or system that sends data (events or messages) to Kafka topics. A stock market data generator that sends stock prices in real-time.</p><p><strong>Consumer</strong>: An application or system that reads data from Kafka topics. A consumer application stores the stock price data in Amazon S3 for further processing.</p><p><strong>Brokers</strong>: A broker is a single Kafka server that stores and handles data in topics and partitions. Kafka clusters are made up of multiple brokers, which collaborate to provide a fault-tolerant system. If a broker fails, another broker with replicated data ensures continued operations.</p><p><strong>Topics</strong>: Topics are the core unit of Kafka where data is stored and organized. Think of a topic as a “category” or “bucket” to which producers send messages, and from which consumers read messages. For an e-commerce site, topics could include “order_created”, “order_shipped”, or “returned”.</p><p><strong>Partitions: </strong>Each topic can be divided into partitions. Partitions allow Kafka to distribute data across multiple servers (brokers), enabling scalability and high throughput. Within each partition, messages are stored in the order they arrive and are identified by a unique offset. Partitioning by customer ID ensures related data is grouped and accessed efficiently.</p><p><strong>Zookeeper: </strong>Zookeeper is Kafka’s manager. It handles:</p><ul><li><strong>Cluster Coordination</strong>: Tracks the status of brokers and partitions.</li><li><strong>Leader Election</strong>: Ensures a broker is designated as the leader for each partition.</li><li><strong>Metadata Management</strong>: Stores configuration details and access control lists (ACLs).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=059ad89ef95f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All about Azure Data Factory]]></title>
            <link>https://medium.com/@madhuriduvvuri15/all-about-azure-data-factory-2d500ac9afbb?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d500ac9afbb</guid>
            <category><![CDATA[azure-data-factory]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 18:04:17 GMT</pubDate>
            <atom:updated>2025-01-11T18:04:17.555Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is ADF?</h3><p>Azure Data Factory (ADF) is a cloud-based data integration service provided by Microsoft Azure. ADF is a cloud ETL tool that extracts, transforms and loads data from various sources to destinations.</p><p><strong>Sources</strong>, which could be relational databases like SQL Server or MySQL, cloud storage such as Azure Blob Storage, or even APIs and file systems. This data is then transformed using <strong>Data Flows</strong>, a powerful feature in ADF that provides a no-code interface for performing complex transformations like filtering, aggregating, and joining data, all executed on a Spark-based runtime for scalability. Finally, the processed data is loaded into a <strong>destination</strong>, which might be a data warehouse like Azure Synapse Analytics, cloud storage, or even BI tools, enabling analysis and reporting.</p><h3>Core Components of Azure Data Factory</h3><h4>Linked Services:</h4><p>Linked Services are the connection strings to data sources, acting as the bridge between ADF and external data stores. These could be databases, file systems, or cloud services. Linked Services in ADF are analogous to connection strings in traditional database applications.</p><p>Common examples of linked services include:</p><ul><li>Azure Blob Storage</li><li>Azure SQL Database</li><li>Amazon S3</li><li>Azure Data Lake Store</li><li>On-Premises SQL Server</li></ul><p><strong>Integration Runtimes (IR)</strong><br> The Integration Runtime is the compute infrastructure used by ADF to move and transform data. There are three types of integration runtimes:</p><ol><li><strong>Azure Integration Runtime (Azure IR):</strong> Fully managed by Azure, it runs entirely in the cloud.</li><li><strong>Self-hosted Integration Runtime (Self-hosted IR):</strong> Runs on an on-premises machine or a virtual machine. It is used to move data between on-premises and cloud environments.</li><li><strong>Azure SSIS Integration Runtime (SSIS IR):</strong> Allows the execution of SQL Server Integration Services (SSIS) packages in the cloud, supporting legacy ETL workloads.</li></ol><p><strong>Usage:</strong> The Integration Runtime is responsible for executing data transformation tasks, performing data copying and maintaining secure data transfer channels.</p><h4>Difference between the Azure Blob Storage and Azure Data lake?</h4><p>Azure Blob Storage and Azure Data Lake are both Microsoft Azure services designed for scalable data storage, but they cater to different use cases. <strong>Azure Blob Storage</strong> is a general-purpose, object-based storage solution suitable for storing unstructured data like images, videos and backups. It is ideal for serving data to applications. In contrast, <strong>Azure Data Lake Storage (ADLS)</strong> is tailored for big data analytics and hierarchical data organization. It is built on top of Azure Blob Storage but provides features like a Hadoop-compatible file system, fine-grained access controls and optimized performance for parallel processing. While Blob Storage focuses on broad data storage needs, ADLS is designed to handle complex big data workloads, such as machine learning and advanced analytics.</p><h4>ADLS Gen 1 vs. Gen 2</h4><p><strong>Azure Data Lake Storage Gen1 (ADLS Gen 1):</strong><br> ADLS Gen 1 is an earlier version of Azure Data Lake. It is optimized for big data workloads but lacks features like hierarchical namespaces.</p><ul><li><strong>Azure Data Lake Storage Gen2 (ADLS Gen 2):</strong><br> ADLS Gen 2 is a more advanced version that combines Blob Storage capabilities with Data Lake features. It supports hierarchical namespaces, access tiers, and improved performance for analytics workloads.</li><li>Gen 2 supports Azure Blob Storage features (e.g., access tiers and lifecycle management).</li><li>Gen 2 provides better performance and scalability for large-scale data analytics.</li></ul><h4>Access Tiers in Azure Storage</h4><p><strong>Access Tiers</strong><br> Azure Blob Storage and ADLS Gen 2 offer three main access tiers:</p><ol><li><strong>Hot:</strong> Optimized for frequent access to data.</li><li><strong>Cool:</strong> Suitable for infrequent access and lower cost.</li><li><strong>Archive:</strong> Used for long-term storage with the lowest cost, but with slower access times.</li></ol><ul><li><strong>Usage in ADF:</strong> You can configure your pipeline to work with different access tiers, which helps optimize costs based on the frequency of access to data.</li></ul><h3>Conclusion</h3><p>Azure Data Factory is a powerful, versatile tool for managing data workflows in the cloud. Whether you’re building ETL pipelines, automating data movement or integrating with other Azure services, ADF offers the tools and flexibility to meet your needs. Understanding its core components — linked services, datasets, integration runtimes, pipeline design, triggers and monitoring — gives you the foundation to build scalable, secure and efficient data workflows.</p><p>This guide provides a comprehensive overview of Azure Data Factory’s capabilities, but as you dive deeper into specific use cases, you will encounter more advanced functionalities, making ADF a powerful tool for data engineers and analysts.</p><p>Credit : <a href="https://www.youtube.com/watch?v=8zIVOdKyoDA&amp;t=356s">https://www.youtube.com/watch?v=8zIVOdKyoDA&amp;t=356s</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d500ac9afbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A/B Testing in Data Science: A Beginner’s Guide]]></title>
            <link>https://medium.com/@madhuriduvvuri15/a-b-testing-in-data-science-a-beginners-guide-9658d8e15b6c?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9658d8e15b6c</guid>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Sat, 04 Jan 2025 15:01:47 GMT</pubDate>
            <atom:updated>2025-01-04T15:01:47.335Z</atom:updated>
            <content:encoded><![CDATA[<p>In data science, <strong>A/B testing</strong> is a crucial tool for making data-driven decisions. Whether it’s optimizing a website layout, improving email campaigns or testing a new feature, A/B testing helps determine what works best by splitting a user base into two groups and analyzing the outcomes. This blog will dive into the key concepts of A/B testing, including the <strong>null and alternative hypotheses</strong>, statistical tests like the <strong>p-test and t-test</strong>, and the importance of <strong>statistical significance</strong> — all supported by a practical example.</p><h3>What is A/B Testing?</h3><p>A/B testing is an experimental technique where two versions (A and B) of a variable are compared to identify which performs better. For instance, consider a company testing two versions of a call-to-action button: <strong>Version A</strong> has a blue button, and <strong>Version B</strong> has a red button. The goal is to see which button drives more clicks.</p><h3>Key Concepts in A/B Testing</h3><h4>1. Null and Alternative Hypotheses</h4><p>Every A/B test begins with forming two hypotheses:</p><ul><li><strong>Null Hypothesis (H₀)</strong>: There is no difference in performance between the two groups (e.g., the blue and red buttons perform equally).</li><li><strong>Alternative Hypothesis (H₁)</strong>: There is a significant difference in performance between the two groups (e.g., one button drives more clicks than the other).</li></ul><p>In statistical testing, the goal is to test the validity of the null hypothesis. Rejecting the null hypothesis suggests that the alternative hypothesis is likely true.</p><h4>2. Statistical Significance</h4><p>Statistical significance helps determine whether the observed effect in the data is due to chance or a real difference. A <strong>p-value</strong> measures this probability:</p><ul><li><strong>p-value ≤ 0.05</strong>: The result is statistically significant; reject the null hypothesis.</li><li><strong>p-value &gt; 0.05</strong>: The result is not statistically significant; fail to reject the null hypothesis.</li></ul><h4>3. Choosing the Right Statistical Test</h4><p>A/B testing uses statistical tests to analyze results:</p><ul><li><strong>T-Test</strong>: Compares the means of two groups when the sample size is small or the population standard deviation is unknown.</li><li><strong>Z-Test</strong>: Used for large sample sizes and known population standard deviations.</li><li><strong>Chi-Square Test</strong>: Evaluates categorical variables (e.g., click vs. no click).</li></ul><h3>A Practical Example</h3><h4>Scenario:</h4><p>A streaming service wants to determine whether changing the color of their “Subscribe” button from blue to red impacts subscription rates.</p><ul><li><strong>Group A</strong>: Users who see the blue button.</li><li><strong>Group B</strong>: Users who see the red button.</li></ul><p><strong>Results</strong>:</p><ul><li>Group A (Blue Button): 1000 users saw the button; 200 subscribed.</li><li>Group B (Red Button): 1000 users saw the button; 250 subscribed.</li></ul><h4>Step 1: Define the Hypotheses</h4><ul><li><strong>H₀</strong>: The subscription rates for the blue and red buttons are the same.</li><li><strong>H₁</strong>: The red button has a different subscription rate than the blue button.</li></ul><h4>Step 2: Perform a T-Test</h4><p>Using a t-test, we calculate whether the difference in subscription rates is statistically significant.</p><ul><li>Subscription rate for <strong>Group A</strong>: 200/1000=0.20200 / 1000 = 0.20200/1000=0.20</li><li>Subscription rate for <strong>Group B</strong>: 250/1000=0.25250 / 1000 = 0.25250/1000=0.25</li></ul><p>Assume standard deviations are calculated (or use tools like Python or R for this). After running the t-test, we obtain a <strong>p-value of 0.03</strong>.</p><h4>Step 3: Interpret Results</h4><ul><li><strong>p-value (0.03) ≤ 0.05</strong>: Reject the null hypothesis.</li><li>Conclusion: The red button leads to a statistically significant increase in subscription rates.</li></ul><h3>Common Pitfalls in A/B Testing</h3><ol><li><strong>Insufficient Sample Size</strong>: A small sample size may lead to unreliable results. Use a power analysis to determine the appropriate sample size.</li><li><strong>Peeking at Data Early</strong>: Checking results before the experiment ends can lead to biased decisions.</li><li><strong>Ignoring External Factors</strong>: Seasonality, user demographics, and external events can affect outcomes.</li></ol><h3>Conclusion</h3><p>A/B testing is a powerful tool for decision-making in data science. By understanding concepts like the null and alternative hypotheses, statistical tests, and significance levels, you can confidently analyze and interpret test results. Next time you’re optimizing a feature or making a data-driven decision, let A/B testing guide you toward the best outcome.</p><p>Happy testing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9658d8e15b6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spark Optimizations]]></title>
            <link>https://medium.com/@madhuriduvvuri15/spark-optimizations-64f12e49a615?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/64f12e49a615</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[spark]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 15:30:52 GMT</pubDate>
            <atom:updated>2025-01-18T18:23:06.699Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Key Concepts with Simple Examples</h3><p>Apache Spark is a powerful tool for distributed data processing, enabling data engineers and scientists to process vast amounts of data quickly and efficiently. However, understanding how Spark handles data under the hood is key to optimizing performance. In this blog, we’ll explore some essential Spark optimization techniques: <strong>shuffling</strong>, <strong>repartition</strong>, <strong>coalesce</strong>, <strong>group/reduce operations</strong>, and <strong>partitioning and bucketing</strong>. We’ll pair technical definitions with real-world analogies to make these concepts easier to grasp.</p><h3>1. Shuffling</h3><p><strong>Technical Definition:</strong><br>Shuffling is the process of redistributing data across partitions in a cluster, often necessary when performing operations like groupBy, reduceByKey, or join. It involves moving data between nodes in the cluster, which can be time-consuming and resource-intensive.<br>Imagine a classroom of students, where each student has a random set of colored balls. The teacher asks them to sort the balls so that each table contains balls of only one color. To achieve this, students need to walk around the classroom, exchanging balls with each other. This exchange (or movement of data) is analogous to shuffling in Spark — it’s necessary but time-consuming.</p><p>Minimize operations that require shuffling by using optimized transformations like mapPartitions, reduceByKey or by avoiding wide transformations where possible.</p><h3>2. Repartition</h3><p><strong>Technical Definition:</strong><br>The repartition method increases or decreases the number of partitions in a DataFrame or RDD by performing a full shuffle of the data. This is often used to ensure even distribution of data across partitions.<br>Think of a pizza delivery service that started with two drivers delivering 100 pizzas. Each driver was overloaded. To improve efficiency, they added two more drivers and redistributed the delivery routes. This redistribution of routes is similar to repartition—increasing partitions to balance the workload.</p><ul><li>Use repartition when you need to increase partitions to parallelize computation or balance the load across the cluster.</li></ul><h3>3. Coalesce</h3><p><strong>Technical Definition:</strong><br>The coalesce method reduces the number of partitions in a DataFrame or RDD without performing a full shuffle. It is more efficient than repartition for reducing partitions because it avoids unnecessary data movement.<br>Imagine a team of four workers cleaning a house. Once most of the rooms are clean, two workers are no longer needed, so the remaining tasks are reassigned to the other two workers. This reassignment without reorganizing everything is akin to coalesce.</p><ul><li>Use coalesce when you need to decrease partitions and don’t require a full shuffle, such as at the end of a computation for writing results to disk.</li></ul><h4><strong>4. Group/Reduce Operations</strong></h4><p>Operations like groupByKey and reduceByKey are used to aggregate data. groupByKey collects all values for each key, while reduceByKey combines values for each key using a specified function, reducing the amount of data shuffled.<br>Let’s say a company wants to find the total sales made by each salesperson.</p><ul><li>groupByKey: Imagine collecting all sales receipts for each salesperson in a box and then counting them. This approach requires collecting everything first, which can be inefficient.</li><li>reduceByKey: Instead of collecting all receipts, the sales team totals the sales at each branch and then sends the totals to the head office. This reduces the data sent, making it more efficient.</li></ul><p><strong>Optimization Tip:</strong></p><ul><li>Prefer reduceByKey or similar operations over groupByKey to minimize shuffling and memory usage.</li></ul><h4>5. Partitioning and Bucketing</h4><p>Partitioning organizes data into fixed segments (partitions) based on a specific column, improving query performance by minimizing the data read during queries.<br>Think of a library where books are organized by genre. If you need a science fiction book, you go straight to the science fiction section instead of searching through the entire library. Partitioning works the same way by dividing data based on a column.</p><p><strong>Bucketing</strong><br>Bucketing further divides partitioned data into smaller, equally sized buckets based on a hash function, providing better data distribution and reducing shuffling in joins.<br>Imagine the library’s science fiction section is now divided into shelves by author name. Instead of browsing all science fiction books, you can go directly to the shelf labeled with the author you’re interested in. This finer granularity reduces search time, much like bucketing in Spark.</p><ul><li>Partitioning is useful when querying specific subsets of data.</li><li>Bucketing is ideal for optimizing joins and aggregations in large datasets.</li></ul><h3>Conclusion</h3><p>Optimizing Spark applications involves understanding how data is distributed and processed across the cluster. Techniques like <strong>shuffling</strong>, <strong>repartition</strong>, <strong>coalesce</strong>, <strong>group/reduce operations</strong>, and <strong>partitioning and bucketing</strong> are fundamental to improving performance and reducing execution time. By combining technical knowledge with intuitive analogies, we can appreciate the power and flexibility of Spark while learning how to make our applications more efficient.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64f12e49a615" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Spark Architecture]]></title>
            <link>https://medium.com/@madhuriduvvuri15/understanding-spark-architecture-4e1eb3f83fd9?source=rss-21d681b8d9b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e1eb3f83fd9</guid>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Madhuri Duvvuri]]></dc:creator>
            <pubDate>Thu, 02 Jan 2025 04:00:37 GMT</pubDate>
            <atom:updated>2025-01-03T12:57:32.580Z</atom:updated>
            <content:encoded><![CDATA[<p>Apache Spark is a powerful distributed computing framework designed for large-scale data processing. With its ability to handle both batch and streaming data, Spark has become a cornerstone of big data processing. This blog will dive into Spark’s architecture, covering client and cluster models, RDDs, Data Frames and Datasets, as well as transformations and actions.</p><h3>Transformations in Spark</h3><p>Transformations are operations that return a new Data Frame, Dataset, or RDD by applying a function to an existing one. These are <strong>lazy</strong> — executed only when an action triggers them. They are like writing a recipe for a dish but not cooking it yet.</p><h4>Types of Transformations</h4><ol><li><strong>Narrow Transformations: </strong><br>Narrow transformations, like map or filter, process data within a single partition without requiring shuffling. This is like chopping vegetables independently at different stations in a kitchen. Operate within a single partition without requiring data movement.<br>Examples: map(), filter()</li><li><strong>Wide Transformations, </strong>such as reduceByKey or groupByKey, involve shuffling data across partitions, akin to combining ingredients from multiple stations into a single dish. Involve shuffling data between partitions.<br>Examples: reduceByKey(), groupByKey(), join()</li></ol><h3>Actions in Spark</h3><p>Actions execute the logical plan defined by transformations, materializing results. They are <strong>eager</strong> and return results to the driver or write them to storage. Actions trigger the execution of transformations and produce results. Examples include counting elements in a dataset or saving the processed data to a file. These actions are the final steps that deliver the outcome, similar to plating and serving a completed meal.</p><h4>Common Actions</h4><ul><li><strong>count()</strong>: Counts elements.</li><li><strong>collect()</strong>: Retrieves all elements.</li><li><strong>first()</strong>: Gets the first element.</li><li><strong>saveAsTextFile()</strong>: Saves the dataset to files.</li></ul><h3>Partitioning in Spark</h3><p>Partitioning is <strong>dividing tasks into manageable chunks</strong> — like assigning each chef a portion of the vegetables to chop. It ensures parallel processing and reduces bottlenecks. Imagine splitting a 10-kg bag of potatoes among five chefs, each peeling 2 kg. That’s partitioning. <strong>Partitioning</strong> divides datasets into smaller, manageable chunks called partitions, processed independently across nodes. Efficient partitioning reduces data movement and improves performance.</p><h4>Partitioning Techniques</h4><ol><li><strong>Default Partitioning</strong>:<br>Spark auto-partitions data based on the cluster configuration.</li><li><strong>Custom Partitioning</strong>:<br>Users specify partition logic via functions like partitionBy().</li></ol><h3>Shuffling in Spark</h3><p>Shuffling happens when <strong>data is reorganized across partitions</strong> — like swapping vegetables between chefs to ensure each has the right mix for their dish. Suppose one chef has all the onions while another has all the carrots. To make soup, they exchange portions so each has a bit of both. <strong>Shuffling</strong> occurs during wide transformations when data is redistributed across partitions.</p><h4>Examples of Shuffling</h4><ul><li><strong>reduceByKey()</strong></li><li><strong>join()</strong></li><li><strong>groupByKey()</strong></li></ul><h3>Spark Architecture</h3><p>The Spark architecture ensures efficient data processing by leveraging distributed computing and in-memory storage. It comprises:</p><h4>1. Driver:</h4><p>The head chef plans the meal, assigns tasks and ensures everything runs smoothly.</p><p>The driver orchestrates the Spark application by:</p><ul><li>Splitting jobs into stages and tasks.</li><li>Scheduling tasks on executors.</li><li>Collecting results from tasks.</li></ul><h4>2. Cluster Manager</h4><p>The kitchen manager allocates resources (chefs, tools and space) for the tasks.<strong> </strong>Manages cluster resources and assigns tasks to worker nodes.</p><h4>3. Worker Nodes</h4><p>The sous chefs chop, cook, and plate the dishes. These nodes run <strong>executors</strong>, which perform the actual computation.</p><h4>4. Executors</h4><p>The individual assistants helping the sous chefs with chopping, stirring, or garnishing. Executors are processes running on worker nodes that:</p><ul><li>Execute tasks in parallel.</li><li>Store intermediate and cached results.</li><li>Manage memory and cores for tasks.</li></ul><h4>5. Tasks</h4><p>Each action, like chopping a carrot or stirring a pot, is a task performed by an assistant. Tasks are the smallest unit of execution, representing operations on a partition.</p><h3>Key Concepts of Spark Architecture</h3><ol><li><strong>Parallelism</strong>: Achieved through partitioning and executors working on tasks independently.</li><li><strong>Scalability</strong>: Easily handles growing workloads by adding worker nodes.</li><li><strong>Fault Tolerance</strong>: Recomputes lost data using lineage information.</li><li><strong>Optimization</strong>: Logical and physical execution plans are optimized for performance.</li></ol><h3>RDDs, Data Frames and Datasets</h3><p>Spark provides three core abstractions for data processing: RDDs, Data Frames and Datasets. RDDs, or Resilient Distributed Datasets, are the fundamental building blocks of Spark. They offer fine-grained control over data processing but lack the performance optimizations of higher-level abstractions. Think of RDDs as raw ingredients for a meal, giving you complete flexibility but requiring more effort.</p><p>Data Frames are a structured and optimized abstraction over RDDs, resembling tables in a relational database. They simplify operations and allow SQL-like queries, making them easier to use and faster for most common tasks. Imagine following a recipe with pre-measured ingredients — effortless and efficient.</p><p>Datasets merge the benefits of both RDDs and DataFrames, providing type safety at compile time while retaining the optimizations of DataFrames. However, they are primarily available in Scala and Java, not Python.</p><p>Understanding Spark’s architecture and its abstractions is crucial for leveraging its full potential. From basic RDDs to optimized Data Frames and Datasets, Spark provides tools to process big data efficiently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e1eb3f83fd9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>