<?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 Taibat Abowaba on Medium]]></title>
        <description><![CDATA[Stories by Taibat Abowaba on Medium]]></description>
        <link>https://medium.com/@adedola?source=rss-4c67f120d878------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L9AapjVmwfAOHEffcvEzbw.jpeg</url>
            <title>Stories by Taibat Abowaba on Medium</title>
            <link>https://medium.com/@adedola?source=rss-4c67f120d878------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 16:17:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adedola/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[Databricks - A Unified Data Platform]]></title>
            <link>https://medium.com/@adedola/databricks-a-unified-data-platform-d9c53ae6ecaa?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9c53ae6ecaa</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[databricks]]></category>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 10:21:01 GMT</pubDate>
            <atom:updated>2026-10-20T10:21:01.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_tSNl4WZRbmfPgDqRaodSw.png" /></figure><p><strong>On today’s episode of “What Taibat has been up to on her Data Engineering journey…”</strong></p><p>Hi, my friends. It’s me again. Today, we are learning <strong>Databricks 101. </strong>We will be doing a little bit of history, but first, let’s answer the most important question:</p><h3>What is Databricks, and what problem does it solve?</h3><p>Databricks is a <strong>unified data and AI platform</strong> that brings different data professionals into the same environment to work with data.</p><p>To understand the problem Databricks was trying to address, think of how data environments were traditionally set up. You could have data engineers working with raw data in a data lake, data analysts working with structured data in a data warehouse, and data scientists working with Python and machine learning tools somewhere else. The data would often have to move from one place to another. And with every movement came additional infrastructure, cost, complexity, and time.</p><p>Databricks was created to bring these different workloads closer together, allowing data engineers, data analysts, data scientists, and other data professionals to work with data within the same platform.</p><p>But to really understand <strong>why Databricks exists and the path that led to this solution</strong>, we need to take a step back.</p><h3>Before Databricks</h3><p>As the volume of data being generated increased, processing everything on a single machine became a problem. One machine has limited CPU, memory, and storage capacity. So, the idea became:</p><p><strong>What if we could split a large dataset into smaller pieces and process those pieces across multiple machines? </strong>This is where <strong>Hadoop</strong> and its <strong>MapReduce</strong> processing model became important.</p><p>Instead of:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QbW4F3k-W6s4o4yE8-Mi7w.png" /></figure><p>we could have:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z7NL_O0xxuOxfPDajLs-yw.png" /></figure><p>The <strong>Map</strong> phase processes pieces of the data, while the <strong>Reduce</strong> phase combines the results. This was a huge improvement because we were no longer depending on one machine to process everything. Instead, multiple machines could work on different pieces of the data at the same time.</p><p>This approach is known as <strong>distributed processing</strong>. But as data workloads became more complex, another problem became noticeable: <strong>speed</strong>.</p><p>Although MapReduce distributed the workload across multiple machines, it relied heavily on reading and writing intermediate results to disk between processing stages. As you can imagine, repeatedly reading from and writing to disk can be slow, especially when a job involves multiple stages or requires the same data to be processed repeatedly.</p><p>The industry needed a more efficient way to handle these workloads. And this is where <strong>Apache Spark</strong> came in.</p><h3>What came next?</h3><p>Apache Spark introduced a different approach to distributed data processing. Instead of repeatedly writing intermediate results to disk, Spark could keep data in memory when useful, reducing disk operations and speeding up certain workloads, particularly those that repeatedly process the same data.</p><p>In other words, we had moved from processing data on a single machine, to distributing the workload across multiple machines with MapReduce, and then to making distributed processing more efficient with Spark.</p><p>This made certain workloads, especially iterative workloads, significantly faster. So now we had:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*acAldz-bBcPV7EtOItZ8pg.png" /></figure><p>Great! But there was still another challenge.</p><h3>Who manages all this?</h3><p>Spark is a powerful processing engine, but running distributed processing infrastructure is not as simple as:</p><blockquote>“Install Spark and start processing data.”</blockquote><p>You still need to manage clusters, allocate compute resources, configure environments, schedule jobs, and ensure that all the different components work together.</p><p>This is where <strong>Databricks</strong> came into the picture. Founded by the original creators of Apache Spark, Databricks was built to make working with Spark and large-scale data workloads easier by providing a managed platform around them.</p><p>The idea was simple, let the platform handle much of the underlying infrastructure complexity so data teams can focus more on working with their data.</p><p><strong><em>You might have the same question I had at the time: “So… Databricks is basically Spark?” </em></strong>And the answer is <strong>not quite.</strong></p><p>Spark is a distributed processing engine. Databricks, on the other hand, is a broader data and AI platform that provides a managed environment for running Spark and working with different data workloads. But remember how I described Databricks as a <strong>unified data platform</strong>? What does <em>unified</em> actually mean?</p><p>To understand this, we need to look at how Databricks evolved beyond simply providing a managed environment for Spark-based processing.</p><p>Data engineers could work with Spark and Python. Data scientists could use Python and machine learning tools, while data analysts could work with SQL. Teams could also build data pipelines, schedule jobs, explore data in notebooks, create dashboards, and run other workloads within the same platform.</p><p><strong><em>Why does this matter?</em></strong></p><p>Because not everyone working with data speaks the same technical language. A data engineer might be comfortable with Python and Spark. A data analyst might primarily use SQL, while a data scientist might work extensively with Python and machine learning libraries. Despite their different tools and responsibilities, they often need to work with the same underlying data. <strong>So, why should these teams have to move between different platforms just to work with the same data?</strong></p><p>This is the problem the idea of a unified data platform aims to address. Rather than separating these workloads across disconnected environments, Databricks brings many of the tools and capabilities needed to work with data together in one platform.</p><p>This brings us to another important part of this Databricks 101 series: <strong>the Lakehouse architecture.</strong></p><h3>From Data Lake to Lakehouse</h3><p>Traditionally, organizations often had something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nfwfn9ZNVjvcj6aZgyIvTw.png" /></figure><p>The data lake was useful for storing large volumes of different types of data, while the warehouse was useful for structured and reliable analytical workloads. But there was a problem.</p><p>Data was sitting in different places, and moving data between these systems introduced additional cost and complexity.</p><p>The <strong>lakehouse</strong> concept emerged as an attempt to bring the best of both worlds together: the flexibility and scalability of a data lake with many of the reliability and analytical capabilities traditionally associated with a data warehouse. This is where <strong>Delta Lake</strong> becomes important.</p><p>Delta Lake is a storage and table layer that adds capabilities such as <strong>ACID transactions, schema enforcement, and data versioning</strong> to data stored in data lake environments.</p><p>In simple terms:</p><blockquote>A data lake gives you flexible storage. Delta Lake helps make the data stored there more reliable and manageable.</blockquote><p>This is a major part of what makes the Databricks lakehouse approach possible.</p><h3>Vendor Lock-In</h3><p>Another interesting part of the Databricks approach is its support for open technologies and formats.</p><p>With Databricks, your data can still live in cloud object storage such as Amazon S3, Azure Data Lake Storage, or Google Cloud Storage. You don’t necessarily have to move all your data into some proprietary Databricks storage system just to use Databricks.</p><p>This gives organizations more flexibility and can help reduce dependence on a single vendor.</p><h3>Databricks Core Architecture</h3><p>Now that we understand some of the <strong>why</strong> behind Databricks, let’s talk briefly about how Databricks itself is structured.</p><p>At a high level, you will hear about two major components:</p><ul><li><strong>Control Plane:</strong> Think of the control plane as the management side of Databricks. This is where Databricks manages things such as workspace related services, notebooks, jobs, permissions, and other platform-level operations.</li><li><strong>Data Plane:</strong> The data plane is where the actual compute used to process your workloads runs. This is where your Spark jobs, SQL workloads, and other data processing activities execute.</li></ul><h3>Roles in Databricks</h3><p>And because different people who work within a Databricks account need different levels of access, Databricks has different administrative roles and ownership concepts. Some of the ones I have come across include:</p><ul><li><strong>Account Administrator:</strong> Manages Databricks at account level</li><li><strong>Workspace Administrator:</strong> Manages a particular Databricks workspace, including workspace-level users, settings, and resources</li><li><strong>Metastore Administrator:</strong> Manages the metastore and aspects of data governance within Unity Catalog</li><li><strong>Owner:</strong> Has ownership and special permissions over a particular Databricks object or resource</li></ul><p>An Account Administrator operates at the account level. A Workspace Administrator operates at the workspace level. A Metastore Administrator operates at the metastore and data governance level. And an Owner is responsible for a particular resource.</p><p>And that brings us to the end of my <strong>Databricks 101</strong> journey, for now. Interested in connecting with me on LinkedIn? <a href="https://www.linkedin.com/in/taibat-abowaba/"><strong><em>Click Here</em></strong></a>. Until next time, be well….</p><p>#dataengineering #databricks #spark #hadoop #mapreduce</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9c53ae6ecaa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ORCHESTRATION — Apache Airflow 101]]></title>
            <link>https://medium.com/@adedola/orchestration-apache-airflow-101-2d9fdbf09391?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d9fdbf09391</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[orchestration]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <category><![CDATA[airflow]]></category>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 11:46:01 GMT</pubDate>
            <atom:updated>2026-04-01T11:46:01.302Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*kEyYTpghd33vKvFwWKWzjQ.png" /></figure><p>As a newbie in data engineering, one term among many that came up in almost every conversation and in books I read was <strong>orchestration</strong> and <strong>orchestration tools</strong>. At the time, I silently observed, wondered what they were all about and why they seemed so important.</p><p>If you’ve been following me for a while or have been on this journey with me, you already know I enjoy writing about data engineering concepts and tools, with a strong conviction that it will find its way to someone who needs clarity, just as I have always found articles that break things down simply whenever I feel stuck or a concept feels confusing. That’s why I’m here again, sharing.</p><p>Before diving into the tools, it’s important to first understand what the word <strong>Orchestration</strong> means both outside and within data engineering.</p><p>Let’s paint a scenario. Every day, before you go to bed, you pick up your notebook or notepad and write down a list of things to achieve the next day. Each task has its own bullet point, and you intentionally arrange them, some tasks must be done before others, while some can happen at the same time. That structure helps you stay in sync with your activities. The list guides you, ensuring that everything gets done, and more importantly, done in the right order and at the right time. After finishing your to-do list, you set an alarm, marking the time to start your day. In a simple way, this is orchestration.</p><h4>To give the word a more grounded meaning;</h4><p><strong>Orchestration</strong> is the process of coordinating, scheduling, and managing a set of interdependent tasks so that they run in the correct order and under the right conditions.</p><p>When you hear the word <em>orchestration</em>, picture these simple concepts:</p><ul><li><strong>Tasks:</strong> Each item on your to-do list</li><li><strong>Dependencies (Order of execution):</strong> Some tasks need to be completed before others</li><li><strong>Scheduling (When to start):</strong> The alarm clock that signals the right time to start your day</li></ul><p>Now, let’s bring this home to the world of data engineering.</p><p>As data engineers, you often build data pipelines, which involve ingesting data from a source, transforming the data, and then loading or serving it to downstream systems. Each of these steps depends on the previous one: data must be ingested before it can be transformed, and transformed before it can be served. The entire process is what we call a <strong>workflow</strong>, while each individual step of the workflow is called a <strong>task</strong>. One way to define and manage this workflow is using a <strong>DAG (Directed Acyclic Graph)</strong>, which specifies the tasks and the dependencies between them.</p><p>For tasks to be efficiently run in the correct order, manage their dependencies, and be scheduled so they aren’t manually executed each time, we rely on <strong>orchestration tools.</strong></p><h4>What is an Orchestration Tool?</h4><blockquote>An orchestration tool is a software system that automates orchestration. There are different types of orchestration tools. The most common one we will be discussing is <strong>Apache Airflow</strong>. Other types include Prefect, Flyte, Dagster, Kestra, and Metaflow.</blockquote><p>Let’s pause to explain what a <strong>DAG</strong> is in a bit more detail. This will help you follow and better connect with the rest of the article.</p><h4><strong>What is a DAG?</strong></h4><p>A DAG (Directed Acyclic Graph) represents a workflow or data pipeline. It can be as simple as a single task (e.g generating data), or as complex as hundreds or thousands of tasks, depending on the process. These tasks are not isolated, they are connected through dependencies, meaning some tasks must be completed before others can begin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2D8QH3-l-BzHtJg8EljuYw.png" /></figure><p>In practical terms, a DAG is a structured way to define and orchestrate tasks that need to run in a specific order and on a schedule. In Airflow, DAGs are defined with python code and visualized in the Airflow UI.</p><h4>DAG Components</h4><p>When defining your DAG in Airflow, there are important core components you must define in order for it to run:</p><ul><li><strong>The import statements:</strong> Define the specific operators or classes needed for the DAG</li><li><strong>The DAG definition:</strong> This is where you define your DAG, dag_id to uniquely identify it, the schedule (run intervals), start date, and other configurations</li><li><strong>The DAG body:</strong> This is where tasks are defined using the specific operators they will run</li><li><strong>The dependencies:</strong> This is where the order of execution of tasks is defined using the right bitshift operator (&gt;&gt;) and the left bitshift operator (&lt;&lt;).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWNSe4qChDjtqDHMvDp9_w.png" /></figure><h3>Apache Airflow…</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nsLz1cCZlcMEIQss08zyKw.png" /><figcaption>Apache Airflow GUI</figcaption></figure><p><strong>Apache Airflow</strong> is an open-source orchestration tool used to programmatically author, schedule, manage, and monitor workflows. In simple terms, it helps you define data pipelines using code. To add, Airflow provides a GUI where you can monitor workflows, track task progress, view logs, and trigger or manage DAG runs manually.</p><blockquote><strong>Please Note:</strong> This GUI is mainly for visibility into what is happening behind the scenes. It is not used to define or author workflows; all workflows are created programmatically in code.</blockquote><h4>Why Airflow?</h4><p>Again, why Airflow?. Orchestration tools like Airflow define workflows as Python code, which gives them a strong advantage of:</p><ul><li><strong>Version Control:</strong> Workflows can be tracked and rolled back to previous versions</li><li><strong>Collaboration:</strong> Multiple developers can work on the same workflow simultaneously</li><li><strong>Backfilling:</strong> You can rerun pipelines on historical data</li><li><strong>Testing:</strong> You can write tests to validate pipeline logic</li><li><strong>Scheduling:</strong> Easily define complex pipelines and run them at regular intervals</li></ul><h4>Why Not Airflow?</h4><p>For every pro, there’s a con. While Airflow is powerful, there are scenarios where it may not be the best fit:</p><ul><li><strong>Streaming Pipelines: </strong>Airflow is built for batch processing. Streaming pipelines, where data is processed in real time as it is generated, do not align well with Airflow’s scheduling model</li><li><strong>ClickOps / UI-driven workflows: </strong>Airflow is code-first. If your use case relies heavily on drag-and-drop or UI-based workflows, Airflow may not be the most convenient option</li></ul><p>For every tool, there are core components that power what we see on the surface. So, what exactly goes on under the hood in Apache Airflow? What are its core components? At a high level, Airflow is made up of a few key components that work together to execute your workflows:</p><ul><li><strong>Metadata Database:</strong> Stores all information about your workflows. Airflow relies heavily on this to keep track of everything</li><li><strong>Scheduler:</strong> The brain of Airflow. It continuously checks your DAGs and decides what should run and when based on schedules and dependencies</li><li><strong>Executor:</strong> Defines how tasks are run</li><li><strong>Queue:</strong> Determines the order in which tasks are executed</li><li><strong>Workers:</strong> Responsible for the actual execution of tasks</li><li><strong>DAG File Processor:</strong> Parses DAG files and extracts task definitions for the scheduler</li><li><strong>Triggerer:</strong> Handles asynchronous, event-based tasks. For example, if a task needs to wait for a file, instead of a worker staying idle, the Triggerer defers the task, monitors the condition in the background, and resumes execution once the condition is met</li><li><strong>API Server:</strong> Enables interaction with Airflow programmatically</li></ul><p>All of these components work hand in hand to orchestrate workflows. How does that work? Let’s build a mental model of how everything fits with the image below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZSKdCzpSOMNASC8wCI1viA.png" /></figure><ul><li><strong>User:</strong> The user, the one who wants to make life simpler and daily workflows seamless by having them orchestrated, lol. The user starts by creating a DAG folder</li><li><strong>DAG Folder:</strong> This is where DAG files are stored. This folder serves as the location Airflow looks into (parses) to discover DAGs</li><li><strong>DAG Files:</strong> These are Python files (.py) where your workflows are defined programmatically</li><li><strong>DAG File Processor:</strong> This component parses the DAG folder, scans the files to ensure DAG components are correctly defined, then serializes the extracted information and sends it to the metadata database</li><li><strong>Metadata Database:</strong> This is where the serialized data is stored. It serves as the central store for all information about your workflows (DAG runs, task states, logs, etc.).</li><li><strong>Scheduler:</strong> The scheduler continuously reads from the database and decides what should run and when, based on schedules and dependencies</li><li><strong>Executor:</strong> Once the scheduler identifies tasks to run, it passes them to the executor. The executor determines how the tasks should be executed, whether sequentially or in parallel</li><li><strong>Queue:</strong> After the executor determines how tasks should run, they are placed in a queue in the order of execution</li><li><strong>Worker:</strong> Worker pick tasks from the queue and execute them accordingly. You could have more than one worker</li><li><strong>API Server:</strong> The results of task executions are sent back to the metadata database via the API server. The Airflow GUI then reads from this database to provide visibility into DAG runs, task instances, and overall workflow status</li></ul><p>In this episode, we have covered orchestration, orchestration tools, the different types of orchestration tools, and focused on one type, <strong>Apache Airflow.</strong> We also explored the pros and cons of Airflow, its core components, DAGs, DAG components and how Airflow runs DAGs.</p><p><em>If you found this article helpful, do well to leave a clap, share with your data engineer buddies. Connect with me on </em><a href="https://www.linkedin.com/in/taibat-abowaba/"><strong><em>LinkedIn</em></strong></a><em>. Until next time, be well….</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d9fdbf09391" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux — Beyond the command lines.]]></title>
            <link>https://medium.com/@adedola/linux-beyond-the-command-lines-47358294bf22?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/47358294bf22</guid>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[kernel]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Sat, 13 Dec 2025 16:32:14 GMT</pubDate>
            <atom:updated>2025-12-13T16:32:14.707Z</atom:updated>
            <content:encoded><![CDATA[<h3>Linux — Beyond the command lines.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J2pORqEZarGBD19eEf7Lnw.png" /></figure><p>It took me a minute to finally settle with this tittle, I had a couple of options <strong>[“Linux — The noise in the background”, “Linux — Under the hood”, “Linux — The Quiet Power Underneath”, “Linux — Beyond surface level”]. </strong>I just wanted something that says “In-depth”.</p><p>From the title options I listed, you probably already have a sense of what this article is about. In my last article <a href="https://medium.com/@adedola/version-control-git-github-efaf82f266e1"><strong><em>Read here</em></strong></a>, I explained version control, the basics of git and GitHub. Today, we will take it a step further to explain Linux but first, let me share an Interesting fact, Linux and Git were built by the same person “<strong>Linus Torvalds”</strong> That’s why some of their commands would feel so similar to you. It’s different worlds, speaking a similar language.</p><blockquote>Although, this article isn’t about memorizing commands. It’s about understanding origin of Linux, getting to the root of how things work in Linux, What happens when you type your commands, why Linux?. The goal is to understand Linux <em>beyond the commands</em>.</blockquote><p>Let’s start from the basic, a computer. We all know what a computer is, but I’ll still go over it. A computer as we all know is an electronic device that takes input from users, process data according to a set of instructions, outputs the data and stores the data internally. Now, for this device to do all of these, it relies on two components which are the <strong>hardware and software</strong>, without these two, a computer is basically just a scrap of metal and circuits with no use. Let’s get to understand these components clearly;</p><h4><strong>Computer Hardware &amp; Software</strong></h4><p><strong>Hardware,</strong> as the name implies, refers to the physical components of a computer. These are the parts you can touch and feel. The hardware is generally grouped based on what they do. Some of them are used to send information into the computer, like the keyboard and mouse. Others are used to display information back to you, such as the monitor or printer. There are also storage components like SSDs and memory cards that hold your data. Finally, there are the <strong>processing components</strong>, the CPU and RAM, which are responsible for actually carrying out instructions when requests are sent.</p><p><strong>Software</strong>, on the other hand, refers to the programs or instructions that tell the hardware what to do. The software interacts with the hardware (processing component) to perform specific tasks. It translates what we write in a human readable form (like code or commands) into what the hardware understands which is machine language or binary (low-level programming language).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*YILV9XX4zo0rRR1cgKp0RQ.png" /></figure><h4>There are two types of Software:</h4><ul><li><strong>System Software:</strong> The system software is like a babysitter that manages the computer’s hardware and ensures everything runs smoothly. It communicates directly with the hardware to execute tasks according to a set of instructions. Example includes <strong>Windows, macOS, Linux, and Android... </strong>they are called <strong>Operating Systems </strong>(a type of system software)</li><li><strong>Application Software:</strong> Application software is a collection of executable codes written in high- or low-level language. They are designed to perform a specific task for the user. Example includes <strong>WhatsApp, Chrome, Twitter, Slack etc</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*snUuHmp6Zb7Xt2MAtMyitQ.png" /></figure><p>Our main focus here is operating system, specifically, a type of operating system <strong>Linux</strong>. So, let’s take a deeper dive.</p><p>Operating systems are broadly grouped into two families;</p><ul><li><strong>The Microsoft NT descendants:</strong> This includes systems like Windows and Xbox OS, all built on Microsoft’s NT architecture</li><li><strong>The Unix lineage:</strong> Pretty much everything else traces its roots back to Unix, including macOS, Linux, Android, and Chrome OS</li></ul><p>Let’s get into a little backstory on Linux,<strong> </strong>how it came about and what it really stands for.</p><p>Back in the late 1960s, Unix was created as a powerful multitasking operating system. It became the foundation for many systems we know today but wasn’t freely available for everyone to use or modify. In response, Richard Stallman started the GNU Project in the 1980s, aiming to build a completely free and open-source operating system. GNU provided many tools like the system library, compiler, shell etc. but lacked a kernel, the core part that connects hardware and software.</p><p>Then came Linus Torvalds, a Finnish computer science student, who in 1991 developed his own kernel built on the foundation of Unix as a personal project. He released it for free, inviting others to contribute and improve it (Open source). <strong>This kernel became what we now call</strong> <strong>“Linux”. </strong>However, this kernel couldn’t function on its own, it needed the tools and utilities provided by GNU to become a complete system. When the Linux kernel was combined with GNU’s tools, it formed a fully functional operating system, what we commonly call Linux today (or more accurately, GNU/Linux), often described as a Unix-like operating system.</p><blockquote>So basically, Linux can be described as an open-source, Unix-like operating<strong> </strong>system built around the Linux kernel.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*DdLbfQRziFOtgIEsZcOQpA.png" /></figure><p>Before diving into Linux architecture, it’s important to clarify these three terms that often get mixed up <strong>Shell</strong>, <strong>Bash</strong>, and <strong>Terminal</strong>. Understanding these will make the explanation of the different layers of the architecture much easier to follow</p><h4>Difference between Shell, Bash and terminal</h4><p>These three terms can often be confusing because they sound like they do the same thing, but they are not the same. Here’s a breakdown..</p><ul><li><strong>Terminal:</strong> The interface where you type your human readable Linux commands</li><li><strong>Shell:</strong> A GNU tool that interprets the commands you type in the terminal and sends them to the kernel for execution</li><li><strong>Bash (Bourne Again Shell):</strong> A type of shell. Other examples of shells include zsh, fish, and dash</li></ul><p>Now that we have these three terms clear in our minds, let’s get into understanding Linux architecture.</p><h4>Linux Architecture</h4><p>What goes down under the hood? how does commands flows? Below is a simple diagram of Linux architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*IklA4zBEMIE5BEXToDRYwA.png" /></figure><h4>Application Layer</h4><p>The Application Layer is where it begins. These are the programs or tools you interact with. At this layer, all you need to do is provide an input, your instruction, in a human readable format. The application receives that input and sends it somewhere else so your request can be processed. But where exactly does it send it, and how does that set of instructions actually get processed?</p><p>The image above gives examples of application layer like Docker, Airflow, and Chrome. Another very familiar example is the terminal. The terminal also serves as an application layer tool in cases where you are directly typing commands to interact with the shell (Like when you type “pwd” to print current working directory). While the terminal doesn’t execute the commands itself, it acts as the interface through which your instructions reach the shell and eventually the kernel</p><h4>Operating system</h4><p>This is where Linux comes in. Before we get to the kernel, the core of the operating system and the component that actually sends your requests to the hardware, let’s recall the tools and utilities provided by GNU, such as the shell and the system libraries.</p><p>As explained earlier, the <strong>shell</strong> translates your human-readable commands into a form the kernel can understand. The <strong>system libraries</strong> on the other hand, act as helpers; they provide reusable functions that applications or the shell can call instead of interacting with the kernel directly. Once an instruction reaches the kernel, the <strong>kernel</strong> processes it and communicates directly with the hardware to perform the task.</p><h4>Hardware</h4><p>This is the last layer of the architecture. All the commands translated by the shell eventually reaches the hardware. But what does the hardware actually do? For example, if you want to list the files in a directory or create a new directory, your request goes from the terminal to the shell, then to the kernel, and finally to the hardware. The hardware processes the instructions and sends the output back so you can see the result.</p><h4>What Happens when you type a command</h4><p>Here is something important to keep in mind; <strong>in Linux, everything is treated as a file</strong>. Files, folders, commands, and even processes, they’re all represented as files.</p><p>That might sound confusing (it confused me at first too), but the idea becomes clearer when you think of a file simply as data or a collection of data that has a name. And since data can be anything, text, code, instructions, configuration, Linux treats them all as files.</p><p>Now, Linux comes with something called <strong>file systems</strong>. In simpler words, file systems <strong>manage your files</strong>. They help the operating system understand where a file is, how big it is, who owns it, and when it was created. Without a file system, your storage device would just be one big pile of raw data, no structure, no way to find or save files properly. Let’s take a look at Linux file system and the folders (files) that comes with Linux</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*7mK-mv78BVZ6OkgiDAHPuA.png" /></figure><p>Each of these folders (files) organizes and stores data for specific needs and use. For example, /bin holds the everyday commands you type in the terminal, the ones that are needed for basic operations.</p><p>So, what actually happens when you type a command?. Here’s the flow in simple terms:</p><ol><li><strong>You type a command in the terminal</strong><br>The terminal doesn’t execute anything, it simply sends your input to the shell</li><li><strong>The shell receives your command</strong><br>It checks the file system to locate the command (which is actually a file containing binary executable instructions)</li><li><strong>The shell executes/translates the command file</strong><br> That command (now found as a binary executable) is run. During execution, it may call system libraries for additional functions or support</li><li><strong>The shell passes the instruction to the kernel</strong><br>The kernel is the only component allowed to directly interact with hardware</li><li><strong>The kernel communicates with the hardware</strong><br>The hardware carries out the actual work, reading data, writing data, allocating memory, printing output, etc</li><li><strong>The result is sent back up the chain</strong><br> Kernel → Shell → Terminal → You</li></ol><p>And that’s how your instruction gets executed, step by step, from typing a command to getting your result.</p><p><strong>Why Should Data Engineers Understand or Use Linux?</strong><br>Now that we understand what Linux is and how it works, it’s important to see why data engineers should learn to use it.</p><ul><li><strong>Security:</strong> Linux is known for its strong security features, making it a reliable choice for handling sensitive data.</li><li><strong>Lightweight:</strong> It uses fewer system resources, which means it runs efficiently even on machines with limited power.</li><li><strong>Open Source:</strong> Being open source means it’s free to use and constantly improved by a global community of developers.</li><li><strong>Portability:</strong> Linux can run on almost any machine — from personal laptops to powerful cloud servers.</li><li><strong>Versatility and Customization</strong></li></ul><h4>How can you work with a Linux OS Environment?</h4><p>As you now know that Linux is basically just a kernel and needs other utilities like GNU to become a complete operating system. Well, there are companies and communities that package these components together, providing users with a ready-to-use Linux environment. This complete package (the combination of the Linux kernel, GNU tools, and other necessary software) is what we call a <strong>Distribution</strong> or simply a <strong>Distro</strong>. Example include <strong>Debian, Ubuntu, Fedora, Red Hat e.t.c.</strong></p><p>There are different ways to work with a Linux operating system:</p><ul><li><strong>Install a Linux Distribution Locally: </strong>You can install a Linux distro like Ubuntu, Fedora, or Debian directly on your computer and use it as your main operating system. Alternatively, if you don’t want to replace your Windows OS completely, you can install it through <strong>Windows Subsystem for Linux (WSL)</strong> to run Linux alongside Windows</li><li><strong>If You’re a Mac User: </strong>You don’t need to install a separate Linux system, macOS is Unix-based, which means it already behaves very similarly to Linux under the hood</li><li><strong>Connect to a Remote Server: </strong>Another common way is by connecting to a remote Linux server. Think of it as a virtual computer that runs Linux somewhere else (often in the cloud). You can access it through <strong>SSH (Secure Shell), </strong>this lets you log into the server from your terminal and run Linux commands</li></ul><p>If you’ve read up to this point, I believe you now have a clearer and deeper understanding of Linux beyond just writing commands. If you found this article helpful, give it a like, drop a comment, and most importantly, share it with your data buddies. You can connect with me on LinkedIn <a href="https://www.linkedin.com/in/taibat-abowaba/"><strong>Taibat Abowaba</strong></a><strong> </strong>. <strong><em>Until next time, be well….</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47358294bf22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Version control, Git, Github.]]></title>
            <link>https://medium.com/@adedola/version-control-git-github-efaf82f266e1?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/efaf82f266e1</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[version-control-system]]></category>
            <category><![CDATA[version-control]]></category>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 15:22:36 GMT</pubDate>
            <atom:updated>2025-10-01T15:22:36.964Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ly8WzY965aT7p_X5Tec-9w.jpeg" /></figure><p>Put a finger up if you’ve ever saved your project files as <em>“Final”</em>, <em>“Final Final 1”</em>, or even <em>“Officially Final”</em> just because you kept making changes and wanted to keep different versions safe. Yeah… I see hands up, mine inclusive.</p><p>Okay, Let’s dive into understanding <strong>version control</strong>, <strong>Git</strong>, and <strong>GitHub, </strong>and why they’re a lifesaver for anyone working on projects, big or small.</p><p>What is Version Control?…</p><p>Version control, also called <em>source control</em>, is the practice of tracking and managing changes to your source code over time. Think of it like a history log where every change is recorded. With version control, you can review what was changed, see who made the change (in team projects), and even roll back to an earlier version whenever you need to.</p><p><em>Now, how do we actually keep track of changes in actual sense?. </em>This is where <strong>Version Control System (VCS)</strong> comes in. Version Control System is a software that manage and keep track of changes that happens to a file overtime, it also provides us with the luxury of rolling back to a previous version of a file. There are types of version control systems;</p><ul><li><strong>Centralized Version Control System:</strong> In a centralized system, there is a single central server that stores all the files and their version history. Team members connect to this central server to get the latest version, make changes, and commit updates. Think of it as one shared source of truth that everyone works with. The downside? It has a <em>“single point of failure”</em>. If the central server goes down, no one can access the latest version, older versions, or make any changes until the server is back online. Examples of Centralized VCs; <strong>Subversion (SVN), Perforce, and Concurrent Versions System (CVS)</strong></li><li><strong>Decentralized/Distributed Version Control System: </strong>In decentralized system, each contributor has a copy, version and history of the file in their local machine, this way, collaborators can make changes, roll back to a previous version and work independently before merging or pushing updates to a shared remote repository. Example of Decentralized VCs ; <strong>Git</strong></li></ul><p><strong>Now, let’s dive into the most popular type of version control system: Git.</strong><br>From what we’ve discussed so far, you already have a sense of what Git is. But just to reiterate, Git is a version control system that tracks and manages changes to your source code/code/files. It allows you to roll back to previous versions if needed, and it also makes collaboration easy, multiple contributors can work on the same project independently and then merge their changes together.</p><p>Another powerful feature of Git is <strong>branching</strong>, which allows you to create separate versions of a project to test or develop new features without interrupting the main project. For example, imagine your manager asks you to make changes to the company’s application’s interface. Instead of changing the main application directly (and risking breaking it), you create a <strong><em>development branch</em></strong> where you safely make and test your updates. Once everything works fine, you merge your branch back into the main project. This way, you avoid disrupting the entire application just to implement one change.</p><p>There are three main ways to interact with Git, depending on your preference</p><ul><li><strong>CLI (Command Line Interface):</strong> This is the most common way developers interact with Git, by typing commands directly into a command line interface. It gives you full control and flexibility. Examples of common CLI used; Git Bash, Terminal &amp; Command prompt</li><li><strong>GUI (Graphical User Interface):</strong> These are applications that provide a visual interface for Git. Instead of typing commands, you click buttons and menus. It’s beginner-friendly and easier to visualize changes. Examples; GitHub Desktop, Sourcetree</li><li><strong>IDE (Integrated Development Environments):</strong> Modern IDEs like VS Code, IntelliJ, or PyCharm come with Git integration built-in. This means you can write your code and manage version control in the same environment without switching tools</li></ul><p>In the process of version control and in other for git to effectively track your files, there are stages they go through, let’s look into these stages (git lifcycle/workflow) then we look into some of the important commands that help achieve these. To make it easier to understand and visualize, i will explain the commands while explaining the stage of the lifecycle they help achieve</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Er5iORYjTcMXtUyFRipy3g.png" /><figcaption>Git lifecycle/workflow</figcaption></figure><p><strong>mkdir:</strong><br>Before starting any project, you need a directory (commonly called a folder). This is where all your project files will live. In the Git lifecycle, this directory is referred to as the <strong><em>working directory</em></strong>. To create a new folder, in your CLI, you write:</p><pre>mkdir your-folder-name</pre><p><strong>cd:</strong><br>After creating a working directory, the next step is to move into that folder. You can think of this as <em>opening the folder</em> so you can start working inside it. In your CLI, you write:</p><pre>cd your-folder-name</pre><p><strong>git init</strong>:<br>Once your project folder is ready and you’re inside your working directory, the next step is to tell Git to start tracking it. This is the <strong><em>initialization stage</em> </strong>in the Git lifecycle, where Git sets up everything it needs to manage versions of your files. In your CLI, you write:</p><pre>git init</pre><p>Think of it as saying: <em>“Hey Git, set up your tools here so you can start watching my files and changes”. </em>Behind the scenes, Git creates a hidden folder called .git inside your directory. This folder is where Git stores all the history, versions, and tracking information for your project.</p><p><strong>touch:</strong><br>This command is used to create new files in your working directory. These are the file(s) you want to keep track of. The file(s) can be of any format, for example, .txt, .py.In your CLI, you write:</p><pre>touch my_file.py</pre><p><strong>git add:</strong><br>After creating your files and initializing, the next step is to prepare those files for tracking. git add moves your file(s) from the <em>working directory</em> into the <strong><em>staging area</em></strong> (as shown in the lifecycle diagram above). You can think of this as telling Git, <em>“Put these files in a basket, I want them included in the next snapshot”. </em>Don’t worry about the word <em>snapshot</em> yet, I’ll explain in a bit. To do this, in your CLI, you write</p><pre>git add my_file.py</pre><p><strong>git commit:</strong><br>Once your file(s) are staged, the next step is to save a snapshot of them in Git’s history. This is called a <strong>commit</strong>. Think of it as telling Git, <em>“lock in this version of this file or each of these files (if the file in your staging area is more than one) so I can always come back to it later.”</em></p><pre>git commit -m &quot;my first commit&quot;</pre><p>Now, your file(s) are now being tracked, any changes that happen to your file(s) afterwards, git is aware of them. Remember, all of these are still in your local repository (your machine).</p><p>After this is done, you can choose to host your project in a <strong>remote repository</strong>. A remote repository is like saving your work in the cloud (Github for example), it makes your project accessible anywhere and allows others to see it or collaborate with you.</p><p>Now, how do you move your project from a local directory to a remote directory?. I think this is the part I explain GitHub. <strong>GitHub</strong> is a cloud-based platform where your Git repositories are hosted so you can collaborate with others. It provides a <strong>GUI (Graphical User Interface) </strong>meaning instead of typing commands, you can click buttons to see commits, branches, pull requests, and more.</p><p>But here’s something important to remember: <strong>GitHub is not a version control system.</strong> Git is the version control system that actually tracks changes, manages versions, and allows you to roll back to earlier states. GitHub only provides a place to store your repositories online.</p><p>Back to the question: <strong>“How do I move my project from a local repository to a remote repository?”. </strong>This is done by using a command called <strong>git push</strong>.</p><p><strong>git push:</strong><br>This command tells Git, <em>“Take the commits I’ve made in my local repository and send them to a remote repository (like GitHub)”. </em>But before you can push, you first need to connect your local repository to a remote one. That means you must first create a repository on GitHub. Once that’s done, you link it to your local project using:</p><pre>git remote add origin https://github.com/your-username/your-repo.git</pre><p>Here’s what each part means:</p><ul><li><strong>remote add:</strong> Tells Git you’re connecting to a remote repository</li><li><strong>origin: </strong>The standard name Git gives your remote repository</li><li><strong>URL: </strong>The link to your GitHub repository</li></ul><p>After connecting, you push your files with:</p><pre>git push origin main</pre><p>In a case where you make changes on your remote repository, do not forget to signal your local repo of the changes made. This ensures your local project stays in sync with the remote repository. You do this with:</p><pre>git pull origin main</pre><p>We’ve discussed how to work independently with Git, but collaboration is where version control really shines. With <strong>distributed version control systems (DVCs)</strong> like Git, you can easily contribute to projects, whether it’s at work, with friends, or in the open-source community. Let’s look at two common scenarios and how you can contribute in each.</p><h4>Scenario 1: Contributing as a Collaborator</h4><p>In a work setting or when working with friends on a joint project, you are usually added as a <strong>collaborator</strong>. Being a collaborator means you have <strong>write access</strong> to the repository. Here’s how collaboration typically works in this case:</p><p><strong>Clone the repository</strong> to your local machine.</p><pre>git clone github-url</pre><p>Typically, what this does is download the version of that repo into your local repository, you can then create a new branch to work with, make changes you want and since you’re a collaborator, you can push changes directly to the repo.</p><h4>Scenario 2: Contributing to an Open-Source Project</h4><p>When contributing to open-source projects, you’re usually not a collaborator. This means you don’t have write access. In this case, what you do is <strong>fork</strong> the repo, which creates a copy under your own account (a remote repo). You then clone your fork, make the changes you want locally, and then push them back to your fork. After that, you open a <strong>pull request</strong>, and the project maintainers review your work before deciding whether to merge it into the main repository.</p><p>I believe we’ve been able to cover the fundamentals so far. Of course, there’s still so much more you can do with Git, and many more commands to explore as you grow more comfortable with it. To give you a handy reference, I’ll leave a simple Git cheat sheet below. I hope you’ve found this article helpful. Until next time, <em>be wel</em>l….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sKSPQEt5UKADIk-vVpTwig.png" /><figcaption>Git cheat sheet.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efaf82f266e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pandas Codebase.]]></title>
            <link>https://medium.com/@adedola/pandas-codebase-fed0539a0a4a?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/fed0539a0a4a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[package]]></category>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Wed, 02 Jul 2025 10:46:51 GMT</pubDate>
            <atom:updated>2025-07-02T10:46:51.552Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BGVCp5qssUsra8NpZv9nmw.png" /><figcaption>image generated by ChatGPT</figcaption></figure><p>There is a saying that goes <strong>“To be a good writer, you have to be a good reader”</strong>, same goes to programming; to write better codes, you have to read codes. The past week I was tasked with reading a script and explain what the code does, you can read <a href="https://github.com/Adedola52/Python-code-reading-"><strong><em>here</em></strong></a>. I then took it a step further by reading <strong>pandas codebase</strong>, and I must say, I have a lot to say. At first, everything looked super confusing. So, I started by focusing on parts of the codebase that felt familiar. That made it easier to navigate and understand what was going on.</p><p>While I haven’t finished reading the entire codebase, I’d love to share some of the things I’ve learned along the way:</p><h4><strong>1. Pandas as a package:</strong></h4><p>One of the first things I noticed when I started reading the Pandas codebase was this:</p><blockquote>“Pandas is a package, so why does VSCode IntelliSense say it’s a module?”</blockquote><p>That question led me to do some digging, and here’s what I found. When you run an import statement in Python, the interpreter goes through the directory structure to figure out whether it’s dealing with a <strong>package</strong>, <strong>subpackage</strong>, or <strong>module</strong>. What confirms that a directory is a package is the presence of a special file called __init__.py.</p><p>Think of __init__.py as the <strong>door to a building</strong>. It’s presence signals that there&#39;s an entire structure (the package) behind it, and it’s also the entry point to access what’s inside. Every package or subpackage in Python must contain an __init__.py file. This file plays a crucial role by making other components like subpackages, modules, classes, functions, and methods accessible. When you import a package, Python actually runs the content of it’s __init__.py file.</p><p>This is why tools like VSCode might display it as a module: because what’s being executed and what gives access to the rest is that special file.</p><h4>2. <strong>Raise:</strong></h4><p>raise is used to intentionally trigger an exception in your code. It <strong>stops the program immediately</strong> and <strong>throws an error</strong>, even if the code could have continued. This is useful when you want to <strong>enforce a rule</strong> or <strong>warn the user</strong> that something isn&#39;t allowed. It’s different from try-except, where you handle errors that <strong>might happen unexpectedly</strong>. For example:</p><pre>def raise_error(a, b):<br>    if b == 0:<br>        raise ZeroDivisionError(&quot;Number cannot be divisible by 0&quot;)<br>    else:<br>        division = a/b<br>return division</pre><p>In the code above, If b == 0, we <strong>raise</strong> a ZeroDivisionError on purpose with a message: &quot;Number cannot be divisible by 0&quot;. Otherwise, it divides a by b and returns the result.</p><h4>3. <strong>Error Handling:</strong></h4><p>Okay, so I’ve been using try and except to handle errors and that has been it. While reading the Pandas codebase, I realized there’s more to error handling than I initially thought, I discovered you can actually use a try block <em>inside</em> an except block. At first, this looked strange, but it makes sense when you think of it as giving your code a second chance before completely giving up.</p><p>Here’s a simple example to illustrate:</p><pre>try:<br>    # Try to open the primary file location<br>except FileNotFoundError:<br>    try:<br>        # If that fails, try opening from a backup location<br>    except FileNotFoundError:<br>        # If that also fails, then raise an exception</pre><p>While continuing through the codebase, I also came across another structure that used else and finally along with try and except. I looked it up, and here’s how they work:</p><pre>try:<br>    # Run this block of code<br>except Exception:<br>    # Run this if an exception is raised<br>else:<br>    # Run this only if no exception occurred in the try block<br>finally:<br>    # This block will run no matter what — whether there was an exception or not </pre><p>It’s important to note that you can <strong>mix and match</strong> these blocks to suit the specific needs of your code. You don’t always need to use all of them, just the ones that make sense for your particular use case.</p><h4>4. <strong>Helper Functions/Classes:</strong></h4><p><strong>Helper functions/classes</strong> are small, reusable functions that perform specific tasks and are usually used <strong>within larger functions or programs</strong> to keep the code clean, organized, and readable. They are not the “main” logic, but they support it, hence, the name <em>“helper” </em>Think of them as assistants that handle smaller jobs so that your main code doesn’t get too cluttered.</p><p>Funny enough, I’ve come across helper functions and classes so many times, I’ve even written them myself. But it wasn’t until when i was reading pandas codebase that I realized, <em>“Ohhh… so this is what they’re actually called”</em></p><p>This might seem like a small or irrelevant detail, but trust me, you don’t want to be in a situation where you’re using something regularly and then hear it mentioned, only to look completely clueless because you didn’t know that’s what it is called.</p><p>Here is an illustration of how it is written for better understanding:</p><pre>def add_two_numbers(a, b):<br>    return a + b<br><br>def main():<br>    result = add_two_numbers(5, 3)<br>    print(&quot;The sum is:&quot;, result)<br><br>main()</pre><ul><li>add_two_numbers() is the <strong>helper function,</strong> it just does one job, adds two numbers</li><li>main() is the main logic, it uses the helper to keep things clean and simple</li></ul><h4>5. <strong>Special variable __all__:</strong></h4><p>The __all__ variable is a <strong>special variable</strong> that you’ll often find in the __init__.py file, the same special file we talked about earlier. It comes into play when you use an import statement like this:</p><pre>from package_name import *</pre><p>Now, this kind of import (import *) is generally discouraged because it can lead to <strong>unexpected behavior, </strong>especially when you&#39;re not sure what exactly is being imported.</p><p>This is where __all__ becomes useful. It acts as a <strong>whitelist</strong>, explicitly defining which functions, classes, variables, modules, or subpackages are safe to expose when import * is used.</p><p>Even if there are other items in the package, anything not listed in __all__ won’t be imported, including non-public elements (which I’ll explain in the next section). Here’s a quick demonstration of how __all__ is written in code:</p><pre>def calculate_sum(a, b):<br>    return a + b<br><br>class DataCleaner:<br>    pass<br><br>def _helper_function():<br>    pass<br><br>__all__ = [&#39;calculate_sum&#39;, &#39;DataCleaner&#39;]</pre><p>In this example:</p><ul><li>Only calculate_sum and DataCleaner will be imported if someone uses from module_name import *</li><li>_helper_function is not included in __all__, so it will be ignored even though it exists in the file</li></ul><h4><strong>6. Single Underscore Prefix vs Double Underscore Prefix:</strong></h4><p>You’ve probably come across a module, class, variable, method, or function that starts with a single underscore (_) and maybe just ignored it, not realizing that it’s actually trying to <strong>communicate something important</strong>. Well, I’m glad to explain what that is and why it matters.</p><p>A <strong>single underscore prefix</strong> is used to indicate that an element is <strong>non-public</strong>. It’s basically a <strong>gentle hint</strong> to developers:</p><blockquote><em>“Hey, this part of the code is meant for internal use, please don’t touch it unless you know what you’re doing”</em></blockquote><p>It doesn’t enforce any restrictions (you can still access it), but it <strong>signals</strong> that the element might change, behave differently, or be unstable if used outside its intended context.</p><p>Now, a <strong>double underscore prefix</strong> (__) is a bit different. While a single underscore is just a convention, a <strong>double underscore actually triggers name mangling</strong> in Python. What does that mean? Python changes the name of the variable or method behind the scenes to make it harder to access from outside the class. It’s not bulletproof privacy, but it’s Python’s way of saying:</p><blockquote><em>“This is </em><strong><em>very private, </em></strong><em>don’t access it directly”</em></blockquote><p>Here’s a simple example to explain the difference:</p><pre>class Example:<br>    def __init__(self):<br>        self.public = &quot;I’m public&quot;<br>        self._semi_private = &quot;I’m non-public (just a hint)&quot;<br>        self.__very_private = &quot;I’m name-mangled&quot;<br><br>obj = Example()<br>print(obj.public)            # Accessible<br>print(obj._semi_private)     # Accessible, but meant to be internal<br>print(obj.__very_private)    # Will raise AttributeError</pre><p>Trying to access __very_private directly will raise an error. But behind the scenes, Python renames it like this:</p><pre>print(obj._Example__very_private)  # This works</pre><p>Name mangling becomes especially useful in the context of <strong>inheritance</strong>. It helps avoid name clashes between a parent class and its subclasses and makes private attributes harder to accidentally override or access.</p><p>When you use a double underscore prefix (like __balance) in a class, Python <strong>name-mangles</strong> it, meaning it renames the attribute internally (e.g., to _ClassName__balance). This prevents subclasses from unintentionally modifying or overriding it.</p><h4>Why Name Mangling Matters</h4><p>In inheritance, a subclass might define a method or variable using the same name as one in the parent class. Without name mangling, this could lead to <strong>naming conflicts</strong> and bugs that are hard to trace.</p><p><strong>With name mangling:</strong></p><ul><li>The base class keeps its internal logic protected.</li><li>Subclasses can define their own variables with the same names <strong>without interfering</strong> with the parent class.</li><li>This adds a layer of safety to your code, especially in large or collaborative projects.</li></ul><p>If you found this helpful and learnt one or two things, do well to leave like and leave a comment. You can also connect with me on <a href="https://www.linkedin.com/in/taibat-abowaba/"><strong>LinkedIn</strong></a></p><p>#dataengineering #data #pandas #codebase</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fed0539a0a4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Table Expression (CTE) & Recursive CTE.]]></title>
            <link>https://medium.com/@adedola/common-table-expression-cte-recursive-cte-e986806d7897?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/e986806d7897</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[recursion]]></category>
            <category><![CDATA[cte]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Thu, 01 May 2025 11:29:12 GMT</pubDate>
            <atom:updated>2025-05-01T19:49:29.303Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wsxmuHi2MS61JgcYrMWzNA.png" /></figure><p>If your search for understanding CTE and recursive CTE landed you here, welcome!. Fun fact, when I first learned about CTEs, i was completely lost. The explanations got me so confused. Then I discovered you could write multiple CTEs in one query… and boom, double confusion.</p><p>But here’s the good news, once you understand the flow, CTEs (even recursive ones) become one of your best friends in SQL. And in this post, I’ll break it down as simply and clearly as possible, just like I wish someone had done for me back then. We’ll slow things down and walk through everything together with clear explanations and practical examples to help you understand confidently. <strong><em>Ready? Let’s go!</em></strong></p><p>When working with SQL, you’ll often need to structure your queries efficiently and in a way that is easy to read and maintain. One of the key tools that can help you do this is called a <strong>Common Table Expression (CTE)</strong>.</p><p><strong>What is a CTE?</strong></p><p>A <strong>CTE (Common Table Expression)</strong> is like a temporary result set or you can think of it as a <em>virtual table</em> that you define within a query. You can reference this temporary result just like a real table: join it with other tables, use it multiple times in your query, or even chain it with other CTEs.</p><p>The key thing to remember: a CTE only exists for the duration of the query. Once the query ends, the CTE disappears unless redefined.</p><blockquote><em>CTEs are similar to subquery but compared to subqueries, CTEs offer better structure, readability, and maintainability. They’re easier to label, debug, and reuse especially in complex logic chains.</em></blockquote><p><strong>Using CTEs with DML Statements (SELECT, INSERT, UPDATE, DELETE)</strong></p><p>CTEs are commonly used with SELECT statement, but you’ll be happy to know that CTEs also work seamlessly with DML (Data Manipulation Language) statements: INSERT, UPDATE &amp; DELETE.</p><p><strong><em>The main difference?</em></strong></p><ul><li><strong>SELECT</strong> retrieves data.</li><li><strong>INSERT, UPDATE &amp; DELETE </strong>modify the content of your tables.</li></ul><p>So, when you use CTEs with these DML statements, you’re not just reading data, you’re <strong>manipulating</strong> real records in actual tables.</p><blockquote>Reminder: Changes made with insert, update or delete inside a CTE affect the source table directly.</blockquote><p>Understanding the syntax of a Common Table Expression (CTE) makes it way easier to use effectively. Let’s start by breaking down the basic syntax with a simple example. Once that’s clear, we’ll move on to writing multiple CTEs in a single query.:</p><blockquote><strong>Note:</strong> The syntax used in this article follows <strong>SQL Server</strong> conventions. It might vary slightly across other relational database systems (like PostgreSQL, MySQL, or Oracle), but the core logic remains the same.<br>Be sure to adjust the syntax accordingly based on the RDBMS you’re working with.</blockquote><p><strong>WITH: </strong>Every CTE starts with the WITH keyword. This signals that you&#39;re about to define a temporary result set.</p><p><strong>cte_name: </strong>This is the name you give your CTE. It can be anything that makes sense in the context like recent_orders, premium_customers, or even simply cte. You’ll use this name to reference the CTE in the same query.</p><p><strong>AS:</strong> This keyword is used to assign the query that defines the CTE. Think of it like saying, <em>“Here’s what this CTE should contain”. </em>The query must be enclosed in parentheses immediately after AS. That query is the heart of the CTE it holds the logic or data that your CTE will return.</p><p><strong>SELECT (inside the CTE): </strong>This is your actual query enclosed in a parenthesis assigned by <strong>AS</strong>. It works just like any normal SELECT, you filter, join, or transform data however you want. Whatever this SELECT returns becomes the temporary result set — the content of your CTE.</p><p><strong>What Happens After the CTE?</strong></p><p>Once the CTE is defined, you can write another query <strong>outside the CTE but in the same SQL statement</strong>. This is where you:</p><ul><li>Query the CTE using a SELECT</li><li>Use it to UPDATE or DELETE records</li><li>Even INSERT into another table based on it</li></ul><p><strong>SELECT with CTE (for data retrieval):</strong></p><p>Suppose you want to retrieve customers who made a recent purchase greater than 500:</p><pre>WITH recent_orders AS (<br>  SELECT * FROM orders WHERE order_date &gt;= &#39;2024-01-01&#39;<br>)<br>SELECT * FROM recent_orders WHERE total_amount &gt; 500;</pre><p><strong>UPDATE with CTE</strong></p><p>Suppose you want to activate all users who are currently inactive:</p><pre>WITH inactive_users AS (<br>  SELECT id FROM users WHERE is_active = 0<br>)<br>UPDATE users<br>SET is_active = 1<br>FROM inactive_users<br>WHERE users.id = inactive_users.id;</pre><p><strong>DELETE with CTE</strong></p><p>Let’s say you want to delete log entries older than 6 months:</p><pre>WITH old_logs AS (<br>  SELECT id FROM logs WHERE created_at &lt; DATEADD(month, -6, GETDATE())<br>)<br>DELETE FROM logs<br>WHERE id IN (SELECT id FROM old_logs);</pre><p><strong>INSERT with CTE</strong></p><p>Now, imagine you want to add customers who spent more than $1,000 to a premium_customers table:</p><pre>WITH big_spenders AS (<br>  SELECT user_id, total_spent FROM orders_summary WHERE total_spent &gt; 1000<br>)<br>INSERT INTO premium_customers (user_id, spent)<br>SELECT user_id, total_spent FROM big_spenders;</pre><p>Remember how I mentioned that moment I discovered you could use multiple CTEs in one query and how that totally threw me off?. Now let’s talk about using multiple CTEs but this time, in a way that won’t leave you feeling as lost as I was.</p><p>Trust me, once you get the hang of it, you’ll be chaining CTEs like a pro and writing queries that are not only cleaner, but also more efficient and easier to debug. Let’s dive in.</p><p>There’s something interesting about using multiple CTEs. Depending on the logic or the solution you’re working on, the contents of your CTEs can either pull from the same table or different tables. Stay with me , let me explain how this works, and how you can leverage it to write powerful queries.</p><p>There are <strong>2 key ways</strong> multiple CTEs can be used or queried:</p><ol><li><strong>Parallel/Independent CTEs: </strong>Multiple CTEs can be written independently and then linked together through joins. Each CTE runs in parallel, meaning it works with its own data set and doesn’t depend on the others. Once the CTEs are defined, you can join them in the final query to combine the results.</li></ol><p><strong>Example: Finding Active Users Who Have Purchased Electronics</strong></p><p>Let’s say you’re working for an <strong>e-commerce platform,</strong> and you need to generate a report that shows <strong>active users</strong> who have purchased <strong>electronics</strong>. You need to know the <strong>username</strong>, the <strong>electronics product name</strong>, and the <strong>date of purchase</strong>.</p><p>To solve this, we have data spread across three different tables:</p><ul><li>The Users table, which contains details about all users and their statuses.</li><li>The Orders table, which contains information about each order, including its status and the user who made the purchase.</li><li>The Products table, which lists all the products, including the category each product belongs to.</li></ul><p>The goal here is to find <strong>active users</strong> (those whose status is marked as “active”), who have made a <strong>purchase</strong> (from the orders table), and the product purchased must be in the <strong>electronics category</strong> (from the products table).</p><p>Here’s how the <strong>multiple CTEs</strong> help us achieve this:</p><pre>WITH <br>ActiveUsers AS (<br>    SELECT user_id, user_name FROM users WHERE status = &#39;active&#39;<br>),<br>CompletedOrders AS (<br>    SELECT order_id, user_id, order_date FROM orders <br>    WHERE order_status = &#39;completed&#39;<br>),<br>ElectronicsProducts AS (<br>    SELECT product_id, product_name FROM products <br>    WHERE category = &#39;electronics&#39;<br>)<br><br>SELECT ActiveUsers.user_id, ActiveUsers.user_name, <br>       ElectronicsProducts.product_name, CompletedOrders.order_date<br>FROM ActiveUsers<br>JOIN CompletedOrders ON ActiveUsers.user_id = CompletedOrders.user_id<br>JOIN ElectronicsProducts ON CompletedOrders.product_id = ElectronicsProducts.product_id;</pre><p>Let’s take another example where we pull data from the same table, this is to further visualize how cte works depending on your criteria.</p><p>In the next example, we’re working with a sales table and want to compare revenue from <strong>online</strong> vs <strong>in-store</strong> sales.</p><pre>WITH OnlineSales AS (<br>    SELECT sale_date, SUM(amount) AS online_revenue<br>    FROM sales<br>    WHERE channel = &#39;online&#39;<br>    GROUP BY sale_date<br>),<br>InStoreSales AS (<br>    SELECT sale_date, SUM(amount) AS instore_revenue<br>    FROM sales<br>    WHERE channel = &#39;in-store&#39;<br>    GROUP BY sale_date<br>)<br>SELECT o.sale_date, o.online_revenue, i.instore_revenue<br>FROM OnlineSales o<br>JOIN InStoreSales i <br>ON o.sale_date = i.sale_date<br>ORDER BY o.sale_date;</pre><ul><li>Onlinesales and Instoresales are two <strong>independent CTEs</strong>, both pulling from the same sales table<strong>.</strong></li><li>Each CTE filters on a different channel.</li><li>In the final query, we join them by sale_date to compare online and in-store revenue side by side.</li></ul><p><strong>2. Chained CTEs (One CTE builds on another)</strong></p><p>Think of chained CTEs like building blocks or steps in a recipe, each one prepares the data a little more until you’re ready to serve the final result.</p><p>In this approach:</p><ul><li>The <strong>first CTE</strong> handles the base logic (e.g., filtering rows, selecting a subset, or doing calculations).</li><li>The <strong>second CTE</strong> then uses the result of the first CTE as its input.</li><li>You can keep going, building each new CTE on top of the last, just like a chain.</li></ul><p>Each CTE depends on the one before it, so they <strong>must be written in order</strong></p><p>Now, let’s find out which users are spending the most on high-value transactions, where a high-value transaction is any transaction with an amount greater than 100.</p><pre>WITH HighValueTransactions AS (<br>    SELECT * FROM transactions WHERE amount &gt; 100<br>),<br>UserSpending AS (<br>    SELECT user_id, SUM(amount) AS total_spent<br>    FROM HighValueTransactions<br>    GROUP BY user_id<br>)<br>SELECT * FROM UserSpending<br>ORDER BY total_spent DESC;</pre><ul><li><strong>HighValueTransactions</strong> pulled records of users who made individual transactions over $100.</li><li><strong>UserSpending</strong> built on that by summing up the total amount each user spent on these high-value transactions.</li><li>Finally, the main query retrieved the user details, and their total spend from the <strong>UserSpending</strong> CTE.</li></ul><p>Remember, multiple CTEs are super handy for complex queries so keep them close.</p><p>Now that we have a solid understanding of CTEs and their syntax, let’s dive deeper into recursive CTEs and explore how they work with data that has self-referencing relationships, like parent-child structures, in hierarchical queries. To help you imagine this better, let me give you a simple example you can visualize:</p><ol><li><strong>Think of a Family Tree: </strong>Let’s say we have a child named Sarah.<br> Sarah’s mum is Mary.<br> Mary’s mum is Jane.</li></ol><p>We could represent this in a table where each row has a <strong>person</strong> and their <strong>parent</strong>. Now imagine you want to trace Sarah’s family tree all the way up to her ancestors. That’s exactly what <strong>recursive CTEs</strong> help you do. Start from Sarah and keep walking up the parent chain until there’s no one left.</p><p>2. <strong>Or in a Company: </strong>You might have a table where each employee has a manager — and that manager also has a manager. Recursive CTEs help you pull <strong>all levels of that structure</strong> — from intern to CEO.</p><p>Recursive CTEs are powerful for querying data with <strong>layers</strong> — like reporting lines, folders within folders, or categories within categories. Once you see it like this, it becomes way easier to understand what’s going on. Now, let me explain how <strong>recursive CTE syntax</strong> helps in achieving this.</p><p>Recursive CTEs work in <strong>two parts</strong>:</p><ul><li>A <strong>base</strong> query: This query retrieves information that is used to start the recursion process</li><li>The <strong>recursive</strong> query: This query references the base query to retrieve information, and it keeps repeating and building on the result until it reaches the termination condition (where it has nothing left to query).</li></ul><p>Now, let’s give a practical example of how the syntax is written. Imagine you want to <strong>display numbers from 1 to 10</strong> without using any in-built function like <strong>generate_series()</strong>. With a <strong>recursive CTE</strong>, this becomes super easy. Here’s how the query looks:</p><pre>WITH RECURSIVE numbers_cte AS (<br>    -- Base: Start with 1<br>    SELECT 1 AS num<br>    UNION ALL<br>    -- Recursive: Add 1 to the previous number until we reach 10<br>    SELECT num + 1<br>    FROM numbers_cte<br>    WHERE num &lt; 10 -- (termination condition) --<br>)<br>SELECT * FROM numbers_cte;</pre><ul><li><strong>WITH: </strong>Just like regular CTEs, it all begins with the WITH keyword.</li><li><strong>RECURSIVE: </strong>This tells SQL, “Hey, we’re about to run a query that repeats itself until a stopping point.”</li><li><strong>numbers_cte: </strong>This is simply the name you’re giving to your CTE. It can be anything meaningful, like employee_hierachy or category_levels. You’ll reference it inside the recursive part.</li><li><strong>AS: </strong>Think of this as saying: “Here’s what should go inside our recursive CTE.” The query goes inside parentheses right after this.</li><li><strong>BASE QUERY: </strong>This is where it all starts. It provides the first row(s) for recursion to build on. In an example where you want to count from 1 to 10, the base would just return 1.</li><li><strong>RECURSIVE QUERY: </strong>This part takes the output(s) from the previous step and builds on it. Each new result adds to the last. For instance, adding 1 each time to the previous result.</li><li><strong>UNION / UNION ALL: </strong>This joins the base and recursive outputs. Use UNION<strong> </strong>if you want to eliminate duplicates, or UNION ALL<strong> </strong>to keep everything.</li><li><strong>STOP CONDITION: </strong>It stops when the recursive query no longer returns results, for example, when it reaches 10 (in the example above, we indicated the stop condition as ‘where num &lt;10’). Without a stop condition, the recursion keep running till infinity.</li></ul><p>Let’s go even further to give a real-world example.</p><p><strong>Use Case</strong>: Suppose you’ve been asked to find all employees under a manager named <strong>‘Asha’ </strong>not just direct reports, but also the people reporting to her team, and so on… basically, the full <strong>employee hierarchy starting with Asha</strong>.</p><p>Here’s how to solve it in SQL:</p><pre>WITH employees_hierarchy AS (<br>       SELECT id, name, manager_id, designation from emp_details<br>       where name = &#39;Asha&#39; -- base query --<br>       UNION ALL<br>       SELECT emp.id, emp.name, emp.manager_id, emp.designation <br>       FROM emp_details emp -- recursive query --<br>       JOIN employees_hierarchy eh <br>       ON eh.id = emp.manager_id -- stop condition --<br>)<br>SELECT * FROM employees_hierarchy;</pre><ul><li>The <strong>base query</strong> finds Asha’s record.</li><li>The <strong>recursive part</strong> looks for anyone whose manager_id matches Asha’s id, then continues the same for each new result.</li><li>The process <strong>repeats</strong> until there are no more employees down the line.</li></ul><p>And that’s a wrap on CTEs and Recursive CTE. Hopefully, this article has cleared up the basics and inspired you to try them out in your own SQL queries. Thanks for reading.</p><p>If you have questions or curious about more advanced SQL topics, drop a comment or connect with me <a href="https://www.linkedin.com/in/taibat-abowaba/"><strong><em>here</em></strong></a> I’d love to hear your thoughts and help where I can.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e986806d7897" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[50 Days of SQL.]]></title>
            <link>https://medium.com/@adedola/50-days-of-sql-5746e005e456?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/5746e005e456</guid>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Mon, 14 Apr 2025 17:47:25 GMT</pubDate>
            <atom:updated>2025-04-14T17:47:25.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mE2nfBAVtcBwfO1SFudkBg.png" /></figure><p><strong>Today, I concluded a 50-day SQL challenge.</strong><br>A challenge that started unintentionally, almost randomly. I had worked almost all night and was waiting for <em>Fajr</em> (morning prayer). I didn’t want to go back to bed, so to keep myself busy, I decided to treat a LeetCode SQL problem. After solving it, I thought, <em>“Why not share this and maybe turn it into a daily challenge?”</em> And just like that, what was meant to be a one-time post became a 50-day journey of growth, discipline, and self-discovery.</p><p>To be honest, it has been an incredible yet sometimes overwhelming experience. Before this challenge, I was someone who preferred to build in private. I’ve always considered myself a consistent person, but showing up publicly? That was a different type of consistency, one I wasn’t used to. Not because I wasn’t enjoying the problems or tired of solving them, but because I was deeply comfortable in my shell. The sudden attention and engagement from the posts were beautiful… but also a little overwhelming.</p><p>Still, this experience taught me one of the simplest yet most valuable lessons, <strong>Sometimes, the only thing you need to do is just show up.</strong><br>Whether you’re feeling confident or unsure, motivated or not, showing up is what moves the needle. If you’re someone who struggles with consistency, let this be a reminder that it doesn’t always start with motivation. It starts with a simple decision to be present.</p><p>What made showing up easier were the kind and encouraging messages, the likes, the comments, and even the unexpected opportunities — gigs and collaborations that came out of this. But most of all, the people who told me my consistency inspired them to start their own challenges… That meant everything to me. You all reminded me that impact doesn’t have to be loud it just has to be consistent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*_50RcOnBvVJZCZuxA6RIag.png" /><figcaption>One of many feedback i recieved.</figcaption></figure><p>So, I just want to say <strong>thank you.</strong> To everyone who interacted, shared, or even silently followed the journey, you played a part in helping me break out of my shell and embrace the idea of building in public.</p><p>This isn’t a farewell; it’s just the beginning of what’s next. More showing up. More building. More sharing. Because I’ve realized, this isn’t just about SQL or solving problems, it’s about pushing past comfort zones, choosing growth daily, and inviting others to do the same.</p><p><strong>See you soon…….</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5746e005e456" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding ALL, ALLSELECTED & ALLEXCEPT in DAX]]></title>
            <link>https://medium.com/@adedola/understanding-all-allselected-allexcept-in-dax-bc8356aab47e?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc8356aab47e</guid>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Wed, 12 Mar 2025 18:22:29 GMT</pubDate>
            <atom:updated>2025-03-12T18:22:29.610Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*3-LKecgFvWQ7394hSo_d0w.png" /></figure><p>There was a time when I struggled to understand <strong>ALL, ALLSELECTED, and ALLEXCEPT</strong> in DAX. If you’re in the same boat, this article is for you! I’ll break down these concepts with practical examples to make them easier to grasp. So, without further ado, let’s dive in.</p><p><strong>What is ALL, ALLSELECTED &amp; ALLEXCEPT?</strong></p><p>Imagine having full control over how filters impact your calculations. When working with data, filters are naturally applied, but do you want them to affect your results or not? These functions help you manage the filter context, deciding which filters to keep or ignore/remove when performing calculations. This is especially useful when you need more control over data aggregation.</p><blockquote>“ALL”, “ALLSELECTED”, and “ALLEXCEPT” are DAX functions used to manipulate filter context within calculations, with the key difference being how they handle removing filters.</blockquote><p><strong>ALL</strong><br> This function ignores or removes all filters from the specified table or column, ensuring that calculations consider the entire dataset, regardless of any applied filters. In other words, <strong>ALL</strong> removes both internal and external filters. <strong>Example:</strong> If you want to calculate total sales without considering any filters applied in a report or visual, you would use <strong>ALL</strong> to ensure the calculation includes all data points.</p><p>For instance, if we want to calculate the <strong>percentage distribution</strong> of railway journey statuses, we need the total number of journeys. The formula would be:</p><p>% distribution = Journey count for each status ÷ Total number of Journeys</p><p>See the images below for a detailed breakdown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*GBvyvRlHkbMmpLWwI551yg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*gm4x_E8eimMJ8ffJDARS_g.png" /></figure><p>We can then further find the percentage distribution. See image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*y_NqzvQMUTDZVkrfyrSKuA.png" /></figure><p><strong>ALLSELECTED</strong><br>This function ignores/removes filters but only within the selection made by the user, meaning it respects <strong>external</strong> filters but ignores/removes <strong>internal</strong> ones applied within a visual. It is useful when you want to perform calculations that consider only the selected portion of the dataset, rather than the entire dataset. <strong>Example: </strong>If we want to calculate the percentage distribution of railway journey statuses but only within a selected date range, we need the total number of journeys <strong>within the selected period</strong>.</p><p>For instance, if a user applies a date filter from <strong>Jan 2024 to March 2024</strong>, <strong>ALLSELECTED</strong> will still consider this filter but ignore/remove any additional filters inside a table or visual. The formula would be:</p><p>% distribution = Journey status for each category ÷ Total journeys in the selected period</p><p>This ensures that percentages are calculated only within the user’s selected range instead of the entire dataset. See image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*zvEJLSEVCvI-ENzheiZyuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ejXXWmaqrlSEqTI2kAM4Xw.png" /></figure><p><strong>ALLEXCEPT</strong><br> This function ignores/removes filters from all columns <strong>except</strong> the ones you specify. It allows you to keep certain filters while ignoring others, making it useful when you want calculations to respect specific filters but not the rest. <strong>Example:</strong> If we want to calculate the percentage distribution of railway journey statuses while keeping only the date filter applied, we need the total number of journeys <strong>grouped by date</strong> but ignoring any other filters like ticket class or ticket type.</p><p>For instance, if a user filters by ticket class and date, but we only want the calculation to respect the date filter while ignoring the ticket class filter, we use <strong>ALLEXCEPT</strong> to remove all filters <strong>except for date</strong>.</p><p>The formula would be:</p><p>% distribution = Journey status for each category ÷ Total journeys for the selected date</p><p>This ensures that the percentage is calculated while keeping the date filter active but ignoring other filters like ticket class or ticket type. See image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*XYKPZA5DerZS96iKHn_W2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GlLnDAoFQFj5pRwg9IIhVA.png" /><figcaption>The second image will be explained further below.</figcaption></figure><p>The second image above displays the result without any external filters, which is why all three functions may appear to return the same outcome. See the images below to observe how the results change when filters are applied.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xIIAr-4EwOvKdgrgJEKRvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hsT53lXJxpLeztA7y4aUHQ.png" /></figure><p>In the first image, the table was filtered only by date, causing both the DAX formulas using the ALLSELECTED and ALLEXCEPT functions to return the same result. This happens because, at this level of filtering, each function behaves according to its rule. However, in the second image, where the table was filtered by both ticket class and date, the results differ. ALLSELECTED now reflects the additional filter, while ALLEXCEPT retains only the date filter, as specified in the DAX formula.</p><p>If you found this helpful, connect with me on<strong><em> </em></strong><a href="https://www.linkedin.com/in/taibat-abowaba"><strong><em>LinkedIn.</em></strong></a></p><p>#dataanlysis #dax #daxfunction #filters #datascience</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc8356aab47e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Granularity.]]></title>
            <link>https://medium.com/@adedola/data-granularity-d8ba107dd236?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8ba107dd236</guid>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 16:20:05 GMT</pubDate>
            <atom:updated>2025-01-11T16:20:05.290Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gvRaht0QGXVmEmJqDsIZlw.png" /></figure><p>Recently, I was working on a dataset and kept wondering why it wasn’t detailed enough. It struck me that if the dataset were more detailed, my analysis could yield more accurate and packed insights. I could see the potential for the dataset to offer richer insights if only the information it contained were more ‘granular.’</p><p>At the time, I didn’t know there was a specific term for what I was thinking until I came across a post by Nancy Amadi on <strong>data granularity</strong>. Suddenly, it all clicked. I decided to dive deeper to understand what data granularity means, the types of data granularity, the characteristics that defines the level of granularity and why it is important to us as data professionals.</p><p>Today, I’m excited to share what I’ve learnt, hoping this might resonate with someone else, just as Nancy’s post resonated with me.</p><p><strong><em>What is data granularity?</em></strong></p><p>Simply put, <strong>data granularity</strong> is the measure of the level of detail present in a dataset or data structure. It reflects how finely or coarsely the data is captured and recorded.</p><p><strong><em>Type of data granularity</em></strong></p><ul><li><strong>Fine granularity </strong>(high level of detail)<strong>: </strong>These are data that are simplified to the lowest form and cannot be broken any further. This granularity allows for more precise insights and can reveal nuances that aggregated data might obscure. Now, think of a raw data. A raw data happens to be at its most granular level as it cannot be broken any further. A sales transactional data is at finest granularity as each row is a specific sale with a timestamp, product, and quantity sold.</li><li><strong>Coarse granularity </strong>(low level of detail)<strong>: </strong>These are summarized data. Think of a sales transactional data but on a daily basis as each row is summarized into total sales per product per day.</li></ul><p><strong><em>Characteristics that define the level of granularity:</em></strong></p><ul><li><strong>Level of details:</strong> Fine-grained captures individual events or transactions while Coarse-grained groups data into broader summaries or aggregates.</li><li><strong>Time intervals:</strong> Fine-grained are recorded at short intervals (e.g. seconds, minutes) while Coarse-grained are recorded at long intervals (e.g. days, months, years, decades)</li><li><strong>Aggregation level: </strong>Fine-grained are raw and unaggregated while Coarse-grained are summarized.</li><li><strong>Data volume: </strong>Fine-grained have larger volume due to high detail while Coarse-grained have smaller volume as records are summarized.</li></ul><p><strong><em>Why is Data Granularity Important?</em></strong></p><p>The level of data granularity determines what analysis can be performed on the data, and whether results from that analysis lead to appropriate conclusions. In data analysis, granular data plays a crucial role in uncovering insights that drive strategic decisions. By examining data at a granular level <strong>(fine granularity)</strong>, analysts can identify trends, correlations, and anomalies that may not be visible in summarized datasets <strong>(coarse granularity)</strong>. This level of detail is particularly valuable in fields such as marketing, finance, and healthcare, where understanding individual behaviors and outcomes can lead to more effective strategies and interventions.</p><p>I hope you found this helpful.</p><p>Connect with me on <a href="https://www.linkedin.com/in/taibat-abowaba/"><strong>LinkedIn</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8ba107dd236" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bank of America Customer complaints: Trends and Resolutions.]]></title>
            <link>https://medium.com/@adedola/bank-of-america-customer-complaints-trends-and-resolutions-20a576e4c6d8?source=rss-4c67f120d878------2</link>
            <guid isPermaLink="false">https://medium.com/p/20a576e4c6d8</guid>
            <dc:creator><![CDATA[Taibat Abowaba]]></dc:creator>
            <pubDate>Mon, 09 Dec 2024 08:32:20 GMT</pubDate>
            <atom:updated>2024-12-09T19:31:17.547Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*wpBn4-N6RZ92NxzXkVxMBA.jpeg" /></figure><p><strong>BACKGROUND</strong></p><p>Bank of America is one of the largest financial institutions in the world, headquartered in Charlotte, North Carolina, USA. It provides a broad range of banking and financial services to individuals, businesses, and institutional clients.</p><p><strong>AIM &amp; OBJECTIVE OF THIS PROJECT</strong></p><p><strong>Aim:</strong><br>To analyze customer complaints to uncover insights that will enhance customer satisfaction, improve products, and strengthen customer retention for Bank of America.</p><p><strong>Objective:</strong><br>In today’s competitive banking landscape, especially with the rise of Fintech companies, staying ahead requires addressing customer needs effectively. Retaining customers and ensuring their satisfaction depend on listening to their concerns and resolving complaints promptly. This project focuses on analyzing customer complaints to provide insights on the following key areas and more:</p><ul><li><strong>Identify top products</strong> that generate the highest number of complaints to understand which areas require immediate attention.</li><li><strong>Understand common issues</strong> faced by customers to identify pain points and areas for improvement.</li><li><strong>Analyze geographic patterns</strong> to determine which states or regions are generating the most complaints, enabling targeted interventions.</li><li><strong>Examine the most frequently provided solutions</strong> to complaints to assess the effectiveness of Bank of America’s response strategies.</li><li><strong>Identify customer communication channels</strong> used most for lodging complaints, allowing for better allocation of resources and communication strategies.</li></ul><p>By addressing these areas and carrying out a more detailed analysis, Bank of America can focus on improving products, making customer service easier to access, and developing strategies to enhance the overall customer experience.</p><p><strong>ABOUT THE DATASET</strong></p><p>The dataset was obtained from Maven Analytics and contains 6 <strong>years 4 months (May 2017 -Aug 2023) </strong>of customer complaints records. It includes <strong>62.52k rows</strong> and <strong>12 columns</strong>, providing detailed information to help analyze trends and patterns in customer complaints.</p><p><strong>CREATING A CALENDAR TABLE</strong></p><p>A Calendar Table was created using DAX in Power BI. This is essential for time-based analysis as it ensures smooth use of time slicers and filters, helps identify trends across different periods of the year, and enhances report performance compared to using raw date columns. Additionally, it acts as a central link between date columns in multiple tables, ensuring consistent relationships and accurate results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zl_BacAcD-XJuFt1YmzL1w.png" /></figure><p><strong>DATA MODELING</strong></p><p>A relationship was established between the complaints table and the date table to ensure seamless analysis, allowing efficient filtering and accurate time-based insights across the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n_QZHYl-iGSdj30JJfbdAA.png" /></figure><p><strong>Key Metrics</strong></p><ul><li><strong>Product:</strong> Overall number of products identified in consumer complaints.</li><li><strong>Sub-Product:</strong> Total number of sub-products identified in consumer complaints.</li><li><strong>Issue:</strong> Total number of issues consumers identified in their complaints.</li><li><strong>Sub-Issue:</strong> Total number of sub-issues identified by consumers in their complaints.</li><li><strong>Complaints:</strong> Overall complaints received by Bank of America from consumers between May 2017 - Aug 2023.</li><li><strong>Platform:</strong> The total number of platforms through which consumers communicated their complaints.</li><li><strong>Avg. day submission:</strong> The average number of days it took for complaints submitted to the CFPB to be forwarded to Bank of America.</li><li><strong>State:</strong> The total number of states from which complaints were received.</li></ul><p><strong>ANALYSIS AND FINDINGS</strong></p><h4>General Trends:</h4><ol><li><strong>Top Products</strong>:</li></ol><ul><li><strong>Checking or Savings Account</strong>, <strong>Credit Card or Prepaid Card</strong>, and <strong>Credit Reporting, Credit Repair Services, or Other Personal Consumer Reports</strong> were the top three products with the highest number of complaints. These categories consistently led in complaints due to issues like managing an account, incorrect information on reports, and problems with purchases shown on statements.</li></ul><p>2.<strong> Geographical Insights</strong>:</p><ul><li><strong>California (CA)</strong>, <strong>Florida (FL)</strong>, and <strong>Texas (TX)</strong> were consistently the top three states with the most complaints. However, New York (NY) replaced Texas temporarily in 2020 and 2021. This geographical concentration indicates regional challenges in handling financial products, possibly due to local banking practices, diverse customer demographics or population density in these states.</li></ul><p>3.<strong> Issue Patterns</strong>:</p><ul><li><strong>Managing an account</strong>, <strong>incorrect information on reports</strong>, and <strong>problems with purchases on statements</strong> were the most frequently reported issues across the years.</li><li><strong>Closed with an explanation </strong>was the most common resolution method across all product categories, although in 2023, there was a notable increase in complaints marked as “In-progress”.</li><li><strong>The company has responded to the consumer and the CFPB and chooses not to provide a public response </strong>was the most common public response.</li></ul><h4>Product-Specific Insights:</h4><ol><li><strong>Checking or Savings Account</strong>:</li></ol><ul><li>Consistently topped the complaint list with issues related to “managing an account”, “fraud”, and “incorrect fund deductions”. The response pattern showed a shift in Jul &amp; Aug 2023 where “In-progress” was more prevalent.</li><li><strong>Platform Preferences</strong>: The web was the dominant platform for complaints, with referrals ranking second, except in 2023 when phone complaints increased.</li></ul><p>2.<strong> Credit Card or Prepaid Card</strong>:</p><ul><li>Issues like “purchases shown on statements” and “payment disputes” were most common. California, Florida, and New York were the primary states reporting these issues.</li><li><strong>Response Trends</strong>: “Closed with an explanation” remained the dominant resolution type, but there was a significant rise in complaints marked as “In-progress” in Jul &amp; Aug 2023.</li><li><strong>Platform Preferences</strong>: Web consistently topped the complaint channels, but in 2023, the phone became more prominent.</li></ul><p>3.<strong> Credit Reporting, Credit Repair Services</strong>:</p><ul><li>The primary issues were “incorrect information on reports” and “company investigations”. California, Florida, and Texas were frequent complainants.</li><li><strong>Response Trends</strong>: Similar to other categories, the majority were “Closed with an explanation,” but there was an increase in “In-progress” cases in Jul &amp; Aug 2023.</li><li><strong>Platform Preferences</strong>: Web was the most common communication channel throughout the years, with an increasing shift towards phone communication in 2023.</li></ul><p>4.<strong> Debt Collection</strong>:</p><ul><li>Issues like “attempts to collect debt not owed” and “communication tactics” were most prevalent. States like Georgia, Maryland, and Texas were frequently reported.</li><li><strong>Response Trends</strong>: A higher percentage of complaints were closed with explanations, but there was an increase in “In-progress” cases in Jul &amp; Aug 2023.</li><li><strong>Platform Preferences</strong>: Web was the dominant platform, followed by mail and phone.</li></ul><p>5.<strong> Money Transfer, Virtual Currency</strong>:</p><ul><li>“Fraud or scams” topped the complaint list consistently from 2017 to 2020, but “other transaction problems” increased from 2021 onwards.</li><li><strong>Response Trends</strong>: “Closed with an explanation” was the majority, with a significant rise in “In-progress” complaints in Jul &amp; Aug 2023.</li><li><strong>Platform Preferences</strong>: Web was the most common communication channel, although there was an increased usage of phone in 2023.</li></ul><p>6.<strong> Mortgage</strong>:</p><ul><li>Issues related to managing and refinancing mortgages were common. California and Florida were prominent in complaints.</li><li><strong>Response Trends</strong>: “Closed with an explanation” was predominant, but “In-progress” cases increased notably in Jul &amp; Aug 2023.</li><li><strong>Platform Preferences</strong>: Web and phone were the primary complaint channels, with referral declining in 2023.</li></ul><p>7.<strong> Payday Loan, Title Loan, Personal Loan</strong>:</p><ul><li>State like California and issue like “getting a line of credit” were consistently in the top three for complaints.</li><li><strong>Response Trends</strong>: “Closed with an explanation” was the most common, though there was an increase in “In-progress” cases in Jul &amp; Aug 2023.</li><li><strong>Platform Preferences</strong>: Web and phone were the dominant channels throughout.</li></ul><p>8.<strong> Student Loan</strong>:</p><ul><li>This category had fewer complaints overall, with issues like incorrect information about loans appearing most frequently.</li><li><strong>Response Trends</strong>: The only response category was “The company has responded to the consumer and the CFPB and chooses not to provide a public response.”</li><li><strong>Platform Preferences</strong>: Web was the primary channel throughout.</li></ul><p>9.<strong> Vehicle Loan or Lease</strong>:</p><ul><li>“Managing the loan or lease” was a top issue, with California being a frequent state in complaints.</li><li><strong>Response Trends</strong>: Similar to other categories, “Closed with an explanation” was the most common, but “In-progress” cases were noted in Jul &amp; Aug 2023.</li><li><strong>Platform Preferences</strong>: Web was the dominant communication channel, followed by phone and referrals in 2023.</li></ul><h3>Key Insights:</h3><ol><li><strong>Consistency across years</strong>: There was a notable consistency in top complaint products and issues across years, with some shifts in response patterns and complaint channels in 2023.</li><li><strong>Regional Concentration</strong>: The dominance of California, Florida, and Texas in complaints highlights potential regional issues in handling financial products.</li><li><strong>Platform Shifts</strong>: An increased preference for phone communication in 2023 over referral suggests evolving customer communication preferences, especially during periods of heightened complaint activity.</li><li><strong>Product-Specific Issues</strong>: Each product category had unique issues and resolution trends, reflecting the diverse challenges faced by consumers in managing financial products.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ezvqCv6o1qA1CGB7IDzjnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hHtuNHgNYPrID2qjwrPqcA.png" /></figure><h3>Recommendations</h3><ol><li><strong>Enhanced Customer Support and Resolution Processes</strong>:</li></ol><ul><li><strong>Shift towards Real-time Support</strong>: Increase investments in real-time customer support systems, especially via phone channels, to manage complaints more efficiently. The rise in “In-progress” complaints in 2023 suggests that customers prefer direct communication channels for resolving issues.</li><li><strong>Improve Online and Mobile Platforms</strong>: Maintain and improve the user interface of web and mobile platforms to make complaint filing and resolution easier. Simplify the process of tracking complaint status and ensure clear communication about next steps.</li><li><strong>Automated Systems for Common Complaints</strong>: Implement automated systems for handling common issues such as incorrect information on reports, account management issues, and payment disputes. This can expedite resolutions and reduce the workload on customer service representatives.</li></ul><p>2.<strong> Proactive Customer Education</strong>:</p><ul><li><strong>Enhance Consumer Awareness</strong>: Develop educational resources to inform consumers about their rights and the complaint process. This can include guides on managing credit reports, understanding bank statements, and resolving issues directly with financial service providers.</li><li><strong>Provide Training</strong>: Offer training for customer service staff to handle complaints more effectively, particularly for issues such as fraud prevention and managing loan payments. This will help in reducing the volume of complaints and improving customer satisfaction.</li></ul><p>3.<strong> Geographical Targeting of Services</strong>:</p><ul><li><strong>Address Regional Challenges</strong>: Given the concentration of complaints in states like California, Florida, and Texas, companies should consider tailoring their services to meet regional challenges. This might involve specific customer outreach efforts, localized complaint resolution protocols, or partnerships with regional agencies.</li><li><strong>Data-Driven Strategies</strong>: Use data analytics to identify regional trends and problem areas. Adjust marketing strategies and customer service efforts to address these challenges proactively.</li></ul><p>4. <strong>Crisis Management</strong>:</p><ul><li><strong>Preparedness for Crisis Situations</strong>: Companies should develop crisis management plans that include rapid response mechanisms to manage spikes in complaints, especially during periods of economic uncertainty or new regulatory changes. This will help maintain customer trust and prevent widespread dissatisfaction.</li></ul><p><strong>5. Monitoring and Feedback Mechanisms</strong>:</p><ul><li><strong>Continuous Improvement</strong>: Regularly monitor complaint patterns and feedback from customers. Use this data to make informed improvements in products and services. Implement customer feedback loops that allow consumers to suggest improvements and track how their feedback influences changes in service delivery.</li><li><strong>Regular Audits and Reviews</strong>: Conduct periodic reviews of the complaint management process and resolution strategies to identify areas for improvement. Regular audits can uncover recurring issues and prevent future problems.</li></ul><p>Click here to interact with dashboard <a href="https://app.powerbi.com/view?r=eyJrIjoiMjQ5YjYxYjctMDM1Mi00NDhlLTg2OTgtZDc4MmVjOTU4MmNkIiwidCI6IjlhZWU5NDM3LTVkNWEtNGU5OS1iNjA2LTExOGUzNTRmMWJmMSJ9"><strong><em>here</em></strong></a></p><p>Connect with me on LinkedIn <a href="http://www.linkedin.com/in/taibat-abowaba"><strong><em>here</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20a576e4c6d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>