<?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 Abdelhaq Bensghir on Medium]]></title>
        <description><![CDATA[Stories by Abdelhaq Bensghir on Medium]]></description>
        <link>https://medium.com/@abdelhaq.bens?source=rss-84fa41c0096b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WhbOA3T3sXsaRNKIUDzuOw.jpeg</url>
            <title>Stories by Abdelhaq Bensghir on Medium</title>
            <link>https://medium.com/@abdelhaq.bens?source=rss-84fa41c0096b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 00:57:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abdelhaq.bens/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[Dashboarding & Storytelling Best Practices]]></title>
            <link>https://medium.com/@abdelhaq.bens/dashboarding-storytelling-best-practices-559700eb891a?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/559700eb891a</guid>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Thu, 20 Jun 2024 11:02:22 GMT</pubDate>
            <atom:updated>2024-06-20T11:02:22.698Z</atom:updated>
            <content:encoded><![CDATA[<h4>Or <strong>How to Use Visualizations to Tell a Story ?</strong></h4><p>In this article, we will explore the fundamentals of crafting data-driven narratives. This guide will provide you with a framework to effectively communicate any story you wish to tell using data</p><h3>Report Design Process</h3><p>A report is a set of dashboards.</p><p>Data stroytelling is correlated with the report design logic. since naturally the structure of the report will be reflected on the story. So how to design a report?</p><p>With so many data visualization tools out there, the options for presenting your data seem endless. To help you stay on track and avoid common pitfalls, we’re going to share some best practices. This will give you a straightforward guide to effectively display your data.</p><h3>So where do we start?</h3><p>We can start to define our story by answering four key questions. If we cannot answer these questions, we should not move forward with rolling out a full dashboard. Instead, we should go back to our exploratory data analysis to determine the answers.</p><h4>1. What is my objective?</h4><p>First we need to define the concrete goal for the analysis. This helps us to frame out what the main purpose of the analysis is and set the direction for the rest of the project. A couple examples of this could be:</p><ul><li>Maximize Profit</li><li>Decrease Cost of Goods Sold (COGS)</li></ul><h4>2. Who will this story be for?</h4><p>Once we have defined the high level objective for the analysis, we need to decide what and how users will consume the analysis. This is very important because based on the answer, multiple versions might be necessary to achieve the end goal. An example of this difference is between the CFO and the Store Director.</p><p>The CFO is interested in the following metrics:</p><ul><li>Quarter over quarter trends of profit margins</li><li>Quarter over quarter breakdown of costs</li><li>Top and bottom performing categories</li></ul><p>Meanwhile, the Store Director is interested in another set of X:</p><ul><li>Monthly breakdown of costs and sales</li><li>Top and bottom performing products</li><li>Weekly accounts receivable by customer</li></ul><p>As we can see, while the interests might be similar, they are in fact different, which could change the way that information is presented. This is because the CFO cares about the higher level KPIs driving the business, while the Store Director cares about how to implement the feedback from the executive team. Pretty interesting that two people can have such different views on data, right?</p><h4>3. What actions can users take from these insights?</h4><p>The best practice for any analysis is to ensure that end users can take action after reviewing the analysis. Once we know the objective and who the end users will be, we can begin to define this. These can be organized into a list of data-driven action/decision items, also sometimes referred to as a “Workqueue” or “Task List”.</p><p>In the case of the scenario with the CFO and Store Director, some potential Task Lists could be:</p><ul><li>List of top-selling products with profit margins</li><li>List of customers that have shown a decrease in purchase activity</li></ul><h4>4. How often do I need to update the data?</h4><p>One of the last questions we need to answer before beginning our analysis is how often we need to update the data. This is dependent on the previous 3 factors that we have answered already.</p><h3>Data Storytelling Best Practices (Gestalt Principles)</h3><p>There are seven principles that we need to follow when designing data stories, regardless of the tool. Based on psychology research in visual perception, they help us make sense and organize complex visual information. They also help us make data storytelling fun! These are known as the Gestalt Principles. These are as follows:</p><ul><li><strong>Enclosure / Figure-Ground</strong>: An enclosure is a group of objects placed together with a boundary around them. This technique is used in data visualization by placing a border, shadow or box around similar widgets that we would like the user to review at the same time. This is especially useful when adding KPIs to the dashboard, creating a specific outlined area so that the user knows that the KPIs are meant to be viewed together.</li><li><strong>Similarity</strong>: Similarity is when we have data points with similar attributes such as color, direction or shape. When we have this happen, it is perceived that these are part of a group. For example, if we are visualizing departments, we may want to use color for each department in addition to enclosures to make the different departments easily distinguishable from each other.</li><li><strong>Closure</strong>: Our eyes add any missing elements to familiar shapes. An example of this is not needing an enclosure around a bar chart, because we have both an X and Y axis to help us to understand where the boundaries of the graph are.</li><li><strong>Continuity</strong>: This principle has to do with the direction that we read the story in. The order in which we place the visualizations can influence how the user reads the data.</li><li><strong>Connection</strong>: We tend to perceive objects that are connected in some way as part of the same group or theme. This could be a connection using an arrow to show steps in a process for instance.</li><li><strong>Proximity</strong>: This principle is when we place objects that are similar close together. Different from Similarity, this principle refers to the arrangement of objects. An example of this is placing all widgets together that may be a slightly different view of the same data so that the user can see that they are related.</li><li><strong>Symmetry</strong>: Symmetry is the concept that states that elements that are far apart can be perceived as being related, as long as they are placed symmetrically on the report or dashboard. Having objects placed symmetrically, are pleasing to viewers and make the report or dashboard feel harmonious.</li></ul><p><a href="https://vizzendata.com/2020/07/06/utilizing-gestalt-principles-to-improve-your-data-visualization-design/">You can learn more about the Gestalt Principles here.</a></p><h3>Report Structure</h3><p>When creating a report from a few visualizations, we want to make sure that we have a few key elements outlined on the dashboard clearly. These items are as follows:</p><ol><li>KPIs</li><li>Visualizations / Graphs of the KPIs</li><li>Raw Data / Action item list</li></ol><p>These can be arranged in a number of ways. Salesforce has some best practice layouts that describe how to design dashboards in order to get the most out of the space and make the highest impact to the user.</p><p><a href="https://trailhead.salesforce.com/content/learn/modules/analytics-app-design/structure-your-app">You can learn more about the Salesforce analytics design here.</a></p><p>Here are two ways of organizing your dashboards:</p><h4>F Pattern</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*5gDif4zAchH043G_zX6lUg.png" /></figure><p>In addition to the F pattern, the Z pattern is one of the more common designs of dashboards that is typically created. In the Z design, the KPIs are placed in the Summary section of the page. Below the KPIs are the one or two visualizations that summarize the KPIs along with additional information about them. At the bottom is the actionable list, usually some sort of raw data table. This pattern is called the Z pattern because the eye reads left to right, then down to the visualizations, then left to right again in the action items.</p><h4>Z Pattern</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*17YOdvqA-L_Z8bylxDe-pg.png" /></figure><p>In addition to the F pattern, the Z pattern is one of the more common designs of dashboards that is typically created. In the Z design, the KPIs are placed in the Summary section of the page. Below the KPIs are the one or two visualizations that summarize the KPIs along with additional information about them. At the bottom is the actionable list, usually some sort of raw data table. This pattern is called the Z pattern because the eye reads left to right, then down to the visualizations, then left to right again in the action items.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=559700eb891a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prefer Tableau or Power BI ?]]></title>
            <link>https://medium.com/@abdelhaq.bens/prefer-tableau-or-power-bi-c831172734c0?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c831172734c0</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Thu, 20 Jun 2024 11:01:15 GMT</pubDate>
            <atom:updated>2025-07-17T14:43:19.275Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prefer Tableau or Power BI ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pIrwooETQlSJqStw.png" /></figure><p>In my data career, I had the opportunity to use both Tableau and Power BI (Oh yes, even a Data Engineer should know how to use a data visualisation tool, it’s extremely helpful to build an educated idea about each tool in the market).</p><p>I’ve seen that it is common to engage in the data world in discussions and evaluations of various tools and technologies related to data analysis and visualization.</p><p>In light of this, I would like to share my perspective on a commonly asked question regarding the comparison between Tableau and Power BI.</p><p><strong>Common points:</strong></p><p>Tableau and Power BI are both popular data visualization and business intelligence tools.</p><p><strong>Diverging aspects:</strong></p><p>Here is a comparison between the two:</p><ol><li><strong>User interface:</strong> Tableau has a more intuitive and flexible user interface, while Power BI has a simpler and more straightforward interface.</li><li><strong>Data connectivity: </strong>Both Tableau and Power BI provide options to connect to a wide range of data sources, including databases, spreadsheets, and cloud-based data storage. However, Tableau supports a wider range of data sources, including big data platforms, while Power BI is primarily geared towards connecting to Microsoft data sources.</li><li><strong>Data visualization:</strong> Tableau offers more advanced and customizable visualization options, while Power BI provides a good selection of pre-built visualizations. As a</li><li><strong>Collaboration:</strong> Power BI offers robust collaboration features, such as shared dashboards and workbooks, while Tableau’s collaboration features are more limited.</li><li><strong>Pricing:</strong> Power BI is generally more affordable, with a free version and a lower-cost premium version, while Tableau is more expensive and requires a paid subscription.</li></ol><p>In summary, Tableau is a more powerful and flexible tool for data visualization, while Power BI is a more cost-effective option with strong collaboration features. The choice between the two will depend on the specific needs and budget of an organization.</p><h3><strong>Why Do I Prefer Using Tableau Over Power BI?</strong></h3><p>First off, let me clarify that I’m not saying Power BI is a bad solution.</p><p>However, with Tableau, I can develop much more quickly because this tool is truly designed with users in mind.</p><p>Not to mention, the customization options are far more advanced.</p><p>I find that Tableau allows me to meet the needs of my business users much more swiftly.</p><p>To go into detail, what these users primarily expect are:</p><p>🚀 Rapid iterations <br>🚀 An easy-to-use solution <br>🚀 Reports that precisely meet their needs</p><p>That’s why, when choosing between Tableau and Power BI, I prefer to recommend Tableau to my clients.</p><h4><strong>And you, do you prefer Tableau or Power BI?</strong></h4><p>Apparently, some here might not choose either of them. Indeed, some clients opt for other data visualization solutions that are less costly. For yexample, Datawrapper or Apache Superset, as well as other alternatives, are gaining popularity.</p><p><strong>Datawrapper</strong>:</p><ul><li><strong>Pros</strong>: Easy to use, no coding required, great for journalists and small businesses.</li><li><strong>Cons</strong>: Limited advanced features compared to Tableau and Power BI.</li></ul><p><strong>Apache Superset</strong>:</p><ul><li><strong>Pros</strong>: Open-source, highly customizable, supports a wide range of data sources.</li><li><strong>Cons</strong>: Requires technical expertise for setup and customization.</li></ul><p>— — — — — — — — — — — -</p><p>Ultimately, the best tool for you will depend on your specific needs, budget, and the level of technical expertise available in your organization. Should you need any further advice, feel free to reach out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c831172734c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Airflow: Some Guidelines]]></title>
            <link>https://medium.com/@abdelhaq.bens/airflow-some-guidelines-0884f2dbb226?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0884f2dbb226</guid>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[data-orchestration]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Thu, 20 Jun 2024 10:58:31 GMT</pubDate>
            <atom:updated>2025-07-17T14:44:40.159Z</atom:updated>
            <content:encoded><![CDATA[<h4>Data Orchestration Fundamentals</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gGYdmtxu7YJoVNBN.png" /></figure><p>Data Orchestration is the coordination and automation of data flow across various tools and systems to deliver quality data products and analytics.</p><p>The path to modern data orchestration solutions has evolved through several stages. It began with basic time-based scheduling tools such as Cron and Windows Task Scheduler (WTS), followed by proprietary software like AutoSys and Informatica, and finally older open-source solutions like Oozie and Luigi. <strong>All this culminated in some modern Data orchestration solutions like Apache Airflow.</strong></p><p>Initially developped internally at <a href="https://medium.com/u/ebe93072cafd">AirbnbEng</a> in October 2014 as a solution to manage the company’s increasingly complex workflows, Airflow was <a href="https://medium.com/airbnb-engineering/airflow-a-workflow-management-platform-46318b977fd8">open-sourced by the same company since 2015</a>.</p><h4>Airflow for Data Orchestration</h4><p>Apache Airflow is an open-source tool for programmatically authoring, scheduling, and monitoring data pipelines. It is defined by key characteristics such as pipelines-as-code with Python, built-in observability, a large open-source community, and much more. Airflow is used across various industries by data practitioners for multiple use cases. There are key considerations to account for when using Airflow for streaming, data processing, and when scaling.</p><h4>Demystifying Airflow</h4><p>Airflow can be utilized by single developers, single teams, and multi-teams, with different running configurations for each case. It can be deployed using a variety of architecture types (e.g., on-premise) and systems (e.g., cloud services). Here are some key terms to remember in Airflow:</p><p><strong>- DAG (Directed Acyclical Graph): </strong>Represents a single data pipeline.<br><strong>- Task: </strong>An individual unit of work in a DAG.<br><strong>- Operator: </strong>The specific work that a Task performs.</p><h4>Types of Operators:</h4><p><strong>1. Action:</strong> Perform a specific action such as running code or a bash command.<br><strong>2. Transfer: </strong>Perform transfer operations that move data between two systems.<br><strong>3. Sensor: </strong>Wait for a specific condition to be met (e.g., waiting for a file to be present) before running the next task.</p><h4>Airflow: Basics</h4><p>Explore how Apache Airflow works under the hood and the basics of how a DAG is built.</p><p>1. The Airflow scheduler detects a new DAG in the DAGs directory (it takes only 5 minutes for the Airflow scheduler to detect a new DAG file in the directory).<br>2. The Airflow scheduler serializes the DAG and stores it in the metadata database.<br>3. The Airflow scheduler scans the metadata database to see if any DAGs are ready to run.<br>4. The scheduler sends the DAG’s tasks into the executor’s queue.<br>5. The metadata database communicates with the other Airflow components throughout the entire process of running a DAG.</p><h4>Airflow Architecture</h4><p>Airflow comprises six main components:</p><p><strong>1. Web Server:</strong> Serves and updates the Airflow user interface.<br><strong>2. Metadata Database:</strong> Stores all metadata (e.g., users, tasks) related to your Airflow instance.<br><strong>3. Scheduler: </strong>Monitors and schedules your pipelines.<br><strong>4. Executor: </strong>Defines how and on which system tasks are executed.<br><strong>5. Queue:</strong> Holds tasks that are ready to be executed.<br><strong>6. Worker(s):</strong> Execute instructions defined in a task.</p><h4>Airflow runs DAGs in six steps:</h4><p>1. The scheduler constantly scans the DAGs directory for new files. The default time is every 5 minutes.<br>2. After detecting a new DAG, the scheduler processes and serializes it into the metadata database.<br>3. The scheduler scans the metadata database for DAGs that are ready to run. The default time is every 5 seconds.<br>4. Once a DAG is ready to run, its tasks are put into the executor’s queue.<br>5. A worker retrieves a task to execute from the queue once available.<br>6. The worker executes the task.</p><p>well, let’s do a recap of the steps:</p><p>- Once a DAG is ready to run, the Scheduler sends the tasks to the Queue.<br>- Once a Worker is available, the instructions defined in the task are executed.<br>- During the process, the Metadata Database is updated with the DAG’s changing state.</p><h4><strong>DAG Components</strong></h4><p>A DAG is developped using a programming language of your choice (for me I use Python), and each DAG has mainly four core parts:</p><p>1. Import Statements: Where the specific operators or classes needed for the DAG are defined.<br>2. DAG Definition: Where the DAG object is called and specific properties such as its name or schedule are defined.<br>3. DAG Body: Where tasks are defined with the specific operators they will run.<br>4. Dependencies: Where the order of execution of tasks is defined using the right bitshift operator (&gt;&gt;) and the left bitshift operator (&lt;&lt;).</p><p>A DAG’s task can be defined as being either upstream or downstream to another task.</p><p>— — —</p><p>Next time I will create an article where you can test your Airflow knowledge. So keep an eye out for new updates and quizzes to enhance your understanding and mastery of Apache Airflow!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0884f2dbb226" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Que retenir de la programmation orienté objet ?]]></title>
            <link>https://medium.com/@abdelhaq.bens/que-retenir-de-la-programmation-orient%C3%A9-objet-e1e9284792a1?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1e9284792a1</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[objectorientedprogramming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Thu, 20 Jun 2024 10:48:24 GMT</pubDate>
            <atom:updated>2025-07-17T14:47:31.977Z</atom:updated>
            <content:encoded><![CDATA[<h3>Que retenir de la programmation orienté objet ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/0*ICpAhwd3fLxxo5Mu.jpg" /></figure><p>La programmation orientée objet (POO) est un <strong>paradigme de programmation</strong> largement utilisé qui organise le code autour des objets plutôt que des fonctions et des logiques procédurales. Python, avec sa syntaxe simple et ses fonctionnalités puissantes, est un langage idéal pour apprendre et mettre en œuvre la POO. Explorerons dans cet article les concepts clés de la POO en Python et ce qu’on devrait en retenir.</p><p>D’abord, de quoi est construit un programme?</p><blockquote>un programme est composé 1/ desDonnées (les inputs au programme), et 2/ d’un comportement, méthode ou “fonction” à appliquer sur les données.</blockquote><p>Parlon maintenant des paradigmes de programmation:</p><blockquote>Un paradigme de programmation est une approche de programmation qui fournit des règles et des concepts pour structurer et organiser le code. Il détermine comment les problèmes sont décomposés et comment les solutions sont exprimées dans un langage de programmation.</blockquote><p>On a principalement 3 types de paradigmes:</p><ul><li><strong><em>Programmation procédurale:</em></strong> Structure le code en séquences de commandes ou de procédures (fonctions) pour manipuler les données. Ces dernières mutent donc au fil du code.</li></ul><p><strong><em>Programmation fonctionnelle : </em></strong>Utilise des fonctions “pures” sans effets de bord sur les données et favorise ainsi l’immuabilité de ces dernières.</p><ul><li><strong><em>Programmation orientée objet : </em></strong>Organise le code autour des objets qui combinent données et méthodes.</li></ul><p><strong>Side note: </strong>Retrouvez <a href="https://github.com/Abdelhaq-Bensghir/Programming_paradigms"><strong>ici</strong></a> un exemple concret des 3 versions de paradigmes de programmation appliqués pour répondre à une même question.</p><h3>1. Qu’est-ce que la POO ?</h3><p>La programmation orientée objet est un style de programmation qui utilise des “objets” — des instances de classes — pour représenter des entités du monde réel ou des concepts. Chaque objet peut contenir des données (attributs) et des fonctions (méthodes) qui opèrent sur ces données.</p><h3>2. Les Piliers de la POO</h3><p>La POO repose sur quatre piliers principaux : l’encapsulation, l’héritage, le polymorphisme et l’abstraction.</p><h4>Encapsulation</h4><p>L’encapsulation consiste à restreindre l’accès à certaines composantes d’un objet et à n’autoriser leur manipulation que par des méthodes spécifiques. Cela protège l’intégrité des données et simplifie la gestion du code.</p><h4>Héritage</h4><p>L’héritage permet de créer une nouvelle classe à partir d’une classe existante. La nouvelle classe (classe dérivée) hérite les attributs et méthodes de la classe de base (classe parent).</p><h4>Polymorphisme</h4><p>Le polymorphisme permet d’utiliser une interface unique pour différents types d’objets. En d’autres termes, une méthode peut se comporter différemment selon l’objet qui l’appelle.</p><h4>Abstraction</h4><p>L’abstraction consiste à cacher les détails complexes d’un système et à exposer seulement les éléments essentiels. Cela se fait souvent à travers des classes et des méthodes abstraites qui définissent des interfaces sans implémentation.</p><h3>3. Avantages de la POO en Python</h3><p><strong>Lisibilité et Modularité: </strong>La POO permet de structurer le code de manière claire et logique, rendant le programme plus facile à comprendre et à maintenir. Chaque classe peut être développée, testée et déboguée indépendamment.</p><p><strong>Réutilisation du Code: </strong>Grâce à l’héritage, il est possible de réutiliser du code existant, réduisant ainsi le besoin de réécrire des fonctions similaires. Cela améliore l’efficacité et la cohérence du développement.</p><p><strong>Extensibilité: </strong>Avec la POO, il est facile d’ajouter de nouvelles fonctionnalités sans affecter le code existant. Les nouvelles classes peuvent hériter des propriétés et des méthodes des classes existantes et les étendre ou les modifier.</p><p><strong>Sécurité: </strong>L’encapsulation aide à protéger les données en restreignant leur accès direct et en utilisant des méthodes pour interagir avec elles. Cela assure une meilleure sécurité et intégrité des données.</p><p><em>En Conclusion, la programmation orientée objet en Python est un puissant paradigme qui offre de nombreux avantages pour le développement de logiciels. En maîtrisant les concepts de base comme les classes, les objets, l’encapsulation, l’héritage, le polymorphisme et l’abstraction, vous pouvez créer des programmes plus modulaires, réutilisables et faciles à maintenir. Python, avec sa syntaxe claire et ses fonctionnalités riches, est un excellent langage pour apprendre et appliquer la POO. Alors, plongez dans la POO avec Python et découvrez comment elle peut transformer votre manière de programmer !</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1e9284792a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of SQL’s TRUNCATE Statement: Efficient Data Removal Made Easy]]></title>
            <link>https://medium.com/@abdelhaq.bens/the-power-of-sqls-truncate-statement-efficient-data-removal-made-easy-f2dc9ca4f186?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2dc9ca4f186</guid>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Tue, 25 Jul 2023 10:40:42 GMT</pubDate>
            <atom:updated>2023-07-25T10:40:42.686Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L03fuJHbTiOs-7ZL.jpg" /><figcaption><a href="https://increditools.com/data-removal-services/">source</a></figcaption></figure><p>In the world of databases, managing data is a crucial aspect of any application or system.</p><p>When it comes to deleting data, SQL provides two primary methods: the `DELETE` statement and the `TRUNCATE` statement.</p><p>In this article, we’ll explore the advantages of using the <strong>`TRUNCATE`</strong> statement as an efficient alternative to the potentially risky <strong>`DELETE WHERE 1=1`</strong> query. We’ll discuss the benefits of `TRUNCATE`, its performance advantages, and scenarios where it shines. So let’s dive in!</p><h4><strong>1. Understanding the Difference</strong></h4><p>Before we delve into the benefits of `TRUNCATE`, it’s essential to understand the fundamental difference between `DELETE` and `TRUNCATE`.</p><p>The `DELETE` statement is a versatile way to remove data from a table based on specific conditions specified using the `WHERE` clause. For example, `DELETE FROM Customers WHERE Age &gt; 60` will delete rows where the age is greater than 60.</p><p>On the other hand, the `TRUNCATE` statement doesn’t require a `WHERE` clause. It efficiently removes all rows from a table, effectively resetting it to its initial state.</p><h4>2. Performance Boost</h4><p>One of the significant advantages of using `TRUNCATE` over `DELETE` is its performance. When using `DELETE`, each row is deleted individually, and the system generates a separate transaction for each row. This process can become slow and resource-intensive, especially when dealing with large datasets.</p><p>In contrast, the `TRUNCATE` statement removes all rows in one fell swoop, making it significantly faster and more efficient. It deals with data deallocation at the page level, resulting in a reduced transaction log size and optimized memory usage.</p><h4><strong>3. Resetting Auto-Increment Columns</strong></h4><p>For tables with auto-incrementing columns, such as primary keys, using `DELETE` and then re-inserting data can lead to gaps in the auto-incremented values. This can be confusing and may cause issues in certain scenarios.</p><p>However, `TRUNCATE` solves this problem gracefully. It not only clears the data but also resets the auto-increment counter. Subsequent inserts will start with the initial value, ensuring that there are no gaps in the auto-incrementing sequence.</p><h4>4. Handling Foreign Key Constraints</h4><p>While `TRUNCATE` offers significant advantages in many cases, there are some caveats to consider. If the table you want to truncate is referenced by foreign key constraints from other tables, you may encounter issues when using `TRUNCATE`.</p><p>Unlike `DELETE`, `TRUNCATE` doesn’t support filtering rows based on conditions, which means it removes all rows from the table. If foreign key constraints are present, some database systems might require you to temporarily remove the constraints or take other precautionary measures before performing the `TRUNCATE` operation.</p><h4>Cautionary Notes</h4><p>Before employing `TRUNCATE`, it’s crucial to be aware of a few key points:</p><p>- Data Irreversibility: Unlike `DELETE`, which can be rolled back, `TRUNCATE` is a non-logged operation and cannot be undone. Once you execute `TRUNCATE`, the data is permanently gone. Always create backups or ensure you have copies of the data before using this operation.</p><p>- Permissions: In many database systems, `TRUNCATE` requires appropriate permissions to execute. Ensure that you have the necessary privileges to perform this action.</p><h4>Conclusion</h4><p>In conclusion, the `TRUNCATE` statement is a powerful tool that offers a more efficient and convenient way to remove data from a table compared to the potentially risky `DELETE WHERE 1=1` query. Its performance advantage, ability to reset auto-increment columns, and streamlined data deallocation make it a preferred option for quickly clearing a table.</p><p>However, be cautious when using `TRUNCATE`, especially if foreign key constraints are involved, as it may necessitate additional precautions. Always consider the specific requirements of your database operation and opt for the appropriate method to ensure the integrity and safety of your data. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2dc9ca4f186" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL use cases : Beyond usual JOINs]]></title>
            <link>https://medium.com/@abdelhaq.bens/sql-use-cases-beyond-usual-joins-6118089e95b0?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6118089e95b0</guid>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Sun, 07 May 2023 12:14:51 GMT</pubDate>
            <atom:updated>2023-05-07T12:23:42.929Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL use cases : Beyond usual JOINs</h3><h4>SELF JOIN and CROSS JOIN</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XbXcpNjPdDcLS1Z9iwfRBQ.png" /><figcaption>AI-generated image</figcaption></figure><p>CROSS and SELF joins are less familiar to junior data professionals. Mainly because INNER and LEFT JOINs are more widely used in SQL. However, the suitability of join types depends on the specific query requirements and data structure, so it’s essential to keep in mind that the least frequently used join types, such as CROSS and SELF joins, can still be the optimal solution for certain queries. For this reason, we suggest demonstrating how to use these types of joins in this article. Let’s start first with CROSS JOINs.</p><h3>1. CROSS JOIN:</h3><p><strong>What is it? </strong>A CROSS JOIN produces a Cartesian product of two tables, which means every row in the first table is matched with every row in the second table. This type of join is seldom used because it can produce a very large result set that is difficult to manage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*BHtdXPcatWblMepZi7Eqcw.png" /><figcaption>Cartesian product (AKA Cross product)</figcaption></figure><p><strong>Use case: </strong>Let’s consider the <a href="https://www.sqlitetutorial.net/sqlite-sample-database/">chinook sample database</a>.</p><p>The Chinook sample database contains 11 tables, which are interconnected to store music-related data. The tables include employees, customers, invoices, invoice items, artists, albums, media types, genres, tracks, playlists, and playlist tracks. The tables are linked by various relationships, such as one-to-many and many-to-many, to store information on employees, customers, invoices, music genres, artists, albums, tracks, and playlists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rIYO8YSOjb_EJ-Ab7j8O3g.png" /><figcaption><a href="https://www.sqlitetutorial.net/sqlite-sample-database/">chinook sample database</a></figcaption></figure><p><strong>Context and task:</strong> For the business to be successful, it’s important to treat your most loyal customers well. You’d like to make sure that the support team is aware of who these customers are, so that they can prioritize their requests. <strong>Create a table where each of the support agents gets matched to each customer that spent at least $45 with the company</strong>.</p><p>Therefore we use these two tables:</p><ul><li>employees table stores employees data such as employee id, last name, first name, etc.</li><li>customers table stores customers data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*Xxg6u9meQi1yt3q7StjacQ.png" /></figure><p>And here is the table as required, thanks to CROSS JOIN!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*0agLhXN1_utg5nAi3LIaFQ.png" /></figure><h3>2. SELF JOIN</h3><p>What is it? SELF JOIN is a join where a table is joined with itself. This type of join is rarely used because it is difficult to read and understand, and it can be slow to execute on large tables.</p><p><strong><em>Note 1:</em></strong><em> if you are asking if there is any relation between SELF and CROSS JOINs. the answer is No: “A SELF join </em><strong><em>is not the same as</em></strong><em> a CROSS join of a table on itself”.</em></p><p><strong><em>Note 2:</em></strong><em> to SELF JOIN a table to itself, use only the keyword “JOIN”, not “SELF JOIN”.</em></p><p><strong>Use case based on the same sample database as before :</strong> People who love music also love to discuss it or discover new artists. the company is thinking about organizing a meetup to gather customers from a same city. That’s not all: they would like to organize a speed meeting session, so that all customers get to speak with each other and exchange at least one artist. <strong>They tasked you with coming up with a list of customer matches per city.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*JmmMnW-7vT88dHx3zIJRxA.png" /></figure><p>This display’s the needed output. Resembling to the following one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*C87AqyLrB8VKTHTvB4NlMQ.png" /></figure><p><em>In conclusion, CROSS and SELF joins may not be as commonly used as INNER or LEFT JOINs, but they can be extremely useful in certain situations. By understanding these joins, you can enhance your SQL query skills and tackle complex data problems more effectively. Whether you need to combine rows from the same table or generate a Cartesian product of two tables, CROSS and SELF joins are powerful tools to have in your SQL toolkit. With practice and experimentation, you can master the use of these join types and become a more versatile and effective data analyst or developer.</em></p><p>______________________________</p><p><em>I hope you appreciated this article. If this was helpful, please don’t forget to show support! Besides, feel free to reach out or post a comment below if you have any questions or suggestions for future articles. Thank you for taking the time to read this article and happy data wrangling!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6118089e95b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Trends brought by 2023]]></title>
            <link>https://medium.com/@abdelhaq.bens/useful-trends-i-discovered-in-2023-b8c68622860b?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8c68622860b</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[chatbot-design]]></category>
            <category><![CDATA[trends]]></category>
            <category><![CDATA[trending]]></category>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Wed, 11 Jan 2023 15:36:15 GMT</pubDate>
            <atom:updated>2024-06-20T10:44:58.289Z</atom:updated>
            <content:encoded><![CDATA[<p>last edit: June 11, 2023</p><p><strong><em>Disclaimer/</em></strong><em> ChatGPT most recent training data belongs to 2021, so I couldn’t have used it to find me 2023 trends for this post ! </em>😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*hLh3Jt1J5npF2_Nc" /><figcaption><a href="https://www.istockphoto.com/fr/photo/graphique-fl%C3%A9ch%C3%A9-daugmentation-des-activit%C3%A9s-de-lann%C3%A9e-de-croissance-future-de-gm1411165538-461095680?phrase=tendance%202023">Source</a></figcaption></figure><h4>TL;DR</h4><p><em>Interesting data trends spotted in 2023 are :</em></p><ul><li><em>Tranding tools: ChatGPT, GPT-4, Microsoft Copilot, Web 3.0, Loom.</em></li><li><em>Emerging trends: Exploding market demand for Analytics Engineers, and Count tells that “Dashboards are Dead!”.</em></li></ul><p><strong>— — — — — — — — — — —</strong></p><p>2023 seems to bring much news since its very first beginning. Here are some popular trends:</p><h4>1. ChatGPT</h4><p>I suppose we all agree ChatGPT is THE trend of this early 2023. It is astonishingly intelligent. AI models are getting really serious! If not yet tried, try it <a href="https://chat.openai.com/chat">here</a> and judge by yourself.</p><p>ChatGPT (and GPT-4 after it) deserves to be called “a true innovation”, since It got used by so many people around the globe in such little time; it has <a href="https://increditools.com/chatgpt-statistics/#:~:text=Microsoft%20recently%20made%20a%20$1%20billion%20investment%20in,monthly%20traffic%20of%20ChatGPT%20is%20around%2096,000,000%20visitors"><strong>crossed 1 million users within one week of its launch</strong></a>!</p><p>Now there is even this account <a href="https://medium.com/u/12f20ceb12f9">TheWorldAccordingTo ChatGPT</a> dedicated to posts completely written using chatGPT! 😅</p><p>Since Jan.23, the ChatGPT site became so often unavailable; ChatGPT went viral to the point that its infrastructure cannot bear the load of requests received from worldwide users. ChatGPT became popular to the point that Google is worried and finds to be challenged by this Chatbot technology.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6NgeZrx4zKsRsRsRzEmxtg.png" /><figcaption>Google trends: Worldwide <strong>Interest</strong> in ChatGPT over the last 4 months</figcaption></figure><p><em>You can notice a slight interest decrease in December 22 due to the Christmas period; people were more interested in Christmas than in ChatGPT.</em></p><p>Note that ChatGPT is now available only within established languages within which it was trained (English and French to cite a few), but still has to make some progress in other languages, like Arabic for example. We still ChatGPT will be able serve more people in the future.</p><p>Interesting fact: ChatGPT (coupled with <a href="https://plantuml.com/">PlantUML</a>; A tool enabling to convert a text schema to a visual diagram) can help you to rapidly ideate, create, design, color and document mindmaps. Have a look on this <a href="https://aruva.medium.com/mindmaps-using-chatgpt-and-plantuml-fb38c1d84a19">amazing Medium article</a> by <a href="https://medium.com/u/b477bd92efe7">aruva - empowering ideas</a>. This author has also a couple of similar articles.</p><p>Finally, <a href="https://medium.com/u/2514f8064b16">KDnuggets</a><strong> </strong>has published a <a href="https://www.kdnuggets.com/publications/sheets/ChatGPT_Cheatsheet_Costa.pdf">cheat sheet dedicated to ChatGPT</a>; the way to take if you had enough of the never ending LinkedIn feed going creasy about ChatGPT!</p><p>As a friendly advice, if you are using ChatGPT to advise you, do not rely on it 100%, since from time to time, it may generate wrong information.. I beleive we are nowadays (Feb. 23) witnessing a turning point in the uage of ChatGPT as people became more aware of the limit of the tool..</p><p>some sort of Dunning-Kruger effect !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Oy-OXVRz6n8XW4ai" /><figcaption>source: HFS Research</figcaption></figure><p>In this <a href="https://www.wsj.com/articles/artificial-intelligence-is-teaching-us-new-surprising-things-about-the-human-mind-ba7cdceb">article</a> of The <a href="https://medium.com/u/18ebb660d0b9">Wall Street Journal</a>, it is discussed how ChatGPT and other recent developments in artificial intelligence are helping researchers better understand the human mind. For example, by studying the neural networks of AI systems, researchers are gaining new insights into how the brain processes information and learns. Additionally, AI is helping to shed light on the relationship between language and thought, and may lead to new discoveries in areas such as creativity and emotion. The article concludes by noting that while AI is not a perfect model of the human mind, it has the potential to provide valuable insights that could ultimately help us better understand ourselves.</p><h4>2. Web 3.0:</h4><p>To keep it simple and straight, Web 3.0 is the third “revolutionary” version of the Web we use. Here is the best brief <a href="https://www.youtube.com/watch?v=FExp9YuTzbY">summary</a> I have seen so far about web 3.0</p><h4>3. Loom</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYB-JyKInhb-HknmtbvLFQ.png" /></figure><p>Loom is <strong>a video messaging tool that helps you get your message across through instantly shareable videos</strong>. Loom co-founders tell that Loom can be the solution record quick videos to update your team and <strong>cut down</strong> the traditional endless <strong>meetings by 29%</strong>.</p><p>For the moment, Loom seems quite generous with the Free tier offering :</p><ul><li><em>Workspace limits : </em>25 videos / user, each is 5 min recording length.</li><li><em>Features:</em> screen &amp; cam recording, screenshots, team Library, viewer insights.</li></ul><p>So two advices. 1) Start using Loom, and 2) be to the point by keep the video short, since the current span of human attention is estimated to be of <strong>few seconds</strong>. and give it a try <a href="https://www.loom.com/home">here</a>.</p><p>PS: When you watch a video with a modified playback speed, Loom shows by the end of the video how much time was saved compared to the initial duration of the video. Which is a helpful option.</p><h4>4. Exploding market demand for Analytics Engineers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*PnTpb8J3HR8LTtqA.png" /><figcaption><a href="https://www.linkedin.com/posts/dataworksforeveryone_data-datascience-artificialintelligence-activity-7023946401323626496-Q0bs?utm_source=share&amp;utm_medium=member_desktop">source</a></figcaption></figure><p>DBT started becoming popular back in 2021. DBT is backed up by <strong>DBT Labs </strong>that<strong> </strong>pioneered the practice of analytics engineering. DBT Labs expected back then that by 2027, every company will adopt Analytics Engineering.</p><p>Just two years later, we are seeing how much companies became already interested in DBT since this early 2023.</p><p>I recommend for more information to consult and save <a href="https://medium.com/@abdelhaq.bens/collection-of-dbt-ressources-ee2856e36afe">my article</a> written about Analytics Engineering and DBT resources, as I update It on a regular basis.</p><h4>5. “Internal” Dashboards are Dead! or at least that’s what “Count” tells !</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*0-lXVBY_S2ZtJZr46NsNyw.png" /><figcaption><a href="https://count.co/about">https://count.co/about</a></figcaption></figure><p><a href="https://count.co/">Count</a> is an interactive dashboarding solution, enabling data analysts to easily answer managers’ questions so the focus gets more on the data interpretation part, and less on the visuals’ building processes.</p><p>Count is Some sort of DBT-ized data prep and data viz solution. Cloud native, this solution stands on top of your data warehouse or data lake and enables to create instant visualizations&#39; pipelines and share the link to the final analytics with the management, enabling thus a healthy data-driven interaction.</p><p>Quick facts:</p><ul><li>They have got a <a href="https://count.co/pricing">free plan</a>, quite generous, for new joiners.</li><li>The tool has also a feature of breaking down a SQL query (written in <a href="https://medium.com/@abdelhaq.bens/collection-of-dbt-ressources-ee2856e36afe">DBT</a> for example) into a visual pipeline of tables (SQL queries), and vise versa.</li><li>The visual display of the tool is modern and reminds me of that of Figma.</li><li>Good news: Access management is straightforward and can be set on different levels, enabling the Admin to customize on a very detailed level everyone’s access rights to the shared charts/projects.</li></ul><h4><strong>6. GPT-4:</strong></h4><p>After months of rumors and speculation, OpenAI has announced the new GPT-4 in March 15th 2023.</p><p>It is the latest in its line of AI language models that power applications like ChatGPT and the new Bing.</p><p>👉 Longer context: 32 000 tokens.</p><p>👉 Accepts images as inputs.</p><p>👉 Better reasoning capabilities.</p><p>Learn more on <a href="https://openai.com/research/gpt-4">OpenAi’s site</a>, or throught this <a href="https://www.youtube.com/live/outcGtbnMuQ?feature=share">30 min video</a> Offocial presentation.</p><p>_________________________________</p><p><em>Finally, this is just the beginning of a never seen incoming AI revolution. And until new revolutionary solutions appear, I will make sure to update this list as I discover new trends in 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8c68622860b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On cell phones value perception]]></title>
            <link>https://medium.com/@abdelhaq.bens/addict-to-your-phone-here-is-a-solution-627fd581b00c?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/627fd581b00c</guid>
            <category><![CDATA[phone]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[habits-for-success]]></category>
            <category><![CDATA[phone-addiction]]></category>
            <category><![CDATA[society]]></category>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Sun, 20 Nov 2022 19:19:21 GMT</pubDate>
            <atom:updated>2024-09-10T07:41:30.807Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Let’s say I am writing this as a contribution to solve a widespread societal issue..</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*OOLCRS-Fx9hXQOvfixZOgg.png" /></figure><h3>Introduction</h3><p>Addiction to cell phones is an issue that touches large groups of users across generations. If you question this assertion, just look around when getting in the subway or in the bus... At this point the issue seems to be evident, and this article is intended to reflect on what may be among its main reasons.</p><p>There are for sure numerous factors that end up making us attached more than ever to our cell phones. To cite a few:</p><ul><li>Light weight and ease of use,</li><li>Access to information : “By the end of 2022, the world produced 94 zettabytes of data” <em>(Source: Finances Online), and </em>talking about how much data is created every day the current estimate stands at <strong>1.145 trillion MB per day</strong>,</li><li>The last but not least factor is addictive social media apps powered by cutting-edge user adoption research.</li></ul><blockquote><strong><em>I find however that there is quite an important reason at the root of all the interest we dedicate to our phones, that is: the value we perceive within these devices.</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g8UkZvkTdH_VsIvlbNeqsg.png" /></figure><h3><strong>Cell phones value perception</strong></h3><p>Using and holding our phones all the time comes from our own perception of the intrinsic value they bring to our daily life. Compared to books or real-life discussions with others, many may prefer using their phone to call their friend or to get a piece of information a book might offer. <strong>Interestingly, this behavior doesn’t come from the real added value of the phone, but from the perceived value, and here lies all the difference.</strong></p><p>Let’s take a use case and compare writing on paper and writing on a cell phone or even a laptop. When grabbing a pen and starting to write, you incur no risk of distraction, and you get as a result a fruitful experience with a well spent time. In contrast, opening your phone and trying to write may be a hazardous adventure, and chances are you end up being hooked by your social media feed!</p><p>Even when considering times of rest, phones do not help to recover more than the other alternatives. In the end, the most useful, distraction-free way to acquire knowledge is through reading books, taking notes, and handwriting, and the most straightforward stress-free way to pause and recharge is in practicing sports, having some quality time with relatives or friends, or getting involved in any other useful group activities.</p><p>Of all that preceded, it is rather clear that the value we attach to our cell phones may be questionable. and this may be the first step in breaking free from the related addiction.</p><p>To sum up, this article did try focusing on explaining one reason: the biased perception of the added value of our cell phones. For sure, this isn’t the only reason, and this contemporary addiction issue is way more complex to address than writing one single article. This article is, as a result, no more than one tiny piece within the puzzle, among many other explanatory variables that may have led to the widespread addiction when it comes to phone usage.</p><p>To dive deep in the subject, I suggest a documentary that may shift the way you consider some things: <a href="https://www.youtube.com/watch?v=uaaC57tcci0">The Social Dilemma</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*gmv_61WE7oIrJ3pn.png" /><figcaption><a href="https://ibandhu.com/wp-content/uploads/2020/09/the-social-dilemma-ibandhu.png">source</a></figcaption></figure><p><strong>The Social Dilemma</strong> by Jeff Orlowski explores the negative consequences of the social media phenomenon among teens and young adults. The film interviews former employees of top technology companies such as Google, YouTube, Facebook, Twitter, and Mozilla, gleaning their opinions on how these companies have strong influences in today’s social, cultural, and political realms and not for the better. Have a good time watching it !</p><p>______________________________</p><p><em>I hope you appreciated this article. If this was helpful, please don’t forget to show support! Besides, feel free to reach out or post a comment if you think of any other factor, or if you find the current article could be improved.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=627fd581b00c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to learn dbt and get into Analytics Engineering?]]></title>
            <link>https://medium.com/@abdelhaq.bens/collection-of-dbt-ressources-ee2856e36afe?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee2856e36afe</guid>
            <category><![CDATA[data-transformation]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[modern-data-stack]]></category>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Fri, 23 Sep 2022 12:33:06 GMT</pubDate>
            <atom:updated>2025-06-11T08:49:20.165Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*ULBjPz2-tNWex8sG.png" /></figure><p><em>This article will work as an always evolving knowledge base gathering the best materials and articles about dbt and Analytics Engineering.</em></p><p><strong>DBT </strong>is a tool that is associated, not to say identified, with the <strong>analytics engineer</strong> or <strong>data analytics engineer</strong> role, which takes part within the modern data team. This role bridges the roles of Data Engineer and Data Analyst, and is hence required — ideally — to intégrate both of them at the same time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*WVIKvyvgh-X-i3TB" /><figcaption><a href="https://www.linkedin.com/posts/dataworksforeveryone_data-datascience-artificialintelligence-activity-7023946401323626496-Q0bs?utm_source=share&amp;utm_medium=member_desktop">source</a></figcaption></figure><h4>So what’s dbt?</h4><p>dbt (data build tool) is an open source Python package that enables data analysts and data engineers to transform their data using the same practices that software engineers use to build applications. All this, using SQL queries.</p><p>for a deep dive in dbt, <a href="https://medium.com/u/2a27b76df6f9">Leo Godin</a> does a great work helping you, via his <a href="https://medium.com/data-engineer-things/no-data-engineers-dont-need-dbt-30573eafa15e">article</a> he wrote for data engineers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGoJNhgwQ6B1fundIXO38g.png" /></figure><p>dbt started becoming popular back in 2021, backed up by <strong>dbt Labs </strong>that<strong> </strong>pioneered the practice of analytics engineering. dbt Labs expected back then that by 2027, every company will adopt Analytics Engineering.</p><p>I’ll recommend these two references to get acquinted with dbt:</p><ol><li>Start by learning some fundamentals using the <a href="https://www.linkedin.com/company/dbtlabs/">dbt Labs</a> official courses: I suggest connecting dbt to GCP (with the 3 months trial option) so as not to encure unexpectedly high bills. It may be worth it to mention that a certification is dispensed after completing successfully each course, and that the courses are project-oriented. So you’re going to learn so much! I would suggest however the following courses:<br>- dbt fundamentals<br>- analyses and seeds<br>- jinja, macros, packages</li><li>A great resource on Youtube are <a href="https://youtube.com/playlist?list=PLy4OcwImJzBLJzLYxpxaPUmCWp8j1esvT&amp;si=q9ZUAV4Z_ZxPyXrf">the concise courses</a> on the <a href="https://www.youtube.com/@KahanDataSolutions">Kahan Data Solutions</a> youtube channel</li><li><a href="https://learning.oreilly.com/interactive-lab/build-a-robust/9781098111052/">“Transforming Data with dbt” hands-on tutorial</a> by Sam Bail on O&#39;Reilly:<strong> </strong>(this is part of a bigger Lab on <a href="https://learning.oreilly.com/interactive-lab/build-a-robust/9781098111083/"><strong><em>Building a Robust Data Pipeline with the dbt, Airflow, Great Expectations</em></strong></a>)</li><li>An introductory course on <a href="https://app.datacamp.com/learn/courses/introduction-to-dbt">DataCamp</a>, or on <a href="https://www.linkedin.com/learning/data-engineering-with-dbt">Linkedin</a></li><li><a href="https://docs.getdbt.com/best-practices"><strong>dbt best practices</strong></a></li></ol><p>6. dbt has also an extraordinary community always available to help newbies via dbt Community <a href="https://discourse.getdbt.com/">Forum</a>, or via <a href="https://www.getdbt.com/community/join-the-community">dbt Slack channel</a>.</p><p>7. Other Ressources :</p><ul><li><a href="https://docs.getdbt.com/docs/build/projects">Official documentation</a></li><li>Follow <a href="https://www.getdbt.com/events">dbt events</a> near you, or <a href="https://www.getdbt.com/resources/webinars">webinars</a></li><li>dbt cheatsheet: <a href="https://github.com/bruno-szdl/cheatsheets/blob/main/dbt_cheat_sheet.pdf">https://github.com/bruno-szdl/cheatsheets/blob/main/dbt_cheat_sheet.pdf</a></li><li>General process of debugging in dbt: <a href="https://docs.getdbt.com/guides/debug-errors">https://docs.getdbt.com/guides/debug-errors</a></li><li>Flashcards: <a href="https://quizlet.com/867223074/dbt-analytics-engineering-certification-exam-flash-cards/">https://quizlet.com/867223074/dbt-analytics-engineering-certification-exam-flash-cards/</a></li></ul><p>— — — — — — — — — — — —</p><p>Please feel free to get in touch or comment if you find out about any interesting links or articles to share to the community. thanks in advance!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee2856e36afe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Tableau] How to design a waterfall chart?]]></title>
            <link>https://medium.com/@abdelhaq.bens/tableau-how-to-design-a-waterfall-chart-34013f17abc7?source=rss-84fa41c0096b------2</link>
            <guid isPermaLink="false">https://medium.com/p/34013f17abc7</guid>
            <category><![CDATA[tableau-training]]></category>
            <category><![CDATA[tableau-consulting]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[waterfall-chart]]></category>
            <category><![CDATA[tableau-desktop]]></category>
            <dc:creator><![CDATA[Abdelhaq Bensghir]]></dc:creator>
            <pubDate>Sat, 23 Oct 2021 21:59:10 GMT</pubDate>
            <atom:updated>2021-10-25T19:41:15.274Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0czJwACme8sD0k-Q" /></figure><p>I thought it would help newbies in Tableau to share how to make a waterfall chart, since this may be challenging.</p><p>My database is the 2017 version of the superstore Database, but feel free to download any other version, since we will need just two fields that are; [Order Date] and [Sales].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FbALJnu_hLsIOmW5PosHKw.png" /><figcaption>Our input values</figcaption></figure><h4>Let’s first see what do wee look for to create :</h4><p>Our final viz should resemble to the one below, displaying the month evolution of Sales in 2017. The Blue Bars correspond to gains and red ones to losses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*awSdXgcT4MWXbhfBsE33ww.png" /></figure><p>So let’s hit the road running! 👌</p><h4>1st step : drag the fields [Order Date] and [Sales] respectively to the rows and the columns.</h4><p>For clarity, I am putting a filter to show just the orders during 2017.</p><p>Since the [Order Date] field gets set to Year([Order date]), you need to set it to month so as to have the next</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bZYZOiclWRDIygx20kKJbA.png" /><figcaption>Fig1: 2017 Sales by Month</figcaption></figure><h4>2nd Step : get a Gantt diagramm</h4><p>in the marks card, click on the dropdown menu and select Gantt Bar.</p><p>you should get the next graphic, with the horizontal blue lines set to the total amount of sells for each month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cRuXEnjLn6UplOFiRw0uDQ.png" /></figure><p>The trick now is to design bar plots that will start from those lines we have, to indicate what changes that occured between each month and the next one. So for January we need to have a blue bar telling that we gained 43971$. and for February, we will have a red bar telling that we lost 20301$ — 43971$= -23 670$.</p><p>To do that, we will need:</p><p>1. A field [Difference] that will compute the difference between each month and the last month before it. This field will give to the first month by default its own value (since it has no month before it).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPLMC5CoDTc3VTRNqpy7Rg.png" /></figure><p>2. A field [Color] that will precise if the difference registered is negative or positive. this takes simply the sign of the field [Difference]:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RiVR40dBMn43bCTPn2fm5g.png" /></figure><p>3. A field [Show difference] That will give out the size of the bars that will be plotted. the minus added to the output below is to precise if the bar will be plot up or down (since bar plots in tableau are plot upwards if the value is positive, and downwards if the value is negative).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObpHyLp17sW860jpU_xbdQ.png" /></figure><p>We’re all set!</p><p>Now Let’s create a double axis graphic by adding again the field [Sales] to the rows as in (1). Then a window is added to the marks card (2) with the name SUM(Sales) (2).</p><p>Add to this window the three created fields as indicated. Please pay attention to add a minus ti the field [Show difference] after adding it as a label.</p><p>Then we get something like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5X1kOy3rhxftWFxcDhTz5g.png" /></figure><p>We still need to create the line that will link the sales values of the different months. To do that, click on the first pane of the Marks card: <strong>SUM(Sales)</strong>, click the dropdown menu and then select <strong>Line</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_B5xi2iIgGAxbTK_LDWTQ.png" /></figure><p>Then set the line type to ‘Step’ type. You will get the following :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQw17XL4LpuLF85k1c_cLA.png" /></figure><p>You can also play with the size of the ligne to render it more light. Then the last step is to merge the two axis. This could be done in a variety of ways, but consider the following method, using <strong>Dual Axis</strong> option from the Rows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJpitSeh820LvgVyiyltNg.png" /></figure><p>Then you’ll notice the graphic gets transformed to a dual axis graphic, but still we need to synchronise those two axis. So right click the right axis and select <strong>synchronise Axis</strong> option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXrovOgu84b0aJY2mAP21w.png" /></figure><p>Now, remove the labels for the line plot, and hide the header of the second Sales axis at the right, and you finally get the Viz we intended to create:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9cxgl7SYkUGQASyzHGb9A.png" /></figure><p>If you have liked the post, please let me know so as to share more. Of course Any questions are welcome and I am available on Linkedin !</p><p>See you next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34013f17abc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>