<?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 Yosef Aziz on Medium]]></title>
        <description><![CDATA[Stories by Yosef Aziz on Medium]]></description>
        <link>https://medium.com/@yosef.a?source=rss-794afc7806d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*f78WPyB0sx8VX4opWO-ExQ.jpeg</url>
            <title>Stories by Yosef Aziz on Medium</title>
            <link>https://medium.com/@yosef.a?source=rss-794afc7806d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 18:43:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yosef.a/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[This Is The Fastest Way to Export CSVs in Python with Benchmark Comparison]]></title>
            <link>https://blog.dataengineerthings.org/this-is-the-fastest-way-to-export-csvs-in-python-benchmark-comparison-8ff628bdc637?source=rss-794afc7806d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ff628bdc637</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Yosef Aziz]]></dc:creator>
            <pubDate>Sat, 03 Jun 2023 23:04:17 GMT</pubDate>
            <atom:updated>2023-06-03T23:14:00.748Z</atom:updated>
            <content:encoded><![CDATA[<h3>Five Ways to Export CSVs in Python with Benchmark Comparison</h3><p>Did you know that there are at least 5 different ways to save CSVs in Python? And do you know which of them is the fastest? If not, this story will change that!</p><h3>Create a Randomized Dataset</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I47iq1gP_uakHfCpLzmYjA.png" /></figure><p>I created a random dataset with 5 columns of various data types:</p><ul><li>ID: An incrementally increasing number, starting from 1</li><li>Name: As a 10-character long string</li><li>Height in Meter: Decimal number between 1.40 and 2.00</li><li>Is Student: Boolean (True/False)</li><li>Birth Date: A random YYYY-MM-DD date between the last 18 to 40 years</li></ul><p>This is the code that I used:</p><pre>import random<br>from datetime import date, timedelta<br><br># Define the column names<br>column_names = [&quot;id&quot;, &quot;name&quot;, &quot;height_cm&quot;, &quot;is_student&quot;, &quot;birth_date&quot;]<br><br># Generate the random data<br>data = []<br>NUM_ROWS_LIST = [100, 1000, 10000, 100000, 1000000, 10000000]<br><br>for number_of_rows in range(NUM_ROWS_LIST):<br>  for i in range(number_of_rows):<br>    id = i + 1<br>    name = &quot;&quot;.join([random.choice(&quot;abcdefghijklmnopqrstuvwxyz&quot;) <br>                   for _ in range(10)])<br>    height_m = round(random.uniform(1.4, 2), 2)<br>    is_student = random.choice([True, False])<br>    birthdate = (date.today() <br>                 - timedelta(days=random.randint(365 * 18, 365 * 40))<br>                ).strftime(&quot;%Y-%m-%d&quot;)<br><br>    row = [id, name, height_m, is_student, birthdate]<br>    data.append(row)</pre><h3>5 Ways to Export CSVs</h3><h4>CSV-Module — writer</h4><p>Python’s built-in module csv allows us to work with CSV files. csv.writer() writes data into a CSV file row-by-row. It takes an iterable (for example a list or tuple) and writes each element as a separate field in a row of the CSV file.</p><pre>import csv<br><br>def export_csv_writer(data):<br>    with open(&quot;data_writer.csv&quot;, &quot;w&quot;, newline=&quot;&quot;) as f:<br>        writer = csv.writer(f)<br>        writer.writerow(column_names)<br>        writer.writerows(data)</pre><h4>CSV-Module — DictWriter</h4><p>On the other hand, csv.DictWriter() writes data in a key-value format. It takes a dictionary object as input and writes each key-value pair as a separate field in a row of the CSV file.</p><pre>import csv<br><br>def export_csv_dictwriter(data):<br>    with open(&quot;data_dictwriter.csv&quot;, &quot;w&quot;, newline=&quot;&quot;) as f:<br>        writer = csv.DictWriter(f, fieldnames=column_names)<br>        writer.writeheader()<br>        for row in data:<br>            writer.writerow(dict(zip(column_names, row)))</pre><h4>Pandas</h4><p>Everybody loves Pandas. The most intuitive data module in Python is used by every single data scientist.</p><pre>import pandas as pd<br><br>def export_csv_pandas(data):<br>    df = pd.DataFrame(data, columns=column_names)<br>    df.to_csv(&quot;data_pandas.csv&quot;, index=False)</pre><h4>Polars</h4><p>Polars is a module that promises to be lightning-fast. Due to various technical differences compared to Pandas, it should perform way faster. We will test here if that is true.</p><pre>import polars as pl<br><br>def export_csv_polars(data):<br>    pl_df = pl.DataFrame(data, schema=column_names)<br>    pl_df.write_csv(&quot;data_polars.csv&quot;)</pre><h4>NumPy</h4><p>Saving CSVs in NumPy is not that intuitive. You can’t directly save CSVs, but as CSVs are comma-separated text files, you can create text files instead and separate the values with a comma :)</p><p>There are some parameters that you need to have in mind:</p><ul><li>fmt: The default format parameter is only suitable for numbers. To include strings, use fmt=&quot;%s&quot;</li><li>header: To include the column names, you need to add them as one comma-separated string by using &quot;,&quot;.join()</li><li>comments: This header will have a “#” in front of it, which combines the columns to one string in some CSV readers. To avoid that, you can remove that by setting the comments to an empty string.</li></ul><pre>import numpy as np<br><br>def export_csv_numpy(data):<br>    np_data = np.array(data)<br>    np.savetxt(&quot;data_numpy.csv&quot;,<br>               np_data,<br>               fmt=&quot;%s&quot;,<br>               delimiter=&quot;,&quot;,<br>               header=&quot;,&quot;.join(column_names),<br>               comments=&#39;&#39;)</pre><h3>Let’s Benchmark</h3><p>I used the timeit module to run the benchmark tests. I ran timeit for every single function that I created before:</p><pre>time_pandas = timeit.timeit(lambda: export_csv_pandas(data), number=1)<br>time_polars = timeit.timeit(lambda: export_csv_polars(data), number=1)<br>time_csv_writer = timeit.timeit(lambda: export_csv_writer(data), number=1)<br>time_csv_dictwriter = timeit.timeit(lambda: export_csv_dictwriter(data), number=1)<br>time_numpy = timeit.timeit(lambda: export_csv_numpy(data), number=1)</pre><p>The results got saved into the results dictionary:</p><pre>results[&quot;pandas&quot;].append(time_pandas)<br>results[&quot;polars&quot;].append(time_polars)<br>results[&quot;csv_writer&quot;].append(time_csv_writer)<br>results[&quot;csv_dictwriter&quot;].append(time_csv_dictwriter)<br>results[&quot;numpy&quot;].append(time_numpy)</pre><p>I repeated the runs five times and calculated an average execution time for every process and number of rows.</p><h4>Here Are The Results</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*pd1qGBFi-xR607GN0zZwYw.png" /></figure><p>So the ranking for a CSV with 10,000,000 rows is <em>(and how much time it takes longer than Polars)</em>:</p><ol><li><strong>Polars: 22.61s <em>(1x)</em></strong></li><li><strong>csv.writer(): 23.68s <em>(1.05x)</em></strong></li><li><strong>Pandas: 35.85s <em>(1.58x)</em></strong></li><li><strong>csv.DictWriter(): 47.93s <em>(2.13x)</em></strong></li><li><strong>NumPy: 95.71s<em> (4.23x)</em></strong></li></ol><p>In some cases csv.writer() was faster than Polars and vice versa. We could do more runs to make a better statement on which one is faster, but generally said, they have almost the same speed.</p><p>I am a bit surprised that Polars was performing so well compared to Pandas, especially as I used the newly released Pandas 2. In my opinion, Polars is an uprising star in the data realm that should get more attention. I can only recommend trying this module out and comparing its performance to your regular pandas tasks.</p><h3>tl;dr</h3><p>Polar and csv.writer() seem to be the fastest. Use them for large CSV. In most smaller CSVs you will see no difference in most of the methods.</p><p><em>As updates can always change the benchmark, these are the module versions that I used in Python 3.8:</em></p><ul><li><em>Pandas 2.0.1</em></li><li><em>Polars: 0.17.12</em></li><li><em>NumPy: 1.24.3</em></li></ul><p>Thanks a lot for reading. Feel free to follow me for more visual stories about data engineering and benchmarking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ff628bdc637" width="1" height="1" alt=""><hr><p><a href="https://blog.dataengineerthings.org/this-is-the-fastest-way-to-export-csvs-in-python-benchmark-comparison-8ff628bdc637">This Is The Fastest Way to Export CSVs in Python with Benchmark Comparison</a> was originally published in <a href="https://blog.dataengineerthings.org/">Data Engineer Things</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Airbyte Can Help You Gain These 5 Important Insights for Your Company]]></title>
            <link>https://medium.com/@yosef.a/airbyte-can-help-you-gain-these-5-important-insights-for-your-company-7d9dea263c43?source=rss-794afc7806d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d9dea263c43</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[modern-data-stack]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[airbyte]]></category>
            <dc:creator><![CDATA[Yosef Aziz]]></dc:creator>
            <pubDate>Mon, 15 May 2023 23:26:55 GMT</pubDate>
            <atom:updated>2023-05-15T23:27:19.257Z</atom:updated>
            <content:encoded><![CDATA[<p>As the Modern Data Stack rises, more and more companies use its tools. Airbyte is one of them, which allows you to load your data from various sources into your data storage. It is very easy to use, but some companies just use it for the sake of being “modern”. You have more than 100 connectors but you don’t know what you should do with the data? Here are some insights that your company may need:</p><h3>1- Improve your Engineering Team Productivity</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LgLE2qXitFRamjMyGSZ0WA.png" /></figure><p>There are too many distractions and blockers in a company. Some of these are:</p><ul><li>Decision-makers who didn’t make decisions</li><li>Contradictory requirements</li><li>Too many ad-hoc tasks</li><li>No clear goals and milestones</li><li>…</li></ul><p>All of these and way more cause engineers work way slower. There are always unnecessary discussions about why projects took longer than they should because nobody tracks these distractions. This is why you should have a <strong>Time To Resolution</strong> KPI.</p><h4>Time To Resolution</h4><p>There are various connectors that you could use to track this:</p><ul><li>Messaging (Slack)</li><li>Tickets (Jira/Trello)</li><li>Open Pull Requests (GitHub)</li></ul><p>First, you want to track when a Ticket (in Jira/Trello) was created and how long it took until someone started it. Was it started quick enough? If not, why?</p><p>Then the actual Time To Resolution starts. Make sure that this is no way to micromanage your team. Some tickets are just more complicated than expected. But make sure to be aware of such issues. Whenever you write timelines in advance, you want to make realistic estimations. These timelines can get better when the team is aligned on how abstract a task is, which blockers and distractions could occur or if someone suddenly gets sick and nobody else can work on the ticket.</p><h4>Track Delays</h4><p>These problems need to be tracked by updating the tickets. You can mark the comments with a prefix like “[DELAY]” and filter those in your data analytics tool. So you can track delays per project and discuss them in your retrospective meetings.</p><p>Another issue could be GitHub Pull Requests which are open for too long. Track how long it took until they got reviewed or resolved. Pull Requests with a lot of comments could be an indicator of various issues:</p><ul><li>No alignment for code quality within the engineering team</li><li>Wrong specs are given by the product team / wrong logic due to bad communication</li><li>The current code base could have a lot of technical debt</li></ul><p>Finding such Pull Requests is always great to dig deeper into the WHYs. Have a good look and try to find out whether this issue could be fixed in the long run.</p><h3>2 — How Much Do You Pay for Recruiting?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yZDJf_33SGPsU3i9I4U3TA.png" /></figure><p>There is always the big discussion: Do we grant 5k/year more for this very experienced person?</p><p>Management: <em>“No, that is too expensive”</em>. <br>All other departments: <em>“???”</em>.</p><p>Most of the time you will think that this will backfire because we have indirect costs which outweigh the 5k:</p><ul><li>The company pays for every employee who runs interviews. The more interview rounds, the more expensive it will be.</li><li>We may have opportunity costs. Imagine we need a DevOps engineer who would optimize our cloud infrastructure. Some quick fixes may lead to multiple $100k less costs per year. Hiring one month earlier could avoid us to pay $10k for this month, as the project may have been finished earlier. Also, you may miss out on opportunities that this DevOps engineer could have created. These could lead to more revenue for the company.</li><li>There are various other potential costs. The more interviews you run, the more things might go wrong — also on a legal level. If an interviewee sues you, you need to calculate these costs into hiring costs as well.</li><li>The increased workload on other employees due to missing people in the team can lead to a higher employee turnover. Replacing an employee can be a big problem, as a lot of company-specific knowledge will leave the company as well. Depending on the situation, the cost can be up 200% of the person’s yearly salary.</li></ul><p>I could continue by a lot, but this information should be quantified by your company. By using connectors like BambooHR, Greenhouse, Lever Hiring or Recruitee you can collect as much data as possible and build KPIs that try to answer these questions.</p><h3>3 — Get Your Company’s Sales KPIs from CRM Tools</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e51JB1AyTB7XEsUTcqqKkQ.png" /></figure><p>Airbyte allows us to get various Sales Data from CRM Tools like Salesforce, Close.com, Pipedrive, Zoho, HubSpot and many more.</p><p>The most important KPIs that you need can come from here. There are so many KPIs that can lead to questions that optimize your company’s strategy:</p><ul><li><strong>Sales Revenue</strong> — What are our most profitable products/sales channels/customer segments?</li><li><strong>Sales Cycle Length</strong> — How can we speed up the sales process without losing leads?</li><li><strong>Win/Loss Rate</strong> — Which parts of the sales process need to be improved?</li><li><strong>Customer Acquisition Cost</strong> — What are the most effective marketing channels?</li><li><strong>Customer Satisfaction</strong> — How can we optimize the product? How do we develop a Unique Selling Point?</li><li><strong>Customer Service Response Time/Satisfaction</strong> — How do we make sure to have less turnover of existing customers?</li></ul><p>If you don’t have any system that tracks that, make sure to do so. These numbers are the most important ones to track whether the company runs well or not.</p><p>Also analyzing customer acquisition costs can help you find the most cost-effective channels for acquiring new customers. So you can allocate your marketing budget more effectively.</p><h3>4 — Do Your Marketing Campaigns Actually Work?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hzDQMt7_QmA6RHfBICUyfg.png" /></figure><p>There are various ways to run A/B Tests or just compare conversions before and after a certain marketing campaign. You have various categories of marketing tool connectors in Airbyte as:</p><ul><li>Website Analytics (as Google Ads, Google Analytics, WordPress, Amazon Ads, etc.)</li><li>Newsletter Data (as Mailjet, Mailchimp, Mailgun, etc.)</li><li>Social Media Analytics (as LinkedIn, TikTok, YouTube, Instagram, Facebook, etc.)</li></ul><p>By connecting them to your data storage, you can create great dashboards in free tools like Google’s Looker Studio or Apache Superset. Some KPIs that you can gain from these connectors are:</p><ul><li>Website Traffic</li><li>Conversion Rate</li><li>Cost Per Lead</li><li>Return on Ad Spend (ROAS)</li><li>Customer Acquisition Cost</li><li>Customer Lifetime Value</li></ul><p>With those you can keep track of various projects if your marketing tool allows you to label projects. So you can find out which campaign led to which result. By iteratively analyzing your campaigns, you can get way better in scaling them by increasing leads with a lower cost.</p><p><em>DISCLAIMER: I am and was not affiliated with Airbyte during and before writing this article. All the information in here comes from personal experiences.</em></p><p>If you liked this article and are interested in more visualized stories in the practical data realm, feel free to leave a follow!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d9dea263c43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Start-Ups Taught me Planning Data Projects (7 valuable learnings)]]></title>
            <link>https://medium.com/@yosef.a/how-start-ups-taught-me-planning-data-projects-7-valuable-learnings-2bddb76316d9?source=rss-794afc7806d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bddb76316d9</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-management]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Yosef Aziz]]></dc:creator>
            <pubDate>Tue, 02 May 2023 05:01:51 GMT</pubDate>
            <atom:updated>2023-05-02T05:01:51.954Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nC89i-tWu-3mWkhQBDFFzQ.png" /></figure><p>Data projects are one of the biggest value generators in a business. The better data you have, the better decisions you make which finally end up in more money. But also for private data projects, there are many steps that distinguish a beginner project from a professional one.</p><p>After 3 years in start-ups in which I frequently delivered data products, I</p><p>Most of the time you finish your project and everything seems fine. But then we hear sentences from other departments like “The data is wrong, can you please fix it asap?”. The more often this happens, the more trust they lose in our data. Our goal as a data team is to make delivered data trustworthy. To make a good job, we need proper planning, so that we reduce these incidents.</p><p>Being able to manage and plan data projects will make you way more valuable to the company. So here we go to think about what actually is proper planning.</p><h3>1 — How to Define a Project</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yRJYuk1BrTeg1MkWMpWlCQ.png" /></figure><h4>Know your stakeholder</h4><p>First of all, make sure to know what you want to do. Many times one department gives requirements to the product team which tell the data team, what they need to do. If your product team does not consist of experienced data professionals, it is very likely that information gets lost.</p><p>This is why you should always directly align with your stakeholder and ask:</p><ul><li>What are your pain points?</li><li>How would data help you?</li><li>How will it change your processes?</li></ul><h4>Understand business</h4><p>50% of the time, there is a way easier solution than the suggested one. Especially in smaller companies, it is important to not only be the data person. You need to understand business as well. Make sure to know:</p><ul><li>What does which department do?</li><li>Which KPIs are important for the departments / What are their goals?</li><li>In how far are the departments aligned with business objectives?</li></ul><p>Sometimes we get “very urgent” requests, that are in a very low priority within the entire company. It may be way better to allocate your resources to other projects. So before accepting a project, make sure that it even makes sense.</p><h4>Define the project</h4><p>After you made a decision, you can start defining the project idea. There are different project management tools, let’s stick to an agile process for this case. For the entire definition of the project, you create an Epic:</p><ul><li>Add all participants (stakeholders, engineers, product managers, …)</li><li>Describe the problem in a non-technical way</li><li>Make sure that your participants agree to the terms before starting the project</li></ul><h3>2 — How to Identify Data Requirements</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7vhV6uzHTsBp4uvR0xc8A.png" /></figure><h4>Who is the end-user?</h4><p>Even though you might get your task from your stakeholder, sometimes someone else asked them for that data pipeline. End-Users might be:</p><ul><li>Your Stakeholders (Excel Files, Dashboards)</li><li>Developers (APIs, Database)</li><li>Clients (SFTP, APIs)</li><li>Data Professionals (CSV, Database)</li></ul><h4>What do the end-users want to solve?</h4><p>Talk with your end-users. For non-technical people, it is very difficult to define specs. Most people in the world do not know what an API is. For you, it might be an obvious solution, for others this would never come into their mind. So these people might come up with a way more complicated solution which you can solve way easier.</p><p>Ask them what their goals are, how it affects their (and the follow-up) tasks and what the current difficulties are.</p><p><strong><em>Bonus Tip</em></strong><em>: Make them and your stakeholders feel valued. Take their feedback seriously and thank them whenever they help you. You are not interviewing them, this is teamwork.</em></p><p><em>Also, make sure to update them when you have made progress. This will also lead to an iterative review process. Also when you present your final results, make sure to credit them. Respecting your teammates is crucial for success and simply being a nice person.</em></p><h4>How does that match our company goals?</h4><p>Make sure to understand the business impact and whether they match the company goals. Most of the time ad-hoc requests should have a lower priority than they get. Keep in mind that all of your actions should result in one of these three categories:</p><ol><li>Generate more revenue</li><li>Reduce costs</li><li>Create new opportunities, which result in 1. or 2.</li></ol><p>When you realize, that none of them are matched or there are more valuable other tasks, you may discuss deprioritizing them.</p><h4>Do you understand the data?</h4><p>Identify what the final data should look like (column names, file size, …) and where it does come from. The data source is the most crucial part. Some types of data sources might be error-prone, so you need to keep track of such issues as well. The more humans involved in the data source, the greater the need for data testing.</p><p>To understand the schema, you should also make sure to know which data-type belongs to which data column that you get. Make sure to document all the information that you get. Trust me, you will need these notes later.</p><p>Also, keep in mind how fresh the data needs to be. Most stakeholders will tell you “I need it in Real Time”. In these cases challenge back: “Do you actually change your decision-making based on whether the data is updated once an hour?”. Spoiler alert: In most cases, they won’t.</p><h3>3 — How to Create a Project Plan</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50KAzgRrEGjZksAe4qChVg.png" /></figure><p>Feel free to use whatever project planning tool of your choice. I personally like an agile approach the most with any Kanban tool.</p><h4>Create an Epic</h4><p>This ticket includes a rough explanation for everyone who is involved in this topic. Add a clear goal, scope, specifications and potential technical plan. Add every stakeholder, engineer and decision maker and make sure that all align on your Epic.</p><h4>Create Stories</h4><p>I use stories as milestones. Let’s say our marketing team needs weekly Google Analytics reports. We might create these three stories:</p><ol><li>Sync Google Analytics Data to Snowflake with Airflow</li><li>Build a Monitoring dashboard</li><li>Create the Report for Marketing</li></ol><p>In all of these stories, you should describe the specs and the final outcome.</p><h4>Create Tasks</h4><p>Tasks are the smaller parts of the stories. The more granular you make it, the easier it is to focus on your tasks and identify time delayers.</p><p>For the Sync to Snowflake, we might add the following tasks:</p><ol><li>Setup Airflow on Google Cloud Platform with Terraform</li><li>Create the DAG in Python</li><li>Write a test script</li><li>Setup CI/CD Pipeline</li></ol><p>You can work these off one by one or even split the tasks within your team.</p><h4>Estimate a Timeline</h4><p>I know, everyone hates them. It is impossible to give a realistic timeline for engineering projects. There will always be issues that go wrong. But still, many stakeholders expect one. I think it is important to at least have a rough estimate (e.g. 1 week, month, quarter or year). This may be useful information for prioritization.</p><p>Whatever you and your engineering team decide in the end, multiply it by 3. Things will go wrong, people will change their minds and you will get new information that you did not have before. There are too many factors that might crash your proper planning.</p><h3>4 — How to Establish a Data Governance Framework</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EbICSytklL4fGhpDB1xzSA.png" /></figure><p>Data Governance sounds like this theoretical model in your university textbook that you will never apply in real life. Well, somehow that is true.</p><p>Per definition a data governance framework should make sure that data is always available, not a mess, it should make sense and finally should be secure. So basically it should be useful for business.</p><p>To make sure that your data is useful for business, you should have rules and procedures that manage your data. These should avoid data quality issues, reduce risk and comply with legal requirements.</p><p>Most smaller companies put the entire data responsibility on one person. If your company does that, I can guarantee you that things will go wrong. So better split up the responsibility into three groups:</p><ul><li>Data Ownership (Data Team)</li><li>Business Monitoring (Business-related Departments)</li><li>Legal Requirements (Legal Team / C-Levels in smaller companies)</li></ul><p>People in data teams know much less about business compared to the decision-makers that use the data. Make sure to use this knowledge instead of relying on the assumption that your engineers have the exact same knowledge. The business teams could provide rules that get run regularly by the engineers. Finally, legal requirements like GDPR are stuff that a lawyer should check, not your IT guy.</p><h4>Maintaining reliable data</h4><p>When this is clear, you can get more into detail</p><ul><li>How do we monitor our data quality?</li><li>How do we address data quality issues?</li><li>How do we determine how long to keep our data?</li><li>How do we ensure that our data is secure and protected from unauthorized access, theft, or loss?</li><li>How do we ensure compliance with relevant laws, regulations, and industry standards related to data management?</li></ul><p>All of these are unique questions on your situation and need to be discussed in a team.</p><h3>5 —How to Select the Right Tools and Technologies</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DgikX5SfsyO19clZCe5pOA.png" /></figure><p>Data tools are booming. There are more data-tool start-ups than founders. Are you a data tool?</p><p>The decision of choosing the right tools might be complicated due to their vast amount. But in the end, it is quite easy. There are roughly 5 relevant types of data tools:</p><ul><li>Extract-Transform-Load Tools</li><li>Data Storages / Databases</li><li>Data Visualization Tools</li><li>Data Orchestration Tools</li><li>Data Quality Tools</li></ul><p>In the end, they should all lead to the same purpose. So whenever you have to choose the right tools, make sure that they actually solve the project requirements and are not the next big buzzword that you found on LinkedIn.</p><p>Make sure that the tools reduce the time for your workforce. Using tools is always a trade-off of the fees that you pay for the software vs. the time and money that it will reduce for your team. $10/month could be worth it if your analyst has 5 hours per week more time which would cost $40/hr.</p><p>Some tools are tailored for enterprises, others for start-ups. You will notice that in the packages and their pricing. Mostly it is an evaluation of governance vs pricing. Choose whatever your company needs.</p><p>Also ask yourself, how dependent will you be on this tool? Can it be replaced quickly if the SaaS company goes bankrupt? Do your due diligence!</p><p>Finally, just ask the experts in your team for help. If you want to use Airflow as a Data Orchestration Tool and no one in your team knows Python, it might be a bad idea.</p><h3>6 —How to Manage Resources and Teams</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MdkJoMFHotKwjnLoE0o2aw.png" /></figure><p>Human resources are f***ing expensive. An engineer with a salary of $100,000 per year costs you $50/hour. This cost scales up if you calculate in your own time, the time of your team and every stakeholder that is involved in it. A meeting with 10 engineers like that could cost you $500. Is this meeting still needed for $500?</p><p>Consider the project timeline and requirements. How many engineers do you need? Who in the team has the knowledge to access the requirements? Is it useful to have the engineers in every meeting or are your stakeholders very chaotic and would only confuse them? Always keep in mind how every action would block your processes (which then costs more money).</p><p>To avoid useless meetings that could have been an e-mail, have shared communication channels like Slack.</p><p>Also, make sure to monitor progress. I like to have a quick 15min check-in at the end of the week in which the team discusses what we have achieved and what has blocked the process. This gives us time to appreciate the work of the team and also get iterative feedback on our project management. With that, you can also track project timelines and celebrate milestones.</p><h3>7 — How to Run Data Tests and Validations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9H4UHXw4DkBBbT_VkBdyw.png" /></figure><p>As soon as you track negative prices in your data, you know something went wrong. I know, all of us would love to have tests, but none of us has time to write them. Let’s try to find a realistic approach:</p><p>Not everything needs to be tested. We can make sure that we normalize empty strings, whitespaces and NULL or n/a values to the same value, but will it actually solve someone’s problems? How much time will it reduce if it is data for a report that only is needed once a month? Especially if it is filtered in a data visualization tool anyway. There are cases where this might be relevant, but in many, it is not.</p><p>It gets relevant in reports for investors. It would be great to have reliable data on KPI-related questions. For that, we can write tests like “Are all prices/quantities in our sales positive”? If they are not, we know something in our system f***ed up. You want to find such issues before you send out reports, so make sure to build systems that regularly test your data before moving them into your final data storage.</p><p>As always the disclaimer: This is not the only way how to plan data projects. There are various methods, but this one was the most successful one for me in the start-up field. Feel free to share your best tips in the comments, so that more interested people in this topic can benefit from you!</p><p>Follow me on Medium if you enjoy visual stories in the data realm :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bddb76316d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ethics of Data: How you can ensure Fairness and Inclusion in Your Company]]></title>
            <link>https://medium.com/@yosef.a/the-ethics-of-data-how-you-can-ensure-fairness-and-inclusion-in-your-company-9e6377c4bc41?source=rss-794afc7806d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e6377c4bc41</guid>
            <category><![CDATA[inclusion]]></category>
            <category><![CDATA[diversity]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[diversity-and-inclusion]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Yosef Aziz]]></dc:creator>
            <pubDate>Tue, 25 Apr 2023 05:01:34 GMT</pubDate>
            <atom:updated>2023-04-25T05:01:34.202Z</atom:updated>
            <content:encoded><![CDATA[<p>Did you know that Microsoft released a chatbot in 2016 that was trained by users on Twitter? After 24 hours it was… an asshole:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Rx67kCz_Bd4rzxPfxcJZtQ.png" /></figure><p>Is this because AI is evil? Shouldn’t AI enhance our lives, instead of discriminating against people who could contribute value to our company? Let’s explore how this happens.</p><h3>How a Chatbot Can Learn to be Discriminatory</h3><p>Before an AI makes decisions, it first needs to be trained with data. If this training data is full of negative examples for people of a certain race or gender, it may learn to produce negative responses.</p><p>Instead of feeding it with negative data, we need to intervene and design it to be inclusive and non-discriminatory. To do that we need a strategy to prevent bias from our data.</p><h3>Understanding Data Bias</h3><p>Before you can filter out bias, you need to first identify it. There are different types of data bias: two of them are relevant for algorithms:</p><h4>Selection Bias — asking the wrong people</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4y60l4wls9i8xetOI_Jww.png" /></figure><p>Selection Bias happens when you fail to properly randomize the selection of your training data. In most companies this happens by having a <em>Sampling Bias </em>which causes some members of the society to be less included than others in your sample.</p><p>A study by Joy Buolamwini and Timnit Gebru (2018) analyzed how well facial recognition works on different skin-types. When the person is a lighter-skinned man, the algorithm can tell whether the photograph is male or female 99% of the time. Darker-skinned females were the most misclassified group with an error rate of 35%.</p><p>The reason? Over 80% of the data consisted of lighter-skinned subjects. With a distribution like that, the algorithm of course won’t be good on subjects on which it is not trained.</p><p>In business cases, this does not happen due to evil intent. There are various reasons like the attrition or volunteer bias.</p><p><em>Attrition</em>: When you track the customer journey on your website, there will be drop-outs. This can be due to the lack of technical experience in older people, so that you will bias into more web affine people.</p><p><em>Volunteer Bias</em>: Less people with a lower socioeconomical status can volunteer. Also more females volunteer than males.</p><p>Before you collect data, you need to think about which people might get excluded by your process.</p><h4>Confirmation Bias — your idea is probably bad</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pyVknBLKWFmLIyXUFSbtJg.png" /></figure><p>Confirmation Bias happens when you have an expectation and look for data that represents it. Obviously this does not represent reality.</p><blockquote>“I have an idea, I just need the data to proove it.”<br>- Almost every executive</blockquote><p>To act as a data-driven company, the standard process should involve examining the data first and then make informed decisions. Otherwise you will find ways to manipulate the data so that your idea looks good.</p><p>Sometimes the machine learning models will prove you wrong. Maybe your idea does not align with the data that you have. At this point, some people drop the idea or do everything that it will be a success. Especially in companies where data teams have to deliver positive results and even in research this a common problem.</p><p>It should be okay to find out, that your hypothesis was wrong. The main challenge is to make sure that all of your managers have this mentality.</p><h3>Fairness and Inclusion in Data Analytics</h3><p>Now that we know what could go wrong, we can start thinking of strategies to fix them.</p><h4>How is the data being collected?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41eLpMeJPiO-xtCJxwzmHg.png" /></figure><p>Selection Bias happens when your data is not randomized. This means, that also choosing your training and test data needs to be randomized. If a single employee makes this decision, this will lead either to cenvenience sampling or self-selection. Their confirmation bias will make them feel, that they are objective, but we can’t actually be objective.</p><p>Randomizing the selection prevents over-representing certain groups while excluding others. You need to ensure that data collection relies on some guidelines. When you have a method to collect data, make sure to know, who you might discriminate.</p><ul><li>Who understands the language that you are using? How could you communicate with those who don’t know the language well enough?</li><li>Are there educational disparities in between groups of your target audience? What are potential differences in behavior between individuals with low and high levels of education?</li><li>Can the people’s financial resources influence the result?</li><li>Do you only offer online surveys? Do you reach people who don’t have the skills or access to the internet?</li></ul><p>There are many questions which you might ask. You can always challenge your status-quo. In the end you need to focus on finding a balance in releasing products and being socially responsible.</p><h4>How to ensure fairness</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8nCtih80OC7z4upOvfTlQg.png" /></figure><p>You need to measure how fair and inclusive you are. Use the right KPIs.</p><p>Ask yourself, how do our algorithms work on people of different:</p><ul><li>gender</li><li>cultural background</li><li>age</li><li>disability status</li><li>and other relevant demographic characteristics</li></ul><p>All of these attributes can be co-correlated. Even if black people might be underrepresented, it could be that you have more data on younger black males compared to older white females.</p><p>Track your training data, write down all possible combinations and discuss internally, how these groups might be affected by your product. If you have marketing data and your primary target group is female, over 60 years old and of any cultural background, it might not be necessary to force-feed training data for 18-year-old Middle Eastern men.</p><p>On the other hand, if your product will be used by a wide variety of people (e.g. face recognition in your smartphone), you might have the social responsibility to develop good results for a larger range of people.</p><p>Make these decisions before you decide on the KPIs. When you know your target groups and the potential influence of your product on society, you can internally decide how high the error rate of these groups are allowed to be.</p><h4>Ensuring transparency in data analysis</h4><p>Another way, which might be applicable for enterprises, is to make your analytics and algorithms transparent. Elon Musk published the <a href="https://github.com/twitter/the-algorithm">Twitter algorithm</a> on GitHub as Open Source. Now all technically driven users can also assist to analyze whether there are discriminatory factors in the algorithm and can even make code suggestion to improve the algorithm.</p><p>Having more eyes solves more issues and publicizing information which your competitors hide, will also raise trust in your company.</p><p>If the algorithm itself is too secret, you can also publish yearly reports with all of you KPIs and the explanation on how they got calculated. You can also ask your readers to give you feedback.</p><p>There are plenty of ways to make your data more transparent without leaking personalized information. Maybe your product has some innovative ways to do so.</p><h3>Should you even Work on Fairness and Inclusion?</h3><h4>“Inclusion makes no sense for us”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukFq8aelOEtlcCtYw34b6Q.png" /></figure><p>In economics, companies need to maximize the profits, so that should be the only focus, right?</p><p>In enterprises you need to think about your social responsibility, especially if your product affects the life of many people. Edward Freeman’s Stakeholder Theory suggests that everybody is a stakeholder, who is affected by the company. This also affects groups who may not be your target group, but are still using your product. Also your suppliers, employees, environments and communities might value your social responsibility. A well managed strategy can have a monetary outcome.</p><p>In <a href="https://www.aflac.com/docs/about-aflac/2016-csr-report/aflac-2016-csr-report_final.pdf">Aflac’s Corporate Social Responsibility report</a> they found out that 75% of consumers are likely to penalize irresponsible companies, 61% of investors see corporate social responsibility (CSR) as a reducing factor for investment risk and 42% of the participants do not want to leave their job because their employer is socially responsible. All of these factors can have a tremendous impact on profit in the long-run.</p><p>There is way more data which shows positive impact of CSR on businesses. You should not treat your company as a short-term project and always try to maximize short-term KPIs. This can backfire and ruin a whole company.</p><h4>“Inclusion is too expensive for us”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gaefTKH2R8UTnLJyt7ecUQ.png" /></figure><p>To be fair, sometimes your target group might consist of a certain gender, race or age. Especially in start-ups where we don’t have many resources, this can be challenging.</p><p>It might be an unsolved social dilemma, but your company has to decide on the trade-off of inclusion vs. monetary cost. From an economical standpoint it can be definitely worth it, if your product gets more accessible for a broader audience.</p><p>Feel free to discuss the pros and cons within your company and make a decision in how far your CSR-strategy should look like. There are many micro-successes which don’t need a lot of resources.</p><p>You could:</p><ul><li>leverage public data sources</li><li>provide inclusion trainings for your team</li><li>incorporate inclusive design principles</li><li>conduct user-feedback sessions with different target groups</li><li>brainstorm a new strategy with your team</li></ul><p>Keep in mind that this is a long-term game. Spending less now could be expensive tomorrow.</p><h3>Conclusion</h3><ul><li>Data can be biased</li><li>Find out what causes those biases</li><li>Discuss the influence of the biases with your teams and decide whether you want to work on them</li><li>Find measures to track them and decide on minimum values to</li><li>Work on ways to eliminate them and track their outcomes</li><li>Monitor your data input in the long run to intervene when it changes into a bad direction again</li></ul><p><strong><em>Please share your feedback with me in the comments. I would love to have a conversation with you!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e6377c4bc41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Here’s how I started with Data Vault Modeling (use this Simple Skill Tree)]]></title>
            <link>https://medium.com/@yosef.a/heres-how-i-started-with-data-vault-modeling-use-this-simple-skill-tree-43be3ee8d4c7?source=rss-794afc7806d------2</link>
            <guid isPermaLink="false">https://medium.com/p/43be3ee8d4c7</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-modeling]]></category>
            <category><![CDATA[data-vault]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <dc:creator><![CDATA[Yosef Aziz]]></dc:creator>
            <pubDate>Mon, 17 Apr 2023 05:01:18 GMT</pubDate>
            <atom:updated>2023-04-17T05:01:18.609Z</atom:updated>
            <content:encoded><![CDATA[<p>It is a lovely day in Data Warehousing Hills. The sun is shining and you are talking to a new client. He gives your company an amazing opportunity by sharing all of his data with you, that your analytics team can turn into cash.</p><p>The problem? Your company is using a data model in which his data doesn’t fit in. As the conversation continues, you realize that the client’s data is highly complex, with multiple sources, formats, and structures.</p><p>You take a moment to assess the situation and consider your options. You could spend months trying to force the client’s data into your existing data model. But then you remembered a solution a weird dude on medium has written about — the Data Vault.</p><h3>Introducing Data Vault 2.0 — A Modern Solution of Data Management</h3><p>Data Vault is designed to handle large volumes of data with lots of relationships in your data warehouse.</p><p>The biggest strength of Data Vault is that it is built incrementally. This means it can easily add new data sources. That helps you get up and running quickly, so you can start using the data right away.</p><p>It is also great for handling changes to the data over time. It keeps track of all the changes that are made. So you can see how things have evolved over time and make sure everyone is working with the most current data. And because Data Vault pushes business logic and calculations to a later step, it’s highly adaptable to change.</p><p>There is quite a lot to learn about Data Vaults, so I like the idea of going through mindmaps. So I can organize the topics more easily and make sure that I don’t miss out on relevant topics.</p><p>My regular process is to try to dig down to as many nodes as possible. This takes a lot of time and I wish I had someone who did this research. Maybe you feel like the same, so I can be this dude.</p><p>Let’s go through all of them one by one!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*TWXMKMLMKqXiG_9ZVon5Vg.png" /></figure><h3>Understanding the Core Components</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*TP1W0OZHsNFFpJJM4uP-Gg.png" /></figure><p>Think of it like a giant file cabinet for data. Just like how you might organize your files into different folders, Data Vault organizes data into three main types of tables: Hubs, Links, and Satellites.</p><p>Hubs represent important business entities, such as customers or orders. Links connect those entities, representing the relationships between them. Satellites hold additional information about the entities or relationships, such as dates or descriptions.</p><h4>Hubs — Creating Effective Business Entities</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MndrMSgNSvfBzJaNNWZp5g.png" /></figure><p>Hubs are your business entities. Imagine them being buckets which contain related data together, so that you have the base-information of your entities in them.</p><p>To create good hubs, think about what things are important to your business. Some examples may be customers, products or orders. These single entities need to be captured in your hubs.</p><p>To identify your entities, you need to give them Business Keys, which I will mention in a later part of this article. This makes sure that every entity stays unique.</p><p>By creating effective hubs, you’ll have a better understanding of your data and you’ll be able to use it more effectively. It might take a bit of work to get it right, but it’s worth it!</p><p>An example for two hubs may be the orders that you got and your customers:</p><pre>CREATE TABLE hub_customer (<br>   customer_key INT NOT NULL PRIMARY KEY,<br>   customer_id VARCHAR(20) NOT NULL,<br>   customer_name VARCHAR(50) NOT NULL,<br>   customer_number INT NOT NULL<br>);<br><br>CREATE TABLE hub_order (<br>   order_key INT NOT NULL PRIMARY KEY,<br>   order_id VARCHAR(20) NOT NULL,<br>   order_date DATE NOT NULL<br>);</pre><h4>Links — Connect all of your data</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lJF8QWs1qYp59nu9P1a3zg.png" /></figure><p>The more data you can connect to eachother, the more opportunities you will have. Links are exactly such connectors. To create links, think about how your data is related. One example might be in between customers and their orders. In this case the link functions as a bridge in between the customers and their orders.</p><p>Here you need a unique identifier for the customer and a unique identifier for the order. Implement both of these in one table, so that you have a mapping. That’s it.</p><p>This is how you would create the link table in SQL:</p><pre>CREATE TABLE link_customer_orders (<br>    customer_order_link_id INT NOT NULL PRIMARY KEY,<br>    customer_hub_id INT NOT NULL,<br>    order_hub_id INT NOT NULL,<br>    FOREIGN KEY (customer_hub_id) REFERENCES customer_hub (customer_id),<br>    FOREIGN KEY (order_hub_id) REFERENCES order_hub (order_id)<br>);</pre><h4>Satellites — Where the Descriptive Data lies</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Juzazzscu2Kcoq5NReLnhw.png" /></figure><p>Satellites let you store additional information related to your hubs and links. They are useful to keep hubs clean and focused on important data. In regular cases, you take your hubs, append them with other entities and finally enrich them with information from the satellites.</p><p>For example, if you have customer data in your hub, you might want to store their address or phone number in a satellite. They can also contain data that tracks changes over time, so that you can see how their address changed over time and how this affected their orders.</p><p>To add in more information in our SQL example, we can create satellites for our customer and order hubs:</p><pre>CREATE TABLE sat_customer (<br>    customer_sat_id INT NOT NULL PRIMARY KEY,<br>    customer_hub_id INT NOT NULL,<br>    customer_name VARCHAR(100) NOT NULL,<br>    customer_email VARCHAR(100) NOT NULL,<br>    customer_address VARCHAR(100) NOT NULL,<br>    customer_city VARCHAR(50) NOT NULL,<br>    customer_state CHAR(2) NOT NULL,<br>    customer_zip VARCHAR(10) NOT NULL,<br>    FOREIGN KEY (customer_hub_id) REFERENCES customer_hub (customer_id)<br>);<br><br>CREATE TABLE sat_order (<br>    order_sat_id INT NOT NULL PRIMARY KEY,<br>    order_hub_id INT NOT NULL,<br>    order_amount decimal(10,2) NOT NULL,<br>    shipping_address varchar(255) NOT NULL,<br>    FOREIGN KEY (order_hub_id) REFERENCES order_hub (order_id)<br>);</pre><h4>Keys — How to Identify your Entities</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*xrd7uEmZ9Ytvz4ZzKFgPTw.png" /></figure><h4><strong>Business Keys</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qU8AEDi_DDxrxmGxY99SwQ.png" /></figure><p>Business keys are unique identifiers for your entities. This helps to ensure that your data stays consistent, even if the underlying source data changes.</p><p>Good business keys are usually understandable for their users. They could be the barcode numbers on products or the credit card number.</p><p>In the graphic above you could answer your sales person’s request easily by connecting the payment hub to a customer hub by having a link table in between.</p><h4>Composite Keys</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*305rzf7PeFd0EqvnIJmbZQ.png" /></figure><p>Sometimes we don’t have a single identifier, but need to use multiple attributes to identify an entity. They are commonly used in Link tables to show relationships in between hubs.</p><p>One example could be a student’s ID number and the time of each class they are taking.</p><h4>Hash Keys</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aneRKwGM4vAE0AMmGJpXCg.png" /></figure><p>Hashing is a way to take a record and turn it into a unique code, like a fingerprint. If you compare the same row at two different times and the hash is different, you know, that the data changed without you needing to look at it.</p><p>Hash keys are generated by hashing one or more attributes of a record. Primary keys aren’t the unique identifier anymore when you have historized data. By using a hash key you don’t need to rely on a primary key. This allows you to more easily combine data from multiple sources and provides a more flexible way to manage your data over time.</p><p><em>Warning: It is extremely unlikely, but hash collisions could occur. This happens, when to different records end up having the same hash value.</em></p><h3>From Data Vault to Actionable Insights</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/1*6wgjmNx4yZuLemdAB9W8OA.png" /></figure><p>Now you have the basic information on Data Vault’s core components. But where should you start in your data warehouse? Let’s look at architectures on how you can organize your information to have the best possible insights.</p><h4>Domain-Driven Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DNhK8ufbx4y-3-YUA1jfxw.png" /></figure><p>In a Domain Driven Architecture, you group your organization in different subject areas, which might be sales, inventory, accounting, repairs, customer service etc. You can use departments, processes or simply groups of questions they can answer.</p><p>By grouping related data together into those subject areas, you can quickly identify the data you need to answer questions. As Data Vault should mostly be used in systems with many data sources, you might get overwhelmed by the amount of various data. Especially if you have a self-service approach for non-technical analysts, you need to make sure that they can quickly identify which data they need.</p><p>Finally you should be able to answer questions such as “What are our top-performing products among our highest-spending customers?” or “Which marketing channels are driving the most conversions?”.</p><h4>Layered Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n4NHpNWF97ms9DtGnTHihw.png" /></figure><p>A Layered Architecture is the way in which the Data Vault is normally organized. The most used layering structure consists of a…</p><p><strong>Source Layer</strong></p><ul><li>Here the data gets pasted in as it is.</li></ul><p><strong>Staging Layer</strong></p><ul><li>The data gets basic cleansing (e.g. changing data types, filling null values, renaming columns).</li></ul><p><strong>Raw Vault</strong></p><ul><li>The staging data gets distributed into hubs, links and satellites.</li></ul><p><strong>Business Vault</strong></p><ul><li>Soft business rules like calculation of KPIs, aggregations or consolidations from different systems get applied on top of the raw vault.</li></ul><p><strong>Information Marts</strong></p><ul><li>Apply the final data into a structure that the recipients of the data will need.</li></ul><h4>Reference Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VZrYuQwJyeXCG_cjIa7L9g.png" /></figure><h4>Data Catalog</h4><p>Metadata management is an important component of any data management strategy, particularly in the context of Data Vault modeling. Metadata refers to the data that describes other data, including its structure, format, and context.</p><p>A good data catalog is a tool or system that helps you organize and manage your data assets by providing a searchable and understandable inventory of your metadata and data sources. It enables your company to easily discover, understand, and use your data, as well as track its lineage and quality, which can help improve decision-making and productivity.</p><p>One example from my experience: We needed to temporarily remove a table on which some reports depended on. At some point you will lose the overview of what is actually connected to it. With our data catalog, we could track the data lineage to all reports that will be affected and warn the departments which used them, that the data will temporarily be not reliable. Having a data catalog saved a lot of effort and potential problems.</p><h4>Data Governance</h4><p>For data governance you try to improve four attributes of your data:</p><ul><li>Availability</li><li>Usability</li><li>Integrity</li><li>Security</li></ul><p>All of this will make sure that your data is accurate, complete and trustworthy. An effective data governance strategy is crucial for a data team. In the long run, it will lead to less bugs, reduce the chance of you having to fix stuff during the weekend, make other departments confident in your skills and provide actual value to the company.</p><p>And that’s it. Now you have the fundamentals to design a Data Vault in your company.</p><p><strong><em>Please share your feedback with me in the comments. I would love to have a conversation with you!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43be3ee8d4c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>