<?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 Akshatha on Medium]]></title>
        <description><![CDATA[Stories by Akshatha on Medium]]></description>
        <link>https://medium.com/@akshathakulal?source=rss-2beb4b7f4ed0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*W_o5EwwXQnEMhp7Rvwx1KQ.jpeg</url>
            <title>Stories by Akshatha on Medium</title>
            <link>https://medium.com/@akshathakulal?source=rss-2beb4b7f4ed0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:07:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akshathakulal/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[ Building an End-to-End Retail Data Pipeline with Azure Data Factory, PostgreSQL, and Power BI]]></title>
            <link>https://medium.com/@akshathakulal/building-an-end-to-end-retail-data-pipeline-with-azure-data-factory-postgresql-and-power-bi-ad5998aec2d1?source=rss-2beb4b7f4ed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad5998aec2d1</guid>
            <category><![CDATA[etl-pipeline]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-data-factory]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Akshatha]]></dc:creator>
            <pubDate>Thu, 11 Sep 2025 18:11:50 GMT</pubDate>
            <atom:updated>2025-09-11T18:11:50.143Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong><br>In today’s data-driven world, businesses need robust ETL pipelines to transform raw data into actionable insights. To simulate a production-like setup, I built a project using <strong>Azure Data Factory (ADF)</strong>, <strong>PostgreSQL</strong>, <strong>Azure Blob Storage</strong>, <strong>Azure SQL Database</strong>, and <strong>Power BI</strong>.</p><p>This article walks through the <strong>architecture</strong>, <strong>workflow</strong>, and <strong>outcomes</strong> of the project.</p><h3>🏗 Architecture Overview</h3><p>I used <strong>PostgreSQL</strong> as the on-premise source, connected securely to Azure via <strong>Self-Hosted Integration Runtime</strong>. Data was staged in <strong>Azure Blob Storage</strong> (raw layer), transformed in <strong>ADF Data Flows</strong>, and stored in <strong>Azure SQL Database</strong> for reporting. <strong>Power BI</strong> connected to the database to create rich dashboards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sapjBkdlC22U8pd_vlXGSg.png" /></figure><h3>⚙ Data Preparation</h3><p>The retail dataset from <strong>Kaggle</strong> contained two tables: orders and details. Using Python, I loaded them into <strong>PostgreSQL</strong>.</p><h3>📦 ETL Workflow</h3><h4>Raw Layer</h4><p>Two <strong>Copy Activities</strong> in ADF pulled the tables from PostgreSQL to Blob Storage.</p><h4>Transform Layer</h4><ul><li>Joined orders and details.</li><li>Extracted <strong>Month</strong> and <strong>Year</strong> from the order date.</li><li>Selected only necessary columns.</li><li>Stored results in Blob Storage (transform layer).</li></ul><h4>Load</h4><p>A <strong>Copy Activity</strong> loaded the transformed data into Azure SQL Database.</p><h3>📊 Power BI Dashboard</h3><p>The dashboard highlights:</p><ul><li><strong>KPIs</strong>: Total Profit, Total Sales, MoM Growth %, Profit Margin.</li><li><strong>Visuals</strong>:</li><li>Quantity by Category and Sub-Category.</li><li>Monthly Sales Trend.</li><li>Sales by State and Category.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aCBKeDBu9Vl_dsPCYfkRBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MisOjf5-E175Mfl09Ub-6Q.png" /></figure><p>In Power BI, I also <strong>created a Date table</strong> and <strong>joined it with the source data on </strong><strong>order_date</strong> to enable robust time intelligence features like Month-over-Month analysis.</p><h3>📈 Key Findings from the Dataset (2018 Only)</h3><h4>🛍 Clothing Dominates Sales Volume</h4><p>Clothing is the top-selling category by quantity in 2018, far surpassing Electronics and Furniture.</p><h4>👗 Sarees Lead Sub-Category Performance</h4><p>Sarees and Handkerchiefs were the leading sub-categories for 2018.</p><h4>💰 Profitability Insights</h4><ul><li>Despite total sales of ~437.8K in 2018, the <strong>profit margin</strong> is only <strong>8.4%</strong>.</li><li><strong>Month-over-Month Growth</strong> showed a <strong>-22.5% decline</strong> compared to the previous month, suggesting seasonal dips.</li></ul><h4>🌍 Geographic Trends</h4><p>Maharashtra dominated 2018 sales (<strong>37.46%</strong>), followed by Madhya Pradesh and Uttar Pradesh.</p><h4>📅 Seasonality Effects</h4><p>Monthly sales for 2018 peaked in <strong>January–February</strong> and dipped mid-year (<strong>June–July</strong>), indicating strong seasonality.</p><h4>🗺 Category–State Relationships</h4><p>The distribution of categories by state reveals that <strong>Clothing</strong> consistently performed well across all regions in 2018.</p><h3>🚀 Results</h3><p>This pipeline simulates a <strong>real-world production environment</strong> and demonstrates how Azure’s ecosystem simplifies ETL and analytics. It’s <strong>scalable</strong>, <strong>cost-effective</strong>, and integrates seamlessly with Power BI for <strong>dynamic reporting</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad5998aec2d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Building an End-to-End Data Pipeline with Snowflake, dbt & Tableau Using Olist eCommerce Data]]></title>
            <link>https://medium.com/@akshathakulal/building-an-end-to-end-data-pipeline-with-snowflake-dbt-tableau-using-olist-ecommerce-data-7b824d01c07f?source=rss-2beb4b7f4ed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b824d01c07f</guid>
            <dc:creator><![CDATA[Akshatha]]></dc:creator>
            <pubDate>Tue, 24 Jun 2025 16:52:40 GMT</pubDate>
            <atom:updated>2025-06-24T16:52:40.257Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>A hands-on data engineering project that goes from raw CSVs to polished dashboards.</em></blockquote><h3>👋 Introduction</h3><p>In this project, I explored how to build an end-to-end analytics pipeline using <strong>Snowflake</strong>, <strong>dbt</strong>, and <strong>Tableau</strong>, leveraging the publicly available <strong>Olist eCommerce dataset</strong> from Kaggle. The goal was to simulate a modern data stack project from raw data ingestion to business-ready insights.</p><p>This post walks through:</p><ul><li>Setting up Snowflake and dbt</li><li>Building clean, reusable data models</li><li>Creating a Tableau dashboard</li><li>And some learnings along the way</li></ul><h3>🗃️ The Dataset</h3><p>The Olist eCommerce dataset contains information on Brazilian online retail activity from multiple marketplaces. It includes:</p><ul><li>Order and customer data</li><li>Product categories and reviews</li><li>Payments, shipping, geolocation</li></ul><h3>🧊 Step 1: Loading Data into Snowflake</h3><p>After downloading the CSV files from Kaggle, I created a new database and schema in <strong>Snowflake</strong>:</p><ul><li>Database: olist_database</li><li>Schema: olist_raw</li></ul><p>Each CSV was loaded into its corresponding table using the Snowflake UI.</p><p><strong>tables created:</strong></p><ul><li>orders</li><li>order_items</li><li>customers</li><li>sellers</li><li>order_reviews</li><li>…</li></ul><h3>🧱 Step 2: Setting Up dbt</h3><p>To transform raw data into clean, analytics-ready tables, I used <strong>dbt (data build tool)</strong> with Snowflake.</p><h3>🔧 Initialize dbt Project</h3><pre>dbt init olist_project</pre><p>This creates the required project structure.</p><h3>🔐 Set Up the Snowflake Connection</h3><p>To provide the Snowflake details like database, schema etc we can configure in ~/.dbt/profiles.yml</p><pre># in terminal<br>open ~/.dbt/profiles.yml</pre><pre># ~/.dbt/profiles.yml<br><br>olist_project:<br>  outputs:<br>    dev:<br>      type: snowflake<br>      account: &lt;your_snowflake_account&gt;<br>      user: &lt;your_username&gt;<br>      password: &lt;your_password&gt;<br>      role: ACCOUNTADMIN<br>      database: olist_database<br>      schema: olist_schema<br>      warehouse: COMPUTE_WH<br>      threads: 4<br>  target: dev</pre><h3>🧼 Step 3: Creating Staging Models</h3><p>Once the setup is done I created a staging/ folder inside models/. This is where raw data is cleaned and standardized.</p><p><strong>Example: </strong><strong>stg_orders.sql</strong></p><pre>with source as (<br>    select * from {{ source(&#39;olist_raw&#39;, &#39;orders&#39;) }}<br>),<br>cleaned as (<br>    select<br>        order_id,<br>        customer_id,<br>        order_status,<br>        order_purchase_timestamp as order_purchase_ts,<br>        order_delivered_customer_date as order_customer_ts<br>    from source<br>)<br>select * from cleaned</pre><p>To define the sources, I used a sources.yml:</p><pre>version: 2<br><br>sources:<br>  - name: olist_raw<br>    database: olist_database<br>    schema: olist_raw<br>    tables:<br>      - name: orders<br>      - name: order_items<br>      - name: customers<br>      ...</pre><p>Then ran the models:</p><pre>dbt run --select stg_order_items<br># to run all<br>dbt run --select staging</pre><h3>🏗️ Step 4: Building Marts (Core Business Tables)</h3><p>In the marts/ folder, I created business logic and aggregations for reporting.</p><p><strong>Example: </strong><strong>mart_orders.sql</strong></p><pre>with source as (<br>    select * from {{ ref(&#39;stg_orders&#39;) }}<br>),<br>aggregated as (<br>    select<br>        order_items.order_id,<br>        customer_id,<br>        order_status,<br>        sum(price) as total_order_value,<br>        order_purchase_ts as order_date<br>    from source<br>    join {{ ref(&#39;stg_order_items&#39;) }} as order_items<br>        on order_items.order_id = source.order_id<br>    group by order_items.order_id, customer_id, order_status, order_date<br>)<br>select * from aggregated</pre><p>Ran all mart models:</p><pre>dbt run --select marts</pre><h3>📊 Step 5: Creating the Dashboard in Tableau</h3><p>Once the marts were materialized in Snowflake, I connected Tableau using the <strong>Snowflake connector</strong>. After entering the database and warehouse details, I pulled in:</p><ul><li>mart_orders</li><li>mart_customers</li><li>mart_products</li><li>mart_reviews</li></ul><p>Here’s a snapshot of the dashboard I created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PmUNZMCQa1wA3CV-rJGqdA.png" /></figure><h3>The Dashboard Includes:</h3><ul><li>💰 Total Revenue, Orders, Customers</li><li>📈 Revenue Trend Over Time</li><li>🔝 Top 5 Product Categories</li><li>🌎 Revenue by State (Map)</li><li>⭐ Review Score Trend</li></ul><h3>🧠 Learnings</h3><p>This project helped reinforce how:</p><ul><li>dbt makes SQL transformations modular and testable</li><li>Snowflake scales storage and compute independently</li><li>Tableau brings the data to life for business users</li></ul><h3>📁 Project Structure</h3><pre>olist_project/<br>├── models/<br>│   ├── staging/<br>│   │   ├── sources.yml<br>│   │   ├── stg_orders.sql<br>│   │   ├── stg_customers.sql<br>│   │   └── ...<br>│   └── marts/<br>│       ├── mart_orders.sql<br>│       ├── mart_customers.sql<br>│       └── ...<br>├── dbt_project.yml<br>└── README.md</pre><h3>🔗 GitHub Repository</h3><p>You can find the full code and dbt project setup here:<br> 👉 GitHub: <a href="https://github.com/aakshatha02/olist-snowflake-dbt-project/tree/main">olist-snowflake-dbt-project</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b824d01c07f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering PySpark: A Comprehensive Guide to Key Syntax and Concepts‍]]></title>
            <link>https://medium.com/@akshathakulal/mastering-pyspark-a-comprehensive-guide-to-key-syntax-and-concepts-81574da63fc1?source=rss-2beb4b7f4ed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/81574da63fc1</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[pyspark]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Akshatha]]></dc:creator>
            <pubDate>Sat, 28 Dec 2024 23:08:30 GMT</pubDate>
            <atom:updated>2024-12-28T23:08:30.634Z</atom:updated>
            <content:encoded><![CDATA[<h3>🚀 Introduction</h3><p>PySpark is the Python API for Apache Spark, an open-source distributed computing system designed for large-scale data processing. By combining the simplicity of Python with the scalability of Spark, PySpark enables data engineers and scientists to process and analyze vast datasets efficiently.</p><p>This guide aims to be a one-stop reference for anyone looking to learn and apply PySpark syntax. You’ll find valuable insights into PySpark syntax, from the basics of setting up a Spark session to advanced topics like performance optimization, working with cloud storage, and debugging Spark jobs.</p><h4><strong>1. Setting Up PySpark</strong></h4><p><strong>1.1 Creating a Spark Session</strong></p><p>This initializes the Spark session, which is required for all PySpark applications.</p><pre>from pyspark.sql import SparkSession<br><br>spark = SparkSession.builder \<br>    .appName(&quot;PySpark Tutorial&quot;) \<br>    .getOrCreate()</pre><h4>2. Working with RDDs (Resilient Distributed Datasets)</h4><p><strong>2.1 Creating an RDD</strong></p><pre>data = [1, 2, 3, 4, 5]<br>rdd = spark.sparkContext.parallelize(data)</pre><p><strong>2.2 RDD Operations</strong></p><ul><li><strong>Map</strong>:</li></ul><pre>rdd.map(lambda x: x * 2)</pre><ul><li><strong>Filter:</strong></li></ul><pre>rdd.filter(lambda x: x &gt; 2)</pre><ul><li><strong>Reduce:</strong></li></ul><pre>rdd.reduce(lambda x, y: x + y)</pre><p><strong>2.3 Actions on RDD</strong></p><ul><li><strong>Collect:</strong></li></ul><p>collect() should be used cautiously with large datasets.</p><pre>rdd.collect()</pre><ul><li><strong>Count:</strong></li></ul><pre>rdd.count()</pre><h4>3. Working with DataFrames</h4><p><strong>3.1 Creating a dataframe</strong></p><pre>data = [(&quot;Alice&quot;, 25), (&quot;Bob&quot;, 30)]<br>columns = [&quot;Name&quot;, &quot;Age&quot;]<br>df = spark.createDataFrame(data, columns)</pre><p><strong>3.1.1 From RDDs</strong></p><pre>from pyspark.sql import Row<br>from pyspark.sql.types import StructType, StructField, StringType, IntegerType<br># Create a SparkContext<br>sc = spark.sparkContext<br># Load text file and split into parts<br>lines = sc.textFile(&quot;people.txt&quot;)<br>parts = lines.map(lambda x: x.split(&quot;,&quot;)) <br># Create Row objects for each line<br>people = parts.map(lambda p: Row(name=p[0], age=int(p[1])))  <br># Infer schema and create DataFrame<br>df = spark.createDataFrame(people)  # Create DataFrame<br>df.show()<br><br>#Specify Schema<br>people = parts.map(lambda p: Row(name=p[0], age=int(p[1].strip())))  <br>schemaString = &quot;name string, age int&quot;  <br>fields = [StructField(field_name.split()[0], StringType() if field_name.split()[1] == &#39;string&#39; else IntegerType(), True)<br>          for field_name in schemaString.split(&quot;,&quot;)]<br>schema = StructType(fields)<br><br># Create DataFrame with the defined schema<br>spark.createDataFrame(people, schema).show()</pre><p><strong>3.1.2 From Spark Data Sources</strong></p><pre>#JSON<br><br>df = spark.read.json(&quot;employee.json&quot;)<br>df.show()<br><br>df = spark.read.load(&quot;employee.json&quot;, format=&quot;json&quot;)<br><br>#Parquet File<br>df = spark.read.load(&quot;employee.parquet&quot;)<br><br>#TXT files, the content of the text file is read line by line, and each line is treated as a single value in a column named &quot;value&quot;.<br>df = spark.read.text(&quot;employee.txt&quot;)</pre><p><strong>3.2 Basic DataFrame Operations</strong></p><ul><li><strong>Show Data:</strong></li></ul><pre>df.show()</pre><ul><li><strong>Select Columns:</strong></li></ul><pre>df.select(&quot;Name&quot;).show()</pre><ul><li><strong>Fileter Rows:</strong></li></ul><pre>df.filter(df.Age &gt; 20).show()</pre><p><strong>3.3 DataFrame Schema</strong></p><pre>df.printSchema()</pre><p><strong>3.4 Adding Column with Null Value or Default Value</strong></p><pre>from pyspark.sql.functions import lit<br># Null value<br>df = df.withColumn(&quot;Country&quot;, lit(None)).show()<br># Default value<br>df.withColumn(&quot;Country&quot;, lit(&quot;USA&quot;)).show()</pre><p><strong>3.5 Rename Column</strong></p><pre>spark_df.withColumnRenamed(&quot;Country&quot;, &quot;country&quot;).show()</pre><p><strong>3.6 Drop Column</strong></p><pre>spark_df.drop(&quot;Age&quot;).show()</pre><h4>4. PySpark SQL</h4><p><strong>4.1 Using SQL Queries</strong></p><ul><li><strong>Create a Temp View:</strong></li></ul><pre>df.createOrReplaceTempView(&quot;employee&quot;)</pre><ul><li><strong>SELECT Query:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees&quot;).show()</pre><ul><li><strong>LIKE Query:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees WHERE last_name LIKE &#39;B%&#39;&quot;).show()</pre><ul><li><strong>BETWEEN Query:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees WHERE salary BETWEEN 10000 and 20000&quot;).show()</pre><ul><li><strong>IN Query:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees WHERE department IN (&#39;HR&#39;, &#39;IT&#39;)&quot;).show()</pre><ul><li><strong>ORDER BY Query:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees ORDER BY salary desc&quot;).show()</pre><ul><li><strong>GROUP BY:</strong></li></ul><pre>spark.sql(&quot;SELECT department, COUNT(*) as num_employees FROM employees GROUP BY department&quot;).show()</pre><ul><li><strong>DISTINCT Query:</strong></li></ul><pre>spark.sql(&quot;SELECT DISTINCT department from employees&quot;).show()</pre><ul><li><strong>LIMIT Query:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees ORDER BY salary LIMIT 10&quot;).show()</pre><ul><li><strong>IS NULL or IS NOT NULL:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees WHERE DEPARTMENT IS NULL&quot;).show()<br><br>spark.sql(&quot;SELECT * FROM employees WHERE DEPARTMENT IS NOT NULL&quot;).show()</pre><ul><li><strong>WHERE with Multiple Conditions:</strong></li></ul><pre>spark.sql(&quot;SELECT * FROM employees WHERE department = &#39;IT&#39; AND salary &gt; 50000&quot;).show()</pre><ul><li><strong>Filter:</strong></li></ul><pre>df.filter(df[&#39;Age&#39;] &gt; 20).show()</pre><ul><li><strong>Sort:</strong></li></ul><pre>df.sort(df[&quot;salary&quot;], ascending = False).show()</pre><ul><li><strong>Replacing and Dropping Null Values :</strong></li></ul><pre>df.na.fill(50).show()<br>df.na.drop().show</pre><h4>5. Working with Files</h4><p><strong>5.1 Reading and Writing Data</strong></p><ul><li><strong>Reading CSV:</strong></li></ul><pre>df = spark.read.csv(&quot;path/to/file.csv&quot;, header=True, inferSchema=True) # CSV file having header<br><br># If no header in CSV, set header=False, and Spark will assign default column names like _c0, _c1, etc.<br>df = spark.read.csv(&quot;path/to/file.csv&quot;, header=False, inferSchema=True) </pre><ul><li><strong>Writing Data:</strong></li></ul><pre>df.write.parquet(&quot;path/to/outfut/file.parquet&quot;)</pre><h4>6. Joins in PySpark</h4><p><strong>6.1 Types of Joins</strong></p><pre># Inner Join<br>df1.join(df2, df1[&quot;ID&quot;] == df2[&quot;ID&quot;]).show()<br><br># Left Join<br>df1.join(df2, df1[&quot;ID&quot;] == df2[&quot;ID&quot;], &quot;left&quot;).show()<br><br># Right Join<br>df1.join(df2, df1[&quot;ID&quot;] == df2[&quot;ID&quot;], &quot;right&quot;).show()<br><br># Full Join<br>df1.join(df2, df1[&quot;ID&quot;] == df2[&quot;ID&quot;], &quot;outer&quot;).show()</pre><h4>7. Aggregation and Grouping</h4><p><strong>7.1 Basic Aggregation</strong></p><pre>from pyspark.sql.functions import sum, avg<br>df.groupBy(&quot;Category&quot;).agg(sum(&quot;Amount&quot;).alias(&quot;TotalAmount&quot;), avg(&quot;Amount&quot;).alias(&quot;AvgAmount&quot;)).show()</pre><h4>8. Working with Dates and Timestamps</h4><p><strong>8.1 Converting String to Date</strong>:</p><pre>from pyspark.sql.functions import to_date<br>df = df.withColumn(&quot;Date&quot;, to_date(df[&quot;DateColumn&quot;], &quot;yyyy-MM-dd&quot;))</pre><p><strong>8.2 Extracting Year/Month</strong></p><p>PySpark provides many built-in functions for handling dates and timestamps:</p><ul><li>month(): Extracts the month from a date.</li><li>dayofmonth(): Extracts the day of the month.</li><li>current_date(): Gets the current date.</li></ul><pre>from pyspark.sql.functions import month, dayofmonth, current_date<br><br>df = df.withColumn(&quot;Month&quot;, month(df[&quot;DateColumn&quot;]))<br>df = df.withColumn(&quot;Day&quot;, dayofmonth(df[&quot;DateColumn&quot;]))<br>df = df.withColumn(&quot;Today&quot;, current_date())<br>df.show()</pre><h4>9. Performance Optimization</h4><p><strong>9.1 Caching and Persisting</strong></p><p><strong>When to Use Caching and Persisting</strong>:<br>Caching and persisting help optimize performance when a DataFrame or RDD is reused multiple times in your job. Without these, Spark recomputes the data each time it is accessed. Here’s the difference:</p><ul><li>cache(): Stores data in memory for quick access.</li><li>persist(StorageLevel.MEMORY_AND_DISK): Stores data in memory but falls back to disk storage if memory is insufficient.</li><li><strong>Cache Data:</strong></li></ul><pre>df.cache()  # Use when having enough memory and will reuse &#39;df&#39; frequently.<br>df.persist(StorageLevel.MEMORY_AND_DISK)  # Use for large datasets when memory might not be enough.</pre><h4>10. Spark on Cloud</h4><p><strong>10.1 Using Spark with S3 (AWS)</strong></p><p><strong>S3 Configuration Requirements</strong>:<br>When working with AWS S3, you need to configure Spark to authenticate using your AWS credentials. This typically requires setting environment variables or using a configuration file.</p><p>Example of reading data from S3:</p><pre>spark._jsc.hadoopConfiguration().set(&quot;fs.s3a.access.key&quot;, &quot;YOUR_ACCESS_KEY&quot;)<br>spark._jsc.hadoopConfiguration().set(&quot;fs.s3a.secret.key&quot;, &quot;YOUR_SECRET_KEY&quot;)<br><br>df = spark.read.csv(&quot;s3a://bucket-name/path/to/data.csv&quot;, header=True, inferSchema=True)<br>df.show()</pre><p>Alternatively, use an IAM role if running on AWS EMR or EC2 to avoid hardcoding credentials.</p><h4>11. Debugging PySpark Jobs</h4><p><strong>11.1 Using </strong><strong>explain()</strong> to inspect query plans: This method is useful for debugging and performance tuning. It can help identify performance bottlenecks in query (e.g., large shuffle operations, missing partitioning strategies).</p><pre>df.explain()</pre><h4>12. Stopping PySpark Session</h4><pre>spark.stop()</pre><h3>✨Conclusion</h3><p>PySpark is more than just a tool — it’s a gateway to processing and analyzing massive datasets with ease and efficiency. Its ability to seamlessly integrate with Python while leveraging the power of distributed computing makes it an essential skill for data professionals in today’s world.</p><p>Learning PySpark not only equips you to handle big data challenges but also opens up opportunities to work on cutting-edge projects in industries like finance, healthcare, and technology. As data continues to grow in importance, mastering PySpark can set you apart and empower you to make a real impact.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81574da63fc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Star vs Snowflake Schema: A Beginner’s Guide to Data Warehouse Design]]></title>
            <link>https://medium.com/@akshathakulal/star-vs-snowflake-schema-a-beginners-guide-to-data-warehouse-design-eafef1fa6e7a?source=rss-2beb4b7f4ed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/eafef1fa6e7a</guid>
            <category><![CDATA[star-schema]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-modeling]]></category>
            <category><![CDATA[data-anaytics]]></category>
            <category><![CDATA[snowflake-schema]]></category>
            <dc:creator><![CDATA[Akshatha]]></dc:creator>
            <pubDate>Thu, 19 Dec 2024 16:16:01 GMT</pubDate>
            <atom:updated>2024-12-19T16:16:01.388Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>In today’s data-driven world, businesses rely heavily on data warehouses to make informed decisions. However, the design of your data warehouse plays a crucial role in its efficiency and performance. Two of the most popular schema designs in data warehousing are the <strong>Star Schema</strong> and <strong>Snowflake Schema</strong>. But how do they differ, and which one should you choose? In this guide, we’ll break down these schemas, compare them, and help understand their use cases.</p><h3>What is a Schema in Data Warehousing?</h3><p>A schema in data warehousing refers to the logical structure that defines how data is organized, stored, and accessed. It provides a blueprint for data relationships and helps optimize querying and analysis. Among various schema types, the <strong>Star Schema</strong> and <strong>Snowflake Schema</strong> stand out as the most commonly used for analytical purposes.</p><h3>What is Star Schema?</h3><p><strong>Star Schema</strong> is a multi-dimensional data model with a simple and intuitive design that organizes data with a central <strong>fact table</strong> surrounded by multiple <strong>dimension tables</strong>. The structure resembles a star, hence the name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DpHIsK636TwgRLhHnoFzFg.jpeg" /><figcaption>Example of Star Schema</figcaption></figure><h4>Structure</h4><ul><li><strong>Fact Table</strong>: Stores measurable, quantitative data (e.g., sales, revenue) and foreign keys to dimension tables.</li><li><strong>Dimension Tables</strong>: Contain descriptive attributes related to the facts (e.g., product details, customer information).</li></ul><h4>Advantages</h4><ul><li>Easy to understand and query.</li><li>Fast query performance due to fewer joins and denormalized data.</li><li>Adapt well to fit OLAP models.</li></ul><h4>Disadvantages</h4><ul><li>Redundancy in dimension tables can lead to larger storage requirements.</li><li>Data integrity is more at risk in star schemas. Because data is stored redundantly, multiple copies of the same data exist in the star schema’s dimensional tables.</li></ul><h3>What is Snowflake Schema</h3><p>The Snowflake Schema is a more complex design that normalizes dimension tables into multiple related tables, reducing redundancy. Its structure resembles a snowflake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZbZJFejaejDvLXqNG1DPuw.jpeg" /><figcaption>Example of Snowflake Schema</figcaption></figure><h4>Structure</h4><ul><li><strong>Fact Table</strong>: Similar to the Star Schema, storing measurable data.</li><li><strong>Normalized Dimension Tables</strong>: Dimension tables are split into sub-dimensions to eliminate redundancy.</li></ul><h4>Advantages</h4><ul><li>Reduces data redundancy and storage requirements.</li><li>Maintains data integrity through normalization.</li></ul><h4>Disadvantages</h4><ul><li>Slower query performance due to additional joins.</li><li>More complex design and maintenance.</li></ul><h3>Comparison Table</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j3dyyWrh4w0BXPZjmKmeKA.jpeg" /></figure><h3>How to Choose Between the Two</h3><h4>Key Factors</h4><ul><li><strong>Query Performance Needs</strong>: Use Star Schema for faster queries.</li><li><strong>Data Redundancy Tolerance</strong>: Snowflake Schema minimizes redundancy.</li><li><strong>Storage Constraints</strong>: Snowflake Schema is more storage-efficient.</li><li><strong>Team Expertise</strong>: Star Schema is easier to design and maintain.</li></ul><h3>Conclusion</h3><p>Both Star Schema and Snowflake Schema have their unique strengths and weaknesses. Choosing the right schema depends on your specific data warehouse requirements, such as query performance, storage, and complexity. By understanding these schemas, you can design a data warehouse that meets your business needs effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eafef1fa6e7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Automated ETL Pipeline with Docker, Jenkins, Logstash, Elasticsearch, and Kibana]]></title>
            <link>https://medium.com/@akshathakulal/building-an-automated-etl-pipeline-with-docker-jenkins-logstash-elasticsearch-and-kibana-5a43235ad067?source=rss-2beb4b7f4ed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a43235ad067</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[elk-stack]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Akshatha]]></dc:creator>
            <pubDate>Thu, 07 Nov 2024 21:45:16 GMT</pubDate>
            <atom:updated>2024-11-07T21:45:16.738Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Data pipelines are essential for data processing and analysis in today’s fast-paced, data-rich environments. In this article, we will see building a robust ETL pipeline using a modern stack of tools — Docker, Jenkins, Logstash, Elasticsearch, and Kibana.</p><p>This pipeline automates data ingestion, transformation, and visualization. We’ll walk through the roles each tool plays, their configuration, and how they work together to create a seamless ETL workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JECl5tu3ACeeLOqeepBnRQ.png" /><figcaption>Data Visualisation in Kibana for Food Recall In USA</figcaption></figure><h3>1. Pipeline Architecture Overview</h3><p>Before diving into individual tools, let’s outline the architecture of our ETL pipeline:</p><ul><li><strong>Docker</strong> is used to create consistent and isolated environments for each tool, ensuring reliable deployment and easy scaling.</li><li><strong>Jenkins</strong> automates the pipeline by scheduling each phase, triggering data processing on a set schedule.</li><li><strong>Logstash</strong> serves as our data ingestion and transformation engine, cleaning and preparing data for storage.</li><li><strong>Elasticsearch</strong> stores the processed data, making it searchable and accessible for analysis.</li><li><strong>Kibana</strong> provides visual insights, allowing users to interact with the data through dashboards and graphs.</li></ul><p>Each tool has a specific role, and together they form an efficient data pipeline that requires minimal manual intervention.</p><h3>2. Using Docker for Containerised Deployments</h3><p>Docker simplifies deploying and managing services in isolated containers. In this pipeline, Docker Compose orchestrates three services: Elasticsearch, Kibana, and Logstash.</p><h4>Why Docker?</h4><ul><li><strong>Consistency</strong>: Docker ensures that our environments are identical, from development to production, reducing “it works on my machine” issues.</li><li><strong>Scalability</strong>: Containers can be easily scaled or modified as our data grows.</li><li><strong>Isolation</strong>: Each component runs in its own container, minimising dependency conflicts.</li></ul><h3>3. Jenkins: Automating the ETL Pipeline</h3><p>Jenkins is our automation tool, orchestrating each stage of the ETL pipeline. With a Jenkins pipeline, we can define a sequence of steps to:</p><ul><li><strong>Set Up Environment Variables</strong>: Calculate dates or other dynamic values for the ETL.</li><li><strong>Manage Docker Containers</strong>: Start and stop Docker services to ensure a clean slate for each ETL run.</li><li><strong>Trigger Data Processing</strong>: Schedule the pipeline to run automatically at specified intervals.</li></ul><h4>Key Stages in the Jenkins Pipeline</h4><p>Here’s a breakdown of the stages in our Jenkinsfile:</p><ol><li><strong>Checkout Code</strong>: Pulls the latest version of the code repository.</li><li><strong>Set Date for API Call</strong>: Runs a shell script to dynamically set the date range (or other environment variables) used in Logstash.</li><li><strong>Manage Docker Containers</strong>: Stops existing containers and then starts new ones for a fresh environment each run.</li><li><strong>Monitor Data Flow</strong>: Checks Logstash logs to verify data processing.</li></ol><p>This Jenkins pipeline minimises manual intervention, providing a fully automated ETL workflow.</p><p>To optimize resource usage, we can add an additional pipeline step to automatically stop all containers once visualisation and analysis are complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjOxZKx9XaddQ7yuB-yAlA.png" /></figure><h3>4. Logstash: Data Ingestion and Transformation</h3><p>Logstash is the engine driving data ingestion and transformation. It pulls raw data, processes it, and then sends it to Elasticsearch for storage.</p><h4>Configuring Logstash for ETL</h4><p>The Logstash configuration (logstash.conf) consists of three main sections:</p><ul><li><strong>Input</strong>: Uses an HTTP poller to fetch data from the source. In this setup, we’re calling an API at scheduled intervals.</li><li><strong>Filter</strong>: Transforms data by formatting dates, handling missing values, and removing unnecessary fields.</li><li><strong>Output</strong>: Sends the processed data to an Elasticsearch index, making it searchable.</li></ul><pre>input {<br>  http_poller {<br>    urls =&gt; {<br>      fda_data =&gt; &quot;https://api.fda.gov/food/enforcement.json?search=report_date:[${PREVIOUS_MONTH_START}+TO+${PREVIOUS_MONTH_END}]&amp;limit=1000&quot;<br>    }<br>    request_timeout =&gt; 60<br>    schedule =&gt; { cron =&gt; &quot;50 20 * * *&quot; }  # Runs on the 1st day of every month at 12.05 AM<br>    codec =&gt; &quot;json&quot;<br>    metadata_target =&gt; &quot;http_poller_metadata&quot;<br>  }<br>}<br><br>filter {<br>  mutate {<br>    rename =&gt; {&quot;[results]&quot; =&gt; &quot;data&quot;}<br>  }<br><br>output {<br>  elasticsearch {<br>    hosts =&gt; [&quot;http://es8:9200&quot;]<br>    index =&gt; &quot;fda_recalls&quot;<br>  }<br>  stdout { codec =&gt; rubydebug }<br>}</pre><h3>5. Elasticsearch: Storing and Indexing Data</h3><p>Elasticsearch is our NoSQL database, optimised for fast search and analytics. It stores the processed data from Logstash in a structured format that can be quickly queried and analyzed.</p><h4>Key Features and Configuration</h4><ul><li><strong>Indexing</strong>: Data is stored in indices, which are highly searchable and optimized for analytics.</li><li><strong>Scalability</strong>: Elasticsearch scales horizontally, allowing us to handle large data volumes as they grow.</li></ul><p>In our Docker Compose file, we set up Elasticsearch with specific memory options to ensure efficient data handling. Data processed by Logstash is stored in the fda_recalls index, ready for analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-AyZDKj-gODE_Z9LokcTQ.png" /></figure><h3>6. Kibana: Visualising Data</h3><p>Kibana is the visualisation layer in our stack, allowing us to create dashboards and charts based on the data stored in Elasticsearch.</p><h4>Building Dashboards in Kibana</h4><p>With the data available in Elasticsearch, we can use Kibana to create various visualizations, such as:</p><ul><li><strong>Time-Series Analysis</strong>: The <strong>“Recalls Over Time”</strong> line chart shows the number of recalls by initiation date, helping to identify patterns or spikes in recall activity across specific periods. This allows us to monitor trends over time, revealing periods with high recall frequencies.</li><li><strong>Recall Reasons</strong>: A <strong>horizontal bar chart</strong> lists the top reasons for recalls, providing a quick view of the most common issues, such as undeclared ingredients or labeling errors. This breakdown helps pinpoint recurring problems that may need further investigation or intervention.</li><li><strong>Geographic Mapping</strong>: The <strong>map visualization</strong> plots recall volumes by U.S. states, visually showing the geographic distribution of recall events. This geographic insight is essential for understanding regional trends and identifying areas with higher recall activity.</li><li><strong>Categorical Breakdown by Firm</strong>: The <strong>pie chart</strong> shows recall counts by the company responsible, offering a categorical breakdown of recalls across different firms. This view is useful for identifying firms with frequent recalls, which may indicate systemic issues or highlight industry leaders in product quality control.</li></ul><p>This dataset does not cover a complete month, so the displayed data only reflects a portion of the most recent dates available. This partial date range may limit some of the trends observed in the visualizations.</p><p>Kibana’s intuitive UI and broad visualization options make it easy to explore the data from different perspectives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IaWlchokS2S9JCvdEnjYQ.png" /></figure><p>Code details can be found on my <a href="https://github.com/aakshatha02/automated-etl-with-elk">Github</a> page:</p><h3>Conclusion</h3><p>Building a data pipeline using Docker, Jenkins, Logstash, Elasticsearch, and Kibana showcases the strength of open-source tools in creating an efficient, automated ETL workflow. With Docker managing consistent environments, Jenkins automating scheduled tasks, Logstash transforming data, Elasticsearch storing it, and Kibana visualizing insights, we’ve constructed a scalable, repeatable solution for continuous data processing.</p><p>This setup not only simplifies data ingestion and transformation but also enables effective storage, search, and real-time visualization, making it adaptable to various data scenarios. The result is a low-maintenance, high-impact pipeline that allows teams to focus on insights rather than infrastructure.</p><p>If you have ideas for improving this setup or other optimizations I might try, please let me know — I’m always open to enhancing the solution for even better performance and flexibility!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a43235ad067" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Real-Time Data Streaming Pipeline with Kafka, Airflow, Cassandra, and Docker]]></title>
            <link>https://medium.com/@akshathakulal/building-a-real-time-data-streaming-pipeline-with-kafka-airflow-cassandra-and-docker-78692bdaed63?source=rss-2beb4b7f4ed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/78692bdaed63</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[real-time-streaming-data]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <dc:creator><![CDATA[Akshatha]]></dc:creator>
            <pubDate>Wed, 02 Oct 2024 17:39:38 GMT</pubDate>
            <atom:updated>2024-10-02T17:39:38.273Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s data-driven world, real-time data streaming is essential for processing large volume of data efficiently and making time-sensitive decisions. Weather its live updates, monitoring system events, or analysing clickstreams, business rely on the ability to collect, process, and store data as it flows in real time.</p><p>In this blog, I will take you through how I built real-time data streaming pipeline using popular technologies like Apache Airflow, Apache Kafka, Cassandra and Docker.</p><h4>Why Real-Time Data Streaming?</h4><p>Traditional batch processing frameworks like Hadoop or Spark were designed to process large chunk of data at intervals. This is great for certain use cases. But many modern applications require the ability to process the data as it’s created. This is where <strong>real-time data streaming</strong> comes into picture.</p><p>Imagine if we are building a system that pulls random user data from an external API. Instead of processing thousands of users at once i.e batch, we might want to process them as they are fetched i.e streaming. So that we have most up-to-date information at any given moment.</p><h4>Data-Streaming Workflow</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AXCxBHYdCHUyOrcfvCTX7w.png" /></figure><p>The architecture for this real-time data streaming pipeline includes the following key components:</p><p><strong>Apache Airflow: </strong>Apache Airflow is a powerful workflow management platform which allows to orchestrate tasks. In this setup, Airflow is used to schedule and trigger the process of fetching the random user data from an external API (<a href="https://randomuser.me/api/">https://randomuser.me/api/</a>), which is used as data source. PostgreSQL Database is used by Apache Airflow to store metadata such as Dag details, task history.</p><p>To initialise the airflow, install base package</p><pre>pip install apache-airflow</pre><p><strong>Fetching data with Airflow</strong>: The first part of the workflow involves Airflow triggering a task that fetches random user data from an external API. This API return details like name, location, email and more. Airflow handles scheduling and task execution, ensuring data is fetched regularly.</p><pre>def get_data():<br>    response = requests.get(&#39;https://randomuser.me/api/&#39;)<br>    data = response.json()<br>    return data[&#39;results&#39;][0]</pre><p>The <em>format_data() </em>function takes the raw JSON response from the API and structures it into a simplified format, adding a UUID to uniquely identify each record. This formatted data will be then sent to Kafka.</p><pre>def format_data(res):<br>    location = res[&#39;location&#39;]<br>    data = {<br>        &#39;id&#39;: str(uuid.uuid4()),  # Generate a unique ID<br>        &#39;first_name&#39;: res[&#39;name&#39;][&#39;first&#39;],<br>        &#39;last_name&#39;: res[&#39;name&#39;][&#39;last&#39;],<br>        &#39;gender&#39;: res[&#39;gender&#39;],<br>        &#39;address&#39;: f&quot;{location[&#39;street&#39;][&#39;number&#39;]} {location[&#39;street&#39;][&#39;name&#39;]}, &quot; <br>                   f&quot;{location[&#39;city&#39;]}, {location[&#39;state&#39;]}, {location[&#39;country&#39;]}&quot;,<br>        &#39;post_code&#39;: location[&#39;postcode&#39;],<br>        &#39;email&#39;: res[&#39;email&#39;]  <br>    }<br>    return data</pre><p><strong>Apache Kafka: </strong>Kafka is the backbone of the real-time data pipeline. It is a distributed message broker used to stream data between producers and consumers. Kafka ensures that the data flows smoothly from the source to the destination, while being able to handle high throughput and fault tolerance.</p><p>Kafka brokers (servers) coordinate with <strong>Zookeeper</strong>, which manages the distributed state and make sure the brokers functions correctly.</p><p>To connect to Kafka, we need to install Kafka package.</p><pre>pip install kafka-python</pre><p><strong>Streaming Data with Kafka: </strong>Once the data is fetched, it’s passed to Kafka. Here, Kafka acts as a buffer that can handle massive streams of data without bottlenecks. Kafka ensures that every message is available to consumers, even if they aren&#39;t ready to process it immediately.</p><p>Kafka producer is used to send messages to a Kafka topic called ‘user_data_generated’. A producer instance is created with the Kafka broker running on ‘broker:29092’.</p><pre>producer = KafkaProducer(bootstrap_servers=[&#39;broker:29092&#39;], max_block_ms=5000)<br><br>producer.send(&#39;user_data_generated&#39;, json.dumps(data).encode(&#39;utf-8&#39;))</pre><p>We can monitor these messages being sent to Kafka topic using Control Center.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AOzrS02Lw0f4VqP90AXsJQ.png" /><figcaption>Control Center Monitoring</figcaption></figure><p><strong>Cassandra: </strong>Cassandra is a NoSQL database known for its scalability and fault tolerance. Once the data flows through Kafka, it is consumed by a Python-based Kafka consumer and stored in Cassandra. Cassandra is optimised for writing large amounts of real-time data which makes great choice for this pipeline.</p><p>To communicate with Cassandra, we need to install Cassandra driver.</p><pre>pip install cassandra-driver</pre><p>Kafka consumer listens to the Kafka topic ‘user_data_generated’, processes the data, and stores it in a Cassandra database. Consumer connects to Cassandra database and ensures the keyspace and table exists and then data will be inserted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IBdpDPKjDpdvqfQnLaCpsg.png" /><figcaption>Streamed Data stored in Cassandra DB</figcaption></figure><p><strong>Airflow Dag Definition:</strong> In this pipeline, airflow dag has two tasks ‘send_message_to_kafka’ to send message to Kafka, and ‘consume_and_store_message’ to consume the data from Kafka and stores it in Cassandra. These two tasks ensure data is continuously ingested, streamed, and stored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LN8JdH3K3mGNyKrvrCjQ_A.png" /><figcaption>Airflow Dag Run</figcaption></figure><p><strong>Docker:</strong> Docker containerises each component, providing an isolated and consistent environment. Using Docker Compose, we can orchestrate all services, ensuring that Kafka, Airflow, Cassandra, Zookeeper, and other dependencies start correctly and are easy to manage. Docker’s portability makes it straightforward to run this pipeline anywhere-whether it’s your local machine or a cloud environment.</p><p>Docker ensures that all of these services are running their own containers, without conflicts. The Docker Compose configuration simplifies starting up all the services with a single command.</p><pre>docker-compose up -d</pre><p>Once we run this command, Docker launches Kafka, Zookeeper, Cassandra, Airflow and other dependencies, making it easy to manage everything in one place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQFUPfnPMHVJ1zSUGfPqHQ.png" /></figure><p>Complete Docker compose file is available on <a href="https://github.com/aakshatha02/Realtime-Data-Streaming">Github</a>.</p><p><strong>Conclusion</strong></p><p>Building a real-time data streaming pipeline can seem daunting, but with the right technologies it becomes much more manageable. In this project, we leveraged the strengths of Apache Kafka for streaming, Airflow for orchestration and Cassandra for storage. All these are containerised with Docker.</p><p>Full code can be found <a href="https://github.com/aakshatha02/Realtime-Data-Streaming">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78692bdaed63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of Data: How Everyday Decisions are Shaped by Numbers]]></title>
            <link>https://medium.com/@akshathakulal/the-power-of-data-how-everyday-decisions-are-shaped-by-numbers-ab70138208e4?source=rss-2beb4b7f4ed0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab70138208e4</guid>
            <dc:creator><![CDATA[Akshatha]]></dc:creator>
            <pubDate>Mon, 22 Jan 2024 19:04:27 GMT</pubDate>
            <atom:updated>2024-01-22T19:04:27.599Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever notice how the things we pick and the shows we watch seem to know us so well? Well, that’s the magic of data quietly working behind the scenes. This post is all about how everyday decisions, from your morning coffee to your favorite TV series, are influenced by this digital wizardry.</p><p>In our fast-paced world, data is like a friendly guide, suggesting products we might like or shows we might enjoy. It’s the reason your favorite apps feel like they know you so personally. So, let’s take a closer look at this digital sidekick and see how it shapes our daily choices. Ready to dive into the world where data meets decision-making?</p><p><strong>Data in the Everyday</strong>:Imagine waking up, groggy and in need of a caffeine fix. As you stroll to your favourite coffee shop, you face the decision of choosing between a comforting latte and an adventurous cold brew. Little do you know, the menu options have been subtly influenced by the data collected from the preferences of regular customers.</p><p><strong>Data Touchpoints:</strong> Consider your nightly routine of scrolling through your streaming service. The movie or series suggestions you see aren’t random; they’re tailored based on your past viewing history, genre preferences, and even the time of day you usually watch. Each click and view becomes a data point, refining the recommendations over time.</p><p><strong>Personalization Algorithms:</strong> Ever wonder how Netflix knows you so well? Behind the scenes, sophisticated algorithms analyze your viewing habits, the genres you favor, and even how long you linger on certain titles. These algorithms continually adapt, learning from your interactions to serve up a personalized watchlist. Take Spotify, for example. Its recommendation system is fueled by algorithms that consider not only your listening history but also the songs you’ve liked and skipped. By understanding your musical taste intricacies, Spotify crafts playlists and suggests new tracks that align with your preferences.</p><p><strong>Consumer Profiles:</strong> When you explore an online store, every click, search, and purchase contributes to building your unique consumer profile. Businesses utilize this data to understand what products resonate with you, tailoring the shopping experience by showcasing items similar to those you’ve shown interest in before.</p><p><strong>Tailored Experiences:</strong> Think about your favorite e-commerce platform sending you personalized emails featuring products you might like. It’s not magic; it’s data-driven marketing. By analyzing your buying history and online behavior, businesses enhance your experience by presenting items they believe you’ll find appealing.</p><p>As we navigate the intricacies of modern living, understanding the role of data in our decision-making processes becomes increasingly crucial. This post serves as a reminder of the silent force that guides our choices and an invitation to explore the fascinating world of data that surrounds us. Now, armed with the knowledge of how data shapes our daily lives, take a moment to reflect on the last time you made a decision — big or small — and consider the unseen influence of the digital wizardry we often take for granted. The power of data is not just in the numbers; it’s in the choices we make every day</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab70138208e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>