<?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 Alexander Shcherbak on Medium]]></title>
        <description><![CDATA[Stories by Alexander Shcherbak on Medium]]></description>
        <link>https://medium.com/@alexander.shcherbak.as?source=rss-16a0fa1982ef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*chWZNkv53y0qdzE3uVG-Ow.jpeg</url>
            <title>Stories by Alexander Shcherbak on Medium</title>
            <link>https://medium.com/@alexander.shcherbak.as?source=rss-16a0fa1982ef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 00:05:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexander.shcherbak.as/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[Data Ingestion vs Data Integration: Understanding the difference with Medallion Architecture]]></title>
            <link>https://medium.com/dataops-tech/data-ingestion-vs-data-integration-understanding-the-difference-with-medallion-architecture-ab7baee3aaec?source=rss-16a0fa1982ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab7baee3aaec</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[data-ingestion]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-integration]]></category>
            <dc:creator><![CDATA[Alexander Shcherbak]]></dc:creator>
            <pubDate>Tue, 04 Feb 2025 14:02:02 GMT</pubDate>
            <atom:updated>2025-02-04T14:02:02.581Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro</h3><p>We see confusion between <strong><em>data ingestion</em></strong> and <strong><em>data integration</em></strong>, especially when teams adopt medallion<strong> </strong>architecture for building modern data platforms. While these processes work together, they overlap each other in the data pipeline. To clear up this misunderstanding, we will explain how they map to the bronze and silver layers in medallion architecture, a framework increasingly popular for creating flexible data storage.</p><h3>A little bit about Medallion Architecture</h3><p><strong><em>Medallion Architecture</em></strong> is an approach to organizing data in a data lake or a data lakehouse by dividing it into three logical layers: <strong><em>bronze</em></strong>, <strong><em>silver</em></strong>, and <strong><em>gold</em></strong>. Each layer serves a specific purpose in preparing data for analytics and BI and also can be splitted on several, improving its quality, manageability, and usability for various business needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OcT_MVWN_c5pZ0HE1V6GsQ.jpeg" /></figure><h4><strong>Bronze Layer: raw data</strong></h4><p>Contains raw, unprocessed data ingested from various sources (e.g., databases, APIs, logs, or IoT devices). Data at this layer is stored as-is, without any transformations or cleaning.</p><p><strong>Key purpose:</strong> To serve as a historical record and a single source of truth, retaining all original details for traceability.</p><p><strong>Examples<em>:</em></strong> contains raw tables as is.</p><h4><strong>Silver Layer: cleansed and transformed data</strong></h4><p>Processes raw data from the bronze layer to clean, filter, and standardize it. Ensures data quality by handling duplicates, missing values, and errors. Often used for intermediate analytics or operational reporting.</p><p><strong>Examples:</strong> Consolidated and structured data tables, with cleaned customer or product records.</p><h4><strong>Gold Layer: aggregated and analytics-ready data</strong></h4><p>Refines data further to make it suitable for business intelligence (BI) and decision-making. Includes curated, aggregated, and ready-to-use datasets tailored for specific use cases or teams. Focuses on delivering high performance for end-user queries and dashboards.</p><p><strong>Examples:</strong> Pre-aggregated sales metrics or customer behavior insights for dashboards.</p><h3>Data ingestion</h3><p>This is the process of extracting data from sources and loading it into a storage system.<br>In <strong><em>Medallion Architecture</em></strong>, ingestion is focused on loading into <strong><em>bronze</em></strong> layer, where raw data is stored as-is, without transformations.<br>Its purpose is to deliver data efficiently, not to clean or combine it.</p><h3>Data integration</h3><p>Integration also starts as gathering data from different source into <strong><em>bronze</em></strong> layer, where data from multiple sources stored in a single location in raw form.<br>The primary integration happens in the <strong><em>silver</em></strong> layer, where data is cleaned, normalized, and combined.<br>For example, joining transactional data with customer records from different systems to create a unified and consistent view for analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxv_KOa_4AE9SDyvZ4dN8A.jpeg" /></figure><h3>Conclusion</h3><p>In <strong><em>medallion architecture</em></strong>, data ingestion operates at the <strong><em>bronze</em></strong> layer, handling data delivery, while data integration spans both <strong><em>bronze</em></strong> and <strong><em>silver</em></strong> layers. Integration begins with raw data storage in <strong><em>bronze</em></strong> and is fully realized in <strong><em>silver</em></strong> through cleaning and unifying the data. So I would conclude that <strong>data ingestion is a subset of the data integrity process</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab7baee3aaec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dataops-tech/data-ingestion-vs-data-integration-understanding-the-difference-with-medallion-architecture-ab7baee3aaec">Data Ingestion vs Data Integration: Understanding the difference with Medallion Architecture</a> was originally published in <a href="https://medium.com/dataops-tech">DataOps.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Our top 3 books for data engineers in 2025]]></title>
            <link>https://medium.com/dataops-tech/our-top-3-books-for-data-engineers-in-2025-9bb30f3d2c1d?source=rss-16a0fa1982ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bb30f3d2c1d</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Alexander Shcherbak]]></dc:creator>
            <pubDate>Wed, 18 Dec 2024 14:01:34 GMT</pubDate>
            <atom:updated>2024-12-18T14:01:34.578Z</atom:updated>
            <content:encoded><![CDATA[<h3>3 must-read books for data engineers in 2025</h3><blockquote>When discussing d<strong>ata engineering</strong>, it’s easy to focus on books that dive into specific tools: Spark, Kafka, Terraform, etc. However, to build effective and reliable platforms, you must remember that the fundamental principles truly matter and stand the test of time, regardless of technology.</blockquote><h4><strong>Fundamentals of Data Engineering</strong></h4><p>📖 <em>Joe Reis and Matt Housley</em></p><p>This book provides a comprehensive understanding of <strong>Data Engineering</strong> (DE). It covers the data lifecycle, core architectural patterns, and best practices for building scalable and reliable systems. The authors focus on methodologies rather than tying concepts to specific tools, making them timeless.</p><p>It offers a clear and approachable explanation of key data engineering principles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*BPNkera37Q7uzwsGZjKPKw.jpeg" /></figure><h4><strong>Designing Data-Intensive Applications</strong></h4><p>📖 <em>Martin Kleppmann</em></p><p>This is a classic guide on designing reliable, scalable, and high-performance systems for handling data. It covers key topics such as data storage, distributed systems, consistency, and stream processing.</p><p>It’s the main resource for understanding the architecture of data systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*adCpPyAQCnAyXNgC2GA85A.png" /></figure><h4><strong>Site Reliability Engineering: How Google Runs Production Systems</strong></h4><p>📖 <em>Google’s SRE Team</em></p><p>While this book focuses on <strong>Site Reliability Engineering</strong> (SRE), its principles are highly relevant to building reliable<strong> </strong>data platforms. It introduces Google’s approach to ensuring system reliability, covering concepts like <strong>SLA</strong>, <strong>SLO</strong>, <strong>SLI</strong>, and automation.</p><p>It teaches you how to design and maintain resilient, high-availability platforms and provides a deeper understanding of operations, monitoring, and observability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*cAUrnbw2H61H2Amh0WiszA.jpeg" /></figure><h4><strong>Conclusion</strong></h4><p>These three books will give you a solid foundation for designing and maintaining modern data platforms. They aren’t about tools that become obsolete in a few years — they focus on principles and approaches that remain relevant regardless of technology.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bb30f3d2c1d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dataops-tech/our-top-3-books-for-data-engineers-in-2025-9bb30f3d2c1d">Our top 3 books for data engineers in 2025</a> was originally published in <a href="https://medium.com/dataops-tech">DataOps.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[data load tool (dlt): how to integrate it in your Apache Airflow orchestrator]]></title>
            <link>https://medium.com/dataops-tech/data-load-tool-dlt-how-to-integrate-it-in-your-apache-airflow-orchestrator-0c4195fb18fd?source=rss-16a0fa1982ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c4195fb18fd</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-integration]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Alexander Shcherbak]]></dc:creator>
            <pubDate>Tue, 10 Dec 2024 21:17:23 GMT</pubDate>
            <atom:updated>2024-12-10T21:17:23.051Z</atom:updated>
            <content:encoded><![CDATA[<h3>data load tool (dlt): how to integrate it in your Airflow orchestrator</h3><h4>Intro</h4><p>In this article we’ll explore how to integrate <strong>dlt (data load tool)</strong> with an <strong>Apache Airflow </strong>orchestrator to enable seamless data ingestion workflows. If you’re new to <strong>dlt</strong> <a href="https://medium.com/dataops-tech/data-load-tool-dlt-pros-cons-and-integration-into-data-platform-as-an-ingest-tool-eb34311a2007">check out the previous articles</a> for an introduction. Here we’ll focus on orchestrating <strong>dlt</strong> pipelines using <strong>Airflow</strong>.</p><h4>Requirements we need</h4><p>To up Airflow locally check <a href="https://dorian599.medium.com/airflow-install-local-environment-bb3e98a216fc">how</a> if you need.</p><p>Comment <em>image</em> and uncomment <em>build</em> param in the generated <em>docker-compose.yaml</em>. We need it to build Airflow with custom libraries.</p><pre>#image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:&lt;your_version&gt;}<br>  build: .</pre><p>Create <em>requirements.txt</em> with needed PIP packages.</p><pre>dlt==1.4.0<br>duckdb==1.1.3<br>apache-airflow==2.9.0<br>pydantic==2.10.3</pre><p>Create <em>Dockerfile</em></p><pre>FROM apache/airflow:&lt;your_version&gt;<br>ADD requirements.txt .<br>RUN pip install -r requirements.txt</pre><p>Put <em>Dockerfile</em> and <em>requirements.txt</em> in the directory with <em>docker-compose.yaml</em></p><p>Up Airflow</p><pre>docker compose up --build</pre><h4><strong>Initialize a dlt pipeline</strong></h4><p>Start by initializing a <strong>dlt</strong> pipeline for our use case. For this example, we’ll use the <strong>fruitshop</strong> source and <strong>DuckDB</strong> as the destination.</p><pre>dlt init fruitshop duckdb</pre><p>Next, reformat the initialized pipeline for our purposes:</p><pre>import dlt<br>from dlt.common import Decimal<br><br><br>@dlt.resource(primary_key=&quot;id&quot;)<br>def customers():<br>    &quot;&quot;&quot;Load customer data from a simple python list.&quot;&quot;&quot;<br>    yield [<br>        {&quot;id&quot;: 1, &quot;name&quot;: &quot;simon&quot;, &quot;city&quot;: &quot;berlin&quot;},<br>        {&quot;id&quot;: 2, &quot;name&quot;: &quot;violet&quot;, &quot;city&quot;: &quot;london&quot;},<br>        {&quot;id&quot;: 3, &quot;name&quot;: &quot;tammo&quot;, &quot;city&quot;: &quot;new york&quot;},<br>    ]<br><br><br>@dlt.resource(primary_key=&quot;id&quot;)<br>def inventory():<br>    &quot;&quot;&quot;Load inventory data from a simple python list.&quot;&quot;&quot;<br>    yield [<br>        {&quot;id&quot;: 1, &quot;name&quot;: &quot;apple&quot;, &quot;price&quot;: Decimal(&quot;1.50&quot;)},<br>        {&quot;id&quot;: 2, &quot;name&quot;: &quot;banana&quot;, &quot;price&quot;: Decimal(&quot;1.70&quot;)},<br>        {&quot;id&quot;: 3, &quot;name&quot;: &quot;pear&quot;, &quot;price&quot;: Decimal(&quot;2.50&quot;)},<br>    ]<br><br><br>@dlt.source<br>def fruitshop_source(start_date):<br>    &quot;&quot;&quot;A source function groups all resources into one schema.&quot;&quot;&quot;<br>    return customers(), inventory()</pre><h4>Pydantic models</h4><p>You can use <a href="https://docs.pydantic.dev/latest/">Pydantic</a> to parse and validate the YAML configuration file, although not all models are included in the scope of this article I’ll give several.</p><pre>import pendulum<br>from datetime import datetime<br>from typing import Optional, List<br><br>from pydantic.v1 import BaseModel, root_validator<br><br>class PipelineTaskConfig(BaseModel):<br>    decompose: Optional[str] = &quot;parallel-isolated&quot;<br>    trigger_rule: Optional[str] = &quot;all_done&quot;<br>    retries: Optional[int] = 0<br>    provide_context: Optional[bool] = True<br><br>class Task(BaseModel):<br>    source: str<br>    run_parameters: Optional[PipelineTaskConfig] = PipelineTaskConfig()<br>    source_parameters: Optional[dict] = None</pre><h4>Configuring the DAG</h4><p>Create a YAML file to define the pipeline configuration. This approach makes the setup dynamic and scalable.</p><pre>dags:<br>  fruitshop_ingest:<br>    dag_config:<br>      description: &#39;DAG is responsible for ingesting fruitshop data.&#39;<br>      tags: [ &quot;ingest&quot;, &quot;dlt&quot;, &quot;fruitshop&quot; ]<br>      default_args:<br>      schedule_interval: &#39;0 * * * *&#39;<br>    tool: dlt<br>    dag_type: fruitshop<br>    pipeline:<br>      pipeline_name: &quot;fruitshop_pipeline&quot;<br>      destination_name: &#39;bronze_fruitshop&#39;<br>      tasks:<br>        - source: fruitshop_source<br>          source_parameters:<br>            start_date: &#39;2024-05-21&#39;</pre><h4>Create an Airflow DAG</h4><p>We’ll use the <strong>PipelineTasksGroup</strong> helper from <a href="https://dlthub.com/docs/api_reference/helpers/airflow_helper">dlt.helpers.airflow_helper</a> to orchestrate tasks.<br><strong>Pydantic’s</strong> primary purpose in this context is to ensure the configuration file adheres to the expected schema, providing robust error handling and validation.</p><p>Logic to generate Airflow DAG for our dlt tasks.</p><pre>import os<br>import dlt<br>import yaml<br><br>from airflow.operators.dummy import DummyOperator<br>from airflow.models import DAG<br>from dlt.helpers.airflow_helper import PipelineTasksGroup<br><br>from dag_factory.models import Config, Dag<br><br>from ingest.pull.fruitshop.fruitshop import fruitshop_source<br><br><br>DAGS_PATH = f&#39;{os.getcwd()}/dags&#39;<br>DIR = f&quot;{DAGS_PATH}/pipeline_configs&quot;<br>ENV = &quot;development&quot;<br><br>def generate_dlt_dag(pipeline_config: Dag) -&gt; DAG:<br>    with DAG(**pipeline_config.dag_config) as dag:<br>        start = DummyOperator(<br>            task_id=&#39;start&#39;<br>        )<br>        end = DummyOperator(<br>            task_id=&#39;end&#39;<br>        )<br>        with PipelineTasksGroup(<br>            pipeline_config.pipeline.pipeline_name,<br>            **pipeline_config.pipeline.group_config<br>        ) as pipeline_group:<br><br>            pipeline = dlt.pipeline(<br>                pipeline_name=pipeline_config.pipeline.pipeline_name,<br>                dataset_name=pipeline_config.pipeline.destination_name,<br>                **pipeline_config.pipeline.common_config<br>            )<br><br>            for task in pipeline_config.pipeline.tasks:<br><br>                pipeline_group.add_run(<br>                    pipeline,<br>                    fruitshop_source(**task.source_parameters),<br>                    **task.run_parameters<br>                )<br><br>        start &gt;&gt; pipeline_group &gt;&gt; end<br><br>    return dag</pre><h4><strong>Load config and generate Airflow DAG</strong></h4><p>Write a script to parse the YAML configuration and generate the Airflow DAGs dynamically.</p><pre>for root, _, files in os.walk(DIR):<br>    for filename in files:<br>        if filename.endswith((&quot;.yaml&quot;, &quot;.yml&quot;)):<br>            file_path = os.path.join(root, filename)<br>            with open(file_path, &quot;r&quot;) as file:<br>                yaml_data = yaml.safe_load(file)<br>                for dag_id, dag_config in yaml_data[&quot;dags&quot;].items():<br>                    dag_config[&quot;dag_config&quot;][&quot;dag_id&quot;] = dag_id<br>                    config = Config(**yaml_data).dags[dag_id]<br>                    generate_dlt_dag(pipeline_config=config)</pre><h4><strong>Key features of the integration</strong></h4><p>Each <strong><em>dlt resource</em></strong> (e.g., customers and inventory) is treated as an independent task, providing flexibility in execution.</p><p>You can manage how the source is decomposed into Airflow tasks. Check the <strong><em>PipelineTaskConfig</em></strong> model and its <strong>decompose</strong> parameter to select the desired strategy: <em>none</em> (no decomposition), <em>serialize</em> (sequential decomposition), <em>parallel</em> (parallel tasks with shared state), or <em>parallel-isolated</em> (parallel tasks with isolated states).</p><p>The YAML-based pipeline setup makes it easy to define and manage multiple pipelines.</p><h4>Final result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vHhdx4XVHHJoZnYpGWgtw.png" /><figcaption>Apache Airflow DLT pipeline</figcaption></figure><p>As you see every <strong><em>dlt resource</em></strong><em> </em>is an independent task in DAG.</p><h4><strong>Conclusion</strong></h4><p>Integrating <strong>dlt</strong> with <strong>Apache Airflow</strong> provides a robust and flexible way to orchestrate data ingestion pipelines. By leveraging <strong>dlt</strong>’s <strong>resource</strong> and pipeline abstractions along with Airflow’s scheduling and monitoring capabilities, you can build your workflows with minimal effort.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c4195fb18fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dataops-tech/data-load-tool-dlt-how-to-integrate-it-in-your-apache-airflow-orchestrator-0c4195fb18fd">data load tool (dlt): how to integrate it in your Apache Airflow orchestrator</a> was originally published in <a href="https://medium.com/dataops-tech">DataOps.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[data load tool (dlt): write disposition strategies of data ingestion]]></title>
            <link>https://medium.com/dataops-tech/data-load-tool-dlt-write-disposition-strategies-of-data-ingestion-91d563a594bb?source=rss-16a0fa1982ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/91d563a594bb</guid>
            <category><![CDATA[data-integration]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-platforms]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Alexander Shcherbak]]></dc:creator>
            <pubDate>Sun, 01 Dec 2024 17:46:26 GMT</pubDate>
            <atom:updated>2024-12-02T09:01:30.826Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I believe in avoiding unnecessary complexity and striving for simple, efficient solutions. Why reinvent the wheel when tools like <strong>dlt</strong> can make life easier? In this article, I’ll share three essential strategies for streamlining data ingestion and populating the raw layer of your data platform</blockquote><h4>Intro</h4><p>If you’re tasked with gathering data from diverse sources and establishing the foundational <strong>raw layer</strong> of a <strong>medallion architecture</strong>, you’re in the right place. Whether you’re working with APIs, OLTP databases, or filesystems, this article will provide actionable insights for implementing ingest data pipelines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GKnGglyuDR8Bp85peQiznQ.png" /><figcaption>Ingest part of data architecture</figcaption></figure><p><strong>dlt</strong> simplifies the <strong>data ingestion process</strong> by:</p><ul><li>Managing schema migrations</li><li>Saving the last processed increment point for incremental loads.</li><li>Handling logic for data inserts seamlessly.</li></ul><blockquote>Think of <strong>dlt</strong> as a counterpart to <strong>dbt</strong>, but for ingestion rather than transformation. While <strong>dbt</strong> focuses on transforming data post-ingestion, <strong>dlt</strong> handles the critical task of getting data from your sources into your raw tables.</blockquote><p>In this article, I’ll cover three common write disposition strategies of <strong>dlt</strong>, each applied to a typical data source:</p><p><strong><em>Replace</em></strong>: Overwrite datasets entirely.</p><p><strong><em>Append</em></strong>: Add new records without affecting existing data.</p><p><strong><em>Merge</em></strong>: Update existing records and insert new ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9oQmYCqHdZfDuAhe9jLtDQ.png" /><figcaption>Two simple questions determine the write disposition you use</figcaption></figure><h4><strong>Choosing the Right Strategy</strong></h4><p>Before diving into implementation, remember that <strong>you are responsible for defining how to fetch data from the source</strong>.</p><p>This includes:</p><ul><li>Determining the source structure (e.g., keys, time marks)</li><li>Defining merge keys for deduplication.</li><li>Choosing the right strategy based on your data needs.</li><li>Making the process efficient by using pagination and parallelism techniques</li></ul><p><strong>dlt</strong> simply takes your dataset, strategy, and configuration, and ensures the data lands in your destination.</p><pre>import dlt<br>from dlt.common import pendulum<br>from dlt.common.time import ensure_pendulum_datetime<br><br><br>mock_users_data_1 = [<br>    {&quot;user_id&quot;: 1, &quot;name&quot;: &quot;Tom P.&quot;, &quot;updated_at&quot;: &quot;2024-11-31T14:02:00&quot;},<br>    {&quot;user_id&quot;: 2, &quot;name&quot;: &quot;Teodor R.&quot;, &quot;updatedAt&quot;: &quot;2024-11-31T14:03:00&quot;},<br>    {&quot;userId&quot;: 3, &quot;name&quot;: &quot;Ann K.&quot;, &quot;updatedAt&quot;: &quot;2024-11-31T14:04:00&quot;},<br>    {&quot;user_id&quot;: 4, &quot;name&quot;: &quot;Marian L.&quot;, &quot;updatedAt&quot;: &quot;2024-11-31T14:07:00&quot;},<br>]<br><br>mock_users_data_2 = [<br>    {&quot;user_id&quot;: 5, &quot;name&quot;: &quot;Teo M.&quot;, &quot;updated_at&quot;: &quot;2024-11-31T14:14:00&quot;},<br>    {&quot;userId&quot;: 6, &quot;name&quot;: &quot;Mel K.&quot;, &quot;updated_at&quot;: &quot;2024-11-31T14:20:00&quot;},<br>    {&quot;userId&quot;: 7, &quot;name&quot;: &quot;Max L.&quot;, &quot;updated_at&quot;: &quot;2024-11-31T14:21:00&quot;},<br>]<br><br>mock_products_data_1 = [<br>    {&quot;product_id&quot;: 1, &quot;Name&quot;: &quot;T-shirt&quot;, &quot;price&quot;: 21.0},<br>    {&quot;product_id&quot;: 2, &quot;name&quot;: &quot;Cap&quot;, &quot;price&quot;: 10.0},<br>]<br><br>mock_products_data_2 = [<br>    {&quot;product_id&quot;: 2, &quot;name&quot;: &quot;Cap&quot;, &quot;price&quot;: 12.0},<br>    {&quot;product_id&quot;: 3, &quot;name&quot;: &quot;Jacket&quot;, &quot;price&quot;: 300.0},<br>]<br><br>mock_user_rates_2024_11_29 = [<br>    {&quot;id&quot;: 1, &quot;Name&quot;: &quot;Tom P.&quot;, &quot;rate&quot;: 90.0},<br>    {&quot;id&quot;: 2, &quot;NAME&quot;: &quot;Teodor R.&quot;, &quot;rate&quot;: 80},<br>    {&quot;id&quot;: 3, &quot;Name&quot;: &quot;Ann K.&quot;, &quot;rate&quot;: 63},<br>    {&quot;id&quot;: 4, &quot;name&quot;: &quot;Marian L.&quot;, &quot;rate&quot;: 12.0},<br>]<br><br>mock_user_rates_2024_11_30 = [<br>    {&quot;id&quot;: 5, &quot;Name&quot;: &quot;Teo M.&quot;, &quot;rate&quot;: 90.0},<br>    {&quot;id&quot;: 2, &quot;NAME&quot;: &quot;Teodor R.&quot;, &quot;rate&quot;: 42},<br>    {&quot;id&quot;: 6, &quot;Name&quot;: &quot;Mel K.&quot;, &quot;rate&quot;: 23},<br>    {&quot;id&quot;: 7, &quot;name&quot;: &quot;Max L.&quot;, &quot;rate&quot;: 10.0},<br>]<br><br><br>def fetch_data(source, state):<br>    if source == &quot;users&quot;:<br>        return mock_users_data_1 if state is None else mock_users_data_2<br>    elif source == &quot;products&quot;:<br>        return mock_products_data_1 if state is None else mock_products_data_2<br>    else:<br>        return mock_user_rates_2024_11_29 if state is None else mock_user_rates_2024_11_30<br></pre><blockquote>Take to attention that fields of source data can be in snake case or camel case but it doesn’t matter for <strong>dlt</strong>, it will normalize it. Check video below.</blockquote><h4><strong>Replace Strategy (S3 source)</strong></h4><p><strong>Use Case</strong>: Overwriting entire datasets, such as daily exported files.</p><p>The <strong>replace</strong> strategy fully replaces the dataset on every run, ensuring the table reflects the latest state.</p><p><strong>Implementation</strong></p><pre>@dlt.source<br>def s3_source():<br>    @dlt.resource(name=&quot;top_rate_users&quot;, write_disposition=&quot;replace&quot;, table_format=&quot;iceberg&quot;)<br>    def fetch_s3_data():<br>        dlt.current.state().setdefault(&quot;top_rate_users_date&quot;, None)<br><br>        rows = fetch_data(&quot;top_rate_users&quot;, dlt.current.state()[&quot;top_rate_users_date&quot;])<br><br>        dlt.current.state()[&quot;top_rate_users_date&quot;] = pendulum.now().start_of(&quot;day&quot;).isoformat()<br><br>        yield rows<br><br>    return fetch_s3_data</pre><p>Fetches data from S3 files (simulated in this example).</p><p>Replaces all previous data in the s3_data table with the latest dataset. Here, the name argument in the resource decorator equals the name of the table in the destination</p><p>Suitable for scenarios where the entire dataset changes frequently or when you need to update some dictionaries. Similar for <strong>dbt</strong> seeds cases.</p><h4><strong>Append Strategy (API)</strong></h4><p><strong>Use Case</strong>: Incremental data ingestion from sources like REST APIs.</p><p>The <strong>append</strong> strategy adds new data without modifying existing records. dlt tracks the <strong>last processed timestamp</strong> using its state, ensuring no duplicates are processed.</p><p><strong>Implementation</strong></p><pre>@dlt.source<br>def api_source():<br>    @dlt.resource(name=&quot;users&quot;, write_disposition=&quot;append&quot;, table_format=&quot;iceberg&quot;)<br>    def fetch_users():<br>        dlt.current.state().setdefault(&quot;users_date&quot;, None)<br><br>        rows = fetch_data(&quot;users&quot;, dlt.current.state()[&quot;users_date&quot;])<br><br>        dlt.current.state()[&quot;users_date&quot;] = pendulum.now().start_of(&quot;day&quot;).isoformat()<br><br>        yield rows</pre><p>Tracks the last processed date using state management. Maybe I’ll cover the state logic in the next article. What you should know is that <strong>dlt</strong> has a mechanism to save a marker that represents a point in time.</p><p>Fetches and appends new user records incrementally.</p><p>Perfect for sources providing time-based updates (e.g., logs, events).</p><h4><strong>Merge Strategy (OLTP table)</strong></h4><p><strong>Use Case</strong>: Updating transactional data from PostgreSQL or other databases.</p><p>The <strong>merge</strong> strategy updates existing records and inserts new ones based on a primary key. This is particularly useful for transactional systems where records change frequently.</p><p><strong>Implementation</strong></p><pre>@dlt.source<br>def rds_source():<br>    @dlt.resource(name=&quot;products&quot;, write_disposition=&quot;merge&quot;, primary_key=&quot;product_id&quot;, table_format=&quot;iceberg&quot;)<br>    def fetch_products():<br>        dlt.current.state().setdefault(&quot;products_date&quot;, None)<br><br>        rows = fetch_data(&quot;products&quot;, dlt.current.state()[&quot;products_date&quot;])<br><br>        dlt.current.state()[&quot;products_date&quot;] = pendulum.now().start_of(&quot;day&quot;).isoformat()<br><br>        yield rows<br><br>    return fetch_products</pre><p>Fetches product data from the OLTP table source (mocked in this example).</p><p>Updates existing records based on the <em>primary_key</em> (product_id).</p><p>Ensures the products table is always up-to-date with minimal duplication.</p><p><strong>Bringing It All Together</strong></p><p>Now that we’ve defined each source and strategy, we can combine them into a single pipeline:</p><pre>if __name__ == &quot;__main__&quot;:<br>    pipeline = dlt.pipeline(<br>        pipeline_name=&quot;ingest&quot;,<br>        destination=&quot;athena&quot;,<br>        dataset_name=&quot;raw&quot;<br>    )<br>    sources = [s3_source(), api_source(), rds_source()]<br>    for source in sources:<br>        pipeline.run(source)</pre><p>Tip: <em>dataset_name</em> is name of the schema in your destination.</p><h4>Tables Structure After Each Run</h4><p>Here’s what the resulting tables will look like after the <strong>first</strong> and <strong>second</strong> runs</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7D26kBFbIeM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7D26kBFbIeM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7D26kBFbIeM%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/165e409e1b78cfb388a3586f2b0a4a27/href">https://medium.com/media/165e409e1b78cfb388a3586f2b0a4a27/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F11HCLp_PZxY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D11HCLp_PZxY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F11HCLp_PZxY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c933de24a17321cfaa487db4b919618f/href">https://medium.com/media/c933de24a17321cfaa487db4b919618f/href</a></iframe><p>Airtable tables are without meta columns like <em>_dlt_id </em>to represent you how the structure of source data will look like in your destination.</p><p><strong>top_rate_users</strong> table with <strong><em>replace</em></strong> write disposition strategy</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FappTmSH7yJO4r6eFX%2FshrLITwg6hOyU3Rk1&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FappTmSH7yJO4r6eFX%2FshrLITwg6hOyU3Rk1&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable_brand.png&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/198227591155a658ff956bd9e00934b1/href">https://medium.com/media/198227591155a658ff956bd9e00934b1/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FappTmSH7yJO4r6eFX%2FshrSMtpG6z60CbDeJ&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FappTmSH7yJO4r6eFX%2FshrSMtpG6z60CbDeJ&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable_brand.png&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/18a80620b66763eb3d0ea89c6c498241/href">https://medium.com/media/18a80620b66763eb3d0ea89c6c498241/href</a></iframe><p><strong>users</strong> table with <strong><em>append</em></strong> write disposition strategy</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FappTmSH7yJO4r6eFX%2Fshr8NO7H9Vqd7br8y&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FappTmSH7yJO4r6eFX%2Fshr8NO7H9Vqd7br8y&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable_brand.png&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/49fae02297cf376452bd22555f2ffda9/href">https://medium.com/media/49fae02297cf376452bd22555f2ffda9/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FappTmSH7yJO4r6eFX%2FshryTPFKvLePZXalf&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FappTmSH7yJO4r6eFX%2FshryTPFKvLePZXalf&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable_brand.png&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/0104402eb42cec1306465b706fc23d45/href">https://medium.com/media/0104402eb42cec1306465b706fc23d45/href</a></iframe><p><strong>products</strong> table with <strong><em>merge</em></strong> write disposition strategy</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FappTmSH7yJO4r6eFX%2FshrWYu64Nk53BNGOV&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FappTmSH7yJO4r6eFX%2FshrWYu64Nk53BNGOV&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable_brand.png&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/9391789f80ac9e63d2d55ba525ec47ba/href">https://medium.com/media/9391789f80ac9e63d2d55ba525ec47ba/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FappTmSH7yJO4r6eFX%2Fshr7ZdGzMORUazHgk&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FappTmSH7yJO4r6eFX%2Fshr7ZdGzMORUazHgk&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable_brand.png&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/174786b7b3e5e8af97e7684c5d5bf986/href">https://medium.com/media/174786b7b3e5e8af97e7684c5d5bf986/href</a></iframe><h4><strong>Conclusion</strong></h4><p>DLT makes data ingestion straightforward, allowing you to focus on source-specific logic while handling schema management and incremental updates automatically. By selecting the right strategy for each source, you can build robust pipelines that cater to your raw data layer’s unique needs.</p><p>Happy engineering! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91d563a594bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dataops-tech/data-load-tool-dlt-write-disposition-strategies-of-data-ingestion-91d563a594bb">data load tool (dlt): write disposition strategies of data ingestion</a> was originally published in <a href="https://medium.com/dataops-tech">DataOps.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[data load tool (dlt): pros, cons, and integration into data platform as an ingest tool]]></title>
            <link>https://medium.com/dataops-tech/data-load-tool-dlt-pros-cons-and-integration-into-data-platform-as-an-ingest-tool-eb34311a2007?source=rss-16a0fa1982ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb34311a2007</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-integration]]></category>
            <category><![CDATA[data-platforms]]></category>
            <dc:creator><![CDATA[Alexander Shcherbak]]></dc:creator>
            <pubDate>Mon, 08 Jul 2024 13:01:28 GMT</pubDate>
            <atom:updated>2024-12-13T23:26:18.786Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I’d like to share insights on integrating DLT for one of our projects. I’m not covering the technology in depth in this post but just sharing my experience of integrating it, so apologies for that here’s a link to the <a href="https://dlthub.com/docs/intro">DLT documentation</a> for more details :)</p><p>One of our clients, a young company focused on marketing analytics, presented us with a challenge. They needed to analyze the profitability of their marketing campaigns in real-time to make decisions on canceling or continuing them. Initially, we knew that we would work with Facebook Ads and Stripe sources primarily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E5P6JT28srSbPmcj2OMWcg.png" /><figcaption>Main site page</figcaption></figure><h4><strong>Discovering the Right Tool</strong></h4><p>We didn’t start to write own code because in 2024 year there are a lot ingest tools which have a lot of connectors so we started to looking for the most appropriate one. Our journey began with evaluating several popular data ingestion tools. <a href="https://airbyte.com/">Airbyte</a> was our first candidate due to its extensive range of connectors and I think the most popular. However, as we delved deeper into its documentation, we realized that Airbyte might complicate the initial Proof of Concept (POC) phase. Our client’s need for rapid results and budget constraints ruled out the paid version, leaving us with the open-source option, which required setup effort, but client point was quick result for short period of time.</p><p>Determined to find a better solution, we considered alternatives like <a href="https://www.fivetran.com/">Fivetran</a> and <a href="https://meltano.com/">Meltano,</a> but the Data Load Tool (DLT) caught our eye. DLT promised already predefined solution for working with Facebook Ads and Stripe and flexibility so we decided to give it a try.</p><h4><strong>The Magic of DLT</strong></h4><p>The first time we deployed DLT for Facebook Ads was almost magical. With a single command</p><pre>dlt init facebook_ads athena</pre><p>We set up a pipeline that generated a folder filled with Python code. This code was ready to fetch data from Facebook Ads and push it into our destination, S3 + Athena. Unlike traditional connectors, DLT provided us with actual code, which meant we could optimize and extend it as needed. Also it generates config file with params like for type of tables(iceberg, parquet) and file with connection params for your source and destination. But we decided to not manage it in our code so we skip it here.</p><figure><img alt="The structure of folder after running command above" src="https://cdn-images-1.medium.com/max/468/1*z6cw0VAv6bQWQ3-A2KVz6g.png" /><figcaption>The folder structure in your code repo wfter running command above</figcaption></figure><p>In many situations, everything seems to be working perfectly until you hit a snag in production. With DLT, we had a source code pipeline that covered 99% of the nuances of working with the source, and we could make real-time optimizations. This was a game-changer for us, as it allowed us to address issues swiftly without waiting for open-source contributions to be merged. Also when we decided to get additional data we extended basic source with new resource, resource as result is a table in your destination. So simple :)</p><p>Resource:</p><pre>  @dlt.resource(primary_key=&quot;id&quot;, write_disposition=&quot;merge&quot;)<br>  def accounts(<br>      fields: Sequence[str] = DEFAULT_ACCOUNT_FIELDS<br>  ) -&gt; Iterator[TDataItems]:<br>      yield dict(account.api_get(fields))</pre><p>Source returns resources:</p><pre>@dlt.source(name=&quot;facebook_insights&quot;)<br>def facebook_insights_source(<br>    account_id: str = None,<br>    access_token: str = dlt.secrets.value,<br>    ...<br>) -&gt; DltResource:<br>  ...</pre><h4><strong>The Integration Journey</strong></h4><p>After executing the initial setup command, we received Python code which define sources after that we need to call them to start the data fetching process. For doing that you can create a pipeline instance, here a <a href="https://dlthub.com/devel/walkthroughs/run-a-pipeline">doc </a>. The final step was to run orchestration process for these tasks to ensure data was ingested at regular intervals. I’d like to say that we used Airflow helper from DLT team to run the pipeline smoothly on Airflow. Here a <a href="https://dlthub.com/docs/walkthroughs/deploy-a-pipeline/deploy-with-airflow-composer">link for doc page</a> , it says how deploy on Google Composer but also there is a source code how to use helper.</p><p>Given our client’s primary use of AWS, we decided to deploy the orchestrator using AWS Managed Workflows for Apache Airflow (MWAA). This decision was influenced by the need for an easily manageable solution that integrated well with their existing infrastructure. MWAA provided the simplicity and integration we needed, allowing us to meet our client’s requirements efficiently.</p><h4><strong>Evaluating DLT: The Pros and the Cons</strong></h4><p>As we continued working with DLT, we discovered several significant advantages. The flexibility and maintainability of having actual Python code were unparalleled. We could quickly fix bugs, extend logic, and optimize the code to meet our specific needs. DLT felt like a low-code solution that provided a solid template to build upon. Also in developing phase our sources have been extended so we need to write custom resources for custom REST APIs and it was easy just using templates to build ingest for specific use cases like playing LEGO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvV2gwjpQmsqRUJsn8TVrw.png" /><figcaption>“DLT tool like LEGO” generated by <a href="https://uk.wikipedia.org/wiki/DALL-E">DALL-E</a></figcaption></figure><p>However, DLT wasn’t without its drawbacks. Its relative lack of popularity meant fewer available connectors compared to Airbyte. At the time of writing, DLT supported only 33 sources and 15 destinations, significantly fewer than Airbyte’s 350+ connectors. This limitation required us to sometimes find workarounds or custom solutions for less common data sources but as I pointed this lib gives you write custom logic for any source really quick just using common bulding blocks like resource, source, state, etc.</p><h4><strong>Conclusion: A Worthy Addition</strong></h4><p>In the end, integrating DLT into our client’s data platform proved to be a rewarding experience. Despite some limitations, the advantages of flexibility, maintainability, and cost-efficiency made it a valuable addition to our toolkit. For startups and companies with specific needs, DLT offers a compelling solution that balances ease of use with powerful customization options.</p><p>If you’re looking for a data ingestion tool that can adapt to your unique requirements and provide a seamless integration experience, we highly recommend giving DLT a try.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb34311a2007" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dataops-tech/data-load-tool-dlt-pros-cons-and-integration-into-data-platform-as-an-ingest-tool-eb34311a2007">data load tool (dlt): pros, cons, and integration into data platform as an ingest tool</a> was originally published in <a href="https://medium.com/dataops-tech">DataOps.tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Quality in Snowplow]]></title>
            <link>https://medium.com/@alexander.shcherbak.as/data-quality-in-snowplow-100c3f9719b5?source=rss-16a0fa1982ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/100c3f9719b5</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-quality]]></category>
            <category><![CDATA[google-analytics]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[snowplow-analytics]]></category>
            <dc:creator><![CDATA[Alexander Shcherbak]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 13:03:08 GMT</pubDate>
            <atom:updated>2022-07-27T09:33:06.466Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Disclaimer: In my </em><a href="https://medium.com/@alexander.shcherbak.as/dont-use-google-analytics-try-snowplow-instead-c90d48ee47e0"><em>first article</em></a><em> I wrote you should use Snowplow instead of Google Analytics. If you were interested then this article is good fit for you.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KD9o8AVQST4d_HPUQrXcsw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@christiaanhuynen_designbro?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Christiaan Huynen</a> on <a href="https://unsplash.com/collections/91372573/igloo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Data Quality matter</h4><p>From time to time I had a cup of coffee with my data analyst colleagues and of course we discussed our challenges on daily basis. One of the main concerns these guys complained were that their main task of their job is looking for new insights in data but they spend a lot of time to filter bad data and trying to figure out that found insights are really relevant for business process. These problems were when we used Google Analytics for collecting behavioural data. Platform didn’t divide data on good and bad and was as black box for us. When we started analysing data problem we found that there were two common problems with data we should solve: inaccurate data and missed data. Why we need to save poor data at our data warehouse if we can filter it on upstream stages and data analyst job will be easier? Their work is looking for new insights which can boost business growth.</p><h4>How can we minimise inaccurate data with Snowplow?</h4><p>Snowplow by default prevent inconsistent data in your data warehouse. If you want to collect any of events on your site or app than first of all you should write a strict schema which self-describe tracking event. When event goes through data processing pipeline it will be checked and if event don’t match any of schemas in schema repository the event will be marked as bad and could be stored in blob storage (AWS S3) where in future the reason of failure might be checked by data team. For saving schemas there is service called Iglu.</p><blockquote>Iglu is a machine-readable, open-source schema registry for <a href="http://json-schema.org/">JSON schema</a> and Thrift schema from the team at <a href="http://snowplowanalytics.com/">Snowplow Analytics</a>. A schema registry is like <em>npm</em> or <em>Maven</em> or <em>git</em> but holds data schemas instead of software or code.</blockquote><p>Iglu clients are communicating with schemas repositories and are integrated into enricher and rdb-loader services to validate schemas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*Jxtn4gOKo0FriuQutjSWeA.png" /><figcaption>Iglu</figcaption></figure><p>Snowplow team already have wrote some <a href="https://github.com/snowplow/iglu-central/tree/master/schemas">schemas</a> which you can use. As I said in my <a href="https://medium.com/@alexander.shcherbak.as/dont-use-google-analytics-try-snowplow-instead-c90d48ee47e0">previous article</a> you are flexible with the tool so you can write your custom schemas for your custom events. One of examples is below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/04900c3cebd1a0c1b421da4ad4f9c1ae/href">https://medium.com/media/04900c3cebd1a0c1b421da4ad4f9c1ae/href</a></iframe><h4>How can we minimise missed data with Snowplow?</h4><p>1. Client-side event trackers make use of a local queue for storing event level data. That data is then sent into the Snowplow pipeline asynchronously via HTTP requests. The event data is persisted in the local queue until the collector returns a 200 to indicate that the data has been successfully received.</p><p>2. The Snowplow batch-based pipeline uses Amazon S3 as a processing queue and the Snowplow real-time pipeline uses Amazon Kinesis as a processing queue.</p><p>If you use AWS stack you have at least one delivery strategy and queues.</p><h4>Conclusion</h4><p>Snowplow have mechanisms to solve two of the most common data quality problems: inaccurate data and missed data. For the first one Snowplow has Iglu. It sure that only validated events will be in your data warehouse and not passed schema match events are stored in independent place. Second problem is being solved using queues and at least one strategy of delivery events to minimise data loss. Snowplow don’t burying bad data and it seek to surface it so that it can be correctly handled. Processing and delivering data is transparent and is not a black box.</p><p><a href="https://snowplowanalytics.com/blog/2016/01/07/we-need-to-talk-about-bad-data-architecting-data-pipelines-for-data-quality/">What is bad data and how can it be managed?</a></p><p><a href="https://github.com/snowplow/snowplow">https://github.com/snowplow/snowplow</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=100c3f9719b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t use Google Analytics try Snowplow instead]]></title>
            <link>https://medium.com/@alexander.shcherbak.as/dont-use-google-analytics-try-snowplow-instead-c90d48ee47e0?source=rss-16a0fa1982ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/c90d48ee47e0</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[snowplow-analytics]]></category>
            <category><![CDATA[real-time-analytics]]></category>
            <category><![CDATA[google-analytics]]></category>
            <dc:creator><![CDATA[Alexander Shcherbak]]></dc:creator>
            <pubDate>Mon, 11 Jul 2022 17:58:21 GMT</pubDate>
            <atom:updated>2022-07-11T17:58:21.857Z</atom:updated>
            <content:encoded><![CDATA[<p>The world is moving at high speed into digitalisation. Companies are looking for more and more ways to make more money using the most advanced technology to capture as much of the market as possible. Companies from the era of dinosaurs are transferring their services to a digital format, and new ones are starting to build their companies as a digital business. What is necessary for both? Of course! This is business analysis, namely understanding the needs of your customers in a simple format and preferably in real time, because the competition is fierce!</p><p>First of all, when any company start trying to understand behaviour of clients in their platform teams start looking onto Google Analytics because it’s famous and fully managed by Google. Does it seems like the best solution on the market for your company? NOPE. I have an alternative for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I9GMjcXN2nlO7PYgtq3Ehw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@dan_scape?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Dan Cook</a> on <a href="https://unsplash.com/collections/Rn1P1_QuyAo/snowplow/efcf467e859944dbc6a0cf30c033b41a?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>What is Snowplow?</h3><p>De facto it’s a set of micro-services written in Scala language which capture, enrich and transform real-time data from apps on smartphones, web-sites or other applications. Then in your data warehouse you can use dbt modules to transform raw data into format specific for your use cases, some of dbt modules have been already wrote by Snowplow team and community.</p><h3>Criticism</h3><p>Maybe you already have GA as part of your system or just want to implement behavioural platform in your company from scratch. It doesn’t matter. In this article I’d like to share my expertise of integrating Snowplow as a tool to capture data and why you should try it instead Google Analytics.</p><p>First I would like to say that GA is not bad, there are moments in which it clearly has its advantages:</p><ol><li>It’s fully manages by Google team, you just pay money and that’s all.</li><li>It’s well integrated into Google ecosystem (AdWords).</li></ol><p>So, ok, currently we know main 2 advantages of GA, so let’s look what we can get from Snowplow:</p><ol><li>It’s open-source technology, you pay just for using resources when deploy it on your provider.</li><li>Currently you can deploy it on AWS or GCP easily. You have opportunity to use Redshift, Snowflake, BigQuery and some others data warehouses.</li><li>Ownership data. Full control.</li><li>You can enrich data as you want, it’s free and you not pay for additional enrichments of your data.</li><li>Fork if you want to add any functionality or contribute to the community.</li></ol><p>Main disadvantages of GA are:</p><ol><li>GA(license) plans cost a lot compare to Snowplow(open-source).</li><li>Sessions ends after 30 minutes of inactivity.</li></ol><p>Main disadvantages of Snowplow are:</p><ol><li>You need to have a qualified team to implement it. DevOps and data engineering skills are preferred.</li><li>You are responsible for your platform. You must think about autoscaling, data security and a lot of other things when you work with data and distributed systems.</li></ol><h3>Conclusion</h3><p>Purpose of this article is to say you that Google Analytics is not the exactly one solution on the market to solve your problems. There is a more flexible and cheaper solution. SO..</p><p>If you haven’t much money, don’t want to add to your stack GCP and BigQuery and want an alternative on AWS stack or maybe on Azure (in future releases)? Do you want to use your own data warehouse? Do you want to have full control of what happens? Does your team has software engineering skills?</p><p>Do you want to hear more about Snowplow capabilities, it’s architecture and the rest, put a few claps so that I understand that you are interested in it and of course try it, link on documentation and code is below.</p><ul><li><a href="https://github.com/snowplow">Snowplow</a></li><li><a href="https://docs.snowplowanalytics.com/">Snowplow Docs - Snowplow Docs</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c90d48ee47e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>