<?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 Adam Boscarino on Medium]]></title>
        <description><![CDATA[Stories by Adam Boscarino on Medium]]></description>
        <link>https://medium.com/@ajbosco?source=rss-738277c66b59------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QhKiI1c-jgb8ylj_v9QnNg.jpeg</url>
            <title>Stories by Adam Boscarino on Medium</title>
            <link>https://medium.com/@ajbosco?source=rss-738277c66b59------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:48:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ajbosco/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[One Year of dbt]]></title>
            <link>https://medium.com/devoted-health-tech/one-year-of-dbt-b2e8474841ca?source=rss-738277c66b59------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2e8474841ca</guid>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Adam Boscarino]]></dc:creator>
            <pubDate>Mon, 03 Jan 2022 17:28:57 GMT</pubDate>
            <atom:updated>2022-01-25T18:58:51.714Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*IcGbgekzjb39ca5DPkioDQ.png" /></figure><p><a href="https://www.getdbt.com/">dbt</a> (data build tool) is an open source <a href="https://github.com/dbt-labs/dbt-core">project</a> that focuses on the T in ELT (Extract, Load, Transform). Developers use it to write SQL queries to transform data already loaded into a data warehouse into tables and views for analytics. It is also one of the <a href="https://www.forbes.com/sites/kenrickcai/2021/12/15/dbt-labs-in-talks-to-raise-at-6-billion-valuation-six-months-after-becoming-a-unicorn">hottest</a> tools in the data space. However, just over a year ago we were not sure if it was a fit for Devoted. We had a similar internal solution, DAG Builder, that handled our SQL transformations and were not sold that introducing a new tool into our data stack was worthwhile. Our tune changed after we watched the wonderful talks at <a href="https://coalesce.getdbt.com/">Coalesce</a> 2020. Inspired by the dbt community, the Devoted Data Engineering team launched a small proof-of-concept with a single model to test dbt’s capabilities. We quickly found the tool lived up to the hype. In the year since, dbt has become the backbone of our data platform. In this post, we’ll cover some of the reasons we migrated to dbt and the unique aspects of our dbt deployment, including our integration with Airflow and the custom tooling we built to make our developers’ lives easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QVtUC1Yd5-GCZO62" /></figure><h3>We don’t need dbt</h3><p>This might seem like an odd statement in a post about using dbt, but it was the initial reaction from our team (and a common refrain in the Data Engineering community). dbt is after all “just” SQL and Jinja! We were already using both those things in our Airflow DAGs through our in-house DAG Builder, so why do we need to introduce another tool?</p><p>The answer, in retrospect, is obvious. Our small team could never match the power of community and open source. While watching Coalesce talks, we discovered many features we were planning on adding to our internal tooling already existed in dbt. Additionally, we saw teams adding features on top of dbt like the <a href="https://www.youtube.com/watch?v=NPQOTm1XITw">dynamic data masking</a> that we hadn’t even thought of yet. It became glaringly obvious that we were wasting our time trying to compete with a tool that already offered so much of what we wanted. We needed dbt.</p><h3>Integrating with Airflow</h3><p>As heavy <a href="https://tech.devoted.com/apache-airflow-at-devoted-health-8fa9a82d1e69">Apache Airflow</a> users, we knew from the outset that was how we would deploy dbt in production. That left us with determining how to integrate the two tools. We researched several approaches to the problem including a great <a href="https://www.astronomer.io/blog/airflow-dbt-1">series</a> from Astronomer. We also knew we wanted our integration to maintain the best practices from our existing in-house DAG Builder:</p><ul><li>Smaller DAGs are preferred</li><li>No single failure should prevent unrelated tables and reports from being updated</li><li>Only fully tested data is exposed to end users</li><li>It is better to have stale data than incorrect data</li></ul><p>The solution we settled on was to structure our project so models are grouped by business area in separate directories (we call this a “model group”). In each model config, we then set a <em>staging_schema</em> and <em>final_schema</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/0*pLxxad4ZdSZP--1U" /></figure><p>Each model group builds dbt models in the <em>staging_schema</em>. This is a “private” schema that is not exposed to end users or other model groups. After the model group is built, we run <em>dbt test</em> against it and, if it passes, the tables are published to the <em>final_schema</em>. This is a “public” schema that’s exposed to end users and other model groups. If a model is using a table from outside of its model group then it uses the <em>final_schema</em> version of that table, which guarantees that it is using fully-tested data. We achieved this by customizing the ref macro to understand what group a given model is in based on the directory and then set the schema accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JUvAVLLIJEjvQHuL" /></figure><p>Each model group is then deployed to Airflow as an independent DAG. Developers can also connect model groups using External Task Sensors, though this is not required. This approach has worked well for us. It has helped limit the impact of any single dbt failure and ensured we only deliver fully tested data to our end users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hVf8vja3AQJnr-nt" /></figure><h3>dbtctl</h3><p>In addition to our custom integration with Apache Airflow, we have developed an internal CLI to improve developer productivity in dbt. The tool, dbtctl (pronounced dbt-cuttle/cuddle), is written in Go and its main use is acting as a wrapper around the standard dbt CLI. It automatically sets the appropriate environment variables and authentication, allowing developers to run commands without needing to worry about setting up any connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rTV8-ygIyeigDGEL" /></figure><p>Additionally, it has several other commands to make it easier to develop dbt models. Some of the most useful include:</p><p><strong>lint</strong></p><ul><li>All dbt models must pass Devoted specific linting rules!</li></ul><p><strong>init</strong></p><ul><li>Generate a dbt model from a “regular” SQL file</li><li>Create a schema.yml file from a SQL file</li><li>Create a Devoted “standard” DAG file for a dbt model group</li></ul><p><strong>clone</strong></p><ul><li>Clones all ref and source tables from a given model group to a developer’s dev database allowing them to quickly start developing on a model</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oBHpzzXB1J_3Jb86" /></figure><h3>CI/CD</h3><p>Another area we have improved dramatically thanks to dbt is our CI/CD process for SQL pipelines. In our aforementioned internal solution, queries were not tested via CI and it was up to the individual developer to manually test their SQL changes. With dbt, we have been able to develop a much more robust solution.</p><p>On every PR, we create a testing schema (this gets dropped at the end of the CI run), identify the models changed by the PR, and then build the model and all potentially impacted downstream models in the testing schema. We were able to keep tests fast even with hundreds of models by using a custom version of the source macro to include a LIMIT 0 clause on all source tables. This guarantees that our dbt models will <em>at least</em> execute successfully in production. We also use our custom dbt linter to validate every dbt model and schema file meets Devoted’s standards before merging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vcOWpf6cWV3No8gv" /></figure><p>These improvements have vastly reduced the amount of production failures caused by SQL errors and have greatly increased developer productivity and confidence.</p><h3>dbt unit test framework</h3><p>Over the past year, we have benefited greatly from dbt’s built-in test functionality. dbt tests are an excellent tool for <em>validating </em>data. We use them when we want to make sure the “id” column in a model is unique, or enforce that a model should never have more than <em>n </em>number of rows. These tests validate the data <em>after</em> the model runs in our staging schemas. However, dbt tests do <em>not</em> test units of business logic that are embedded in our SQL.</p><p>After watching the excellent <a href="https://www.youtube.com/watch?v=dlFYP7EJiUU">talk presented by Michelle Ark from Shopify at a Data Quality Meetup</a> we became interested in providing a toolset for unit testing our dbt models the way you would unit test a function in python. Since the Shopify code wasn’t open sourced we went about building our own version on top pytest to “mock” models.</p><p>In our dbt unit test framework, developers provide mock data in the form of a CSV string that is then loaded into a <em>MockModel</em> class. The <em>MockModel</em> then reads a model’s compiled SQL from dbt’s manifest.json file and replaces relation identifiers with the mocked data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/0*AI2ViX9SpkMmMB36" /></figure><p>This allows developers to write tests for individual pieces of SQL and verify they are working as expected. This has helped increase confidence when changing complicated transformations and improved data quality and trust in our platform.</p><h3>Closing Thoughts</h3><p>Over the last year, dbt has become a key piece of the data platform at Devoted and lived up to our wildest hopes and dreams. We have gone from a single proof-of-concept to 1,100+ models. It has fully replaced our previous internal SQL+Jinja tooling and powers almost all of our data transformations.</p><p>While dbt itself is extremely powerful, our investment in building on top of dbt and integrating it into our existing stack has been game changing. dbtctl has empowered our amazing team of data analysts and data scientists to own their data models end-to-end. Additionally, our CI/CD tooling and testing framework have made the team more confident in making changes and improved developer productivity. You don’t have to take Data Engineering’s word for it though.</p><blockquote>“Running things in CI has really increased my confidence in changes that go out. It catches a lot of column name mismatches, etc., before they can hit prod. We couldn’t do that before dbt.” — Data Scientist</blockquote><blockquote>“The entire development process is faster and more robust than our previous approach, due to the ease of out-of-the-box CLI and schema testing, and the tools y’all have built to make that work both faster (clone, init, etc) and more solid (linting, etc)” — Data Scientist</blockquote><blockquote>“One of the development improvements that I’ve enjoyed which has increased velocity is having model groups and being able to run and test specific models within the group, rather than having to run the whole group or DAG.” — Data Scientist</blockquote><p><em>Written by </em><a href="https://www.linkedin.com/in/adam-boscarino-47267313/"><em>Adam Boscarino</em></a><em> and </em><a href="https://www.linkedin.com/in/jasonbrownstein/"><em>Jason Brownstein</em></a><em>.</em></p><p><em>Special thanks to </em><a href="https://www.linkedin.com/in/andrewghoffman/"><em>Andrew Hoffman</em></a>, <a href="https://www.linkedin.com/in/jennifer-thompson-mph/"><em>Jennifer Thompson</em></a>, and <a href="https://www.linkedin.com/in/adambaratz/"><em>Adam Baratz</em></a><em> for reviewing.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2e8474841ca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devoted-health-tech/one-year-of-dbt-b2e8474841ca">One Year of dbt</a> was originally published in <a href="https://medium.com/devoted-health-tech">Devoted Health + Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Avalanche: Streaming Postgres to Snowflake]]></title>
            <link>https://medium.com/devoted-health-tech/avalanche-streaming-postgres-to-snowflake-130e8c477f07?source=rss-738277c66b59------2</link>
            <guid isPermaLink="false">https://medium.com/p/130e8c477f07</guid>
            <category><![CDATA[change-data-capture]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[data-warehouse]]></category>
            <dc:creator><![CDATA[Adam Boscarino]]></dc:creator>
            <pubDate>Wed, 30 Jun 2021 20:57:34 GMT</pubDate>
            <atom:updated>2021-07-01T00:00:04.041Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>Over the past two years, the <a href="https://www.devoted.com/">Devoted Health</a> Data Engineering team has evolved its data architecture to support the needs of a rapidly growing business with increasing data volumes. In this post, we will cover the journey from the team’s initial batch data pipeline to avalanche, a change-data-capture service for streaming Postgres data to Snowflake in near real-time.</p><h3>Postgres to Snowflake: None to Batch</h3><p>The team has built a relatively modern data stack using <a href="https://adam.boscarino.me/posts/airflow-at-devoted-health/">Apache Airflow</a> for workflow management and Snowflake as our data warehouse. These tools replaced our initial “startup” stack of cron jobs and Redshift. Our main data source for Snowflake is our production databases. These 16 Postgres databases (one for each microservice) have over 4,000 tables that are regularly being updated both with new data and DDL changes (read: multiple PRs per day) by our amazing Engineering team. To load them into Snowflake we used our existing stack and did the obvious thing going from None to Batch (as described in Chris Riccomini’s great talk on the <a href="https://www.infoq.com/articles/future-data-engineering-riccomini/">Future of Data Engineering</a>). A single Airflow DAG would query each database, identify the table metadata, extract the full datasets from Postgres to S3, and then load it into Snowflake with COPY INTO statements. There were also a series of validation checks within the DAG to give us confidence in the data. It was scheduled to run every hour and the pipeline proved very reliable. Data flowed from production to Snowflake, it became the backbone of our data platform, and everyone was happy!</p><p><strong>TL;DR</strong></p><ul><li>Batch Airflow DAG loads data from Postgres to Snowflake</li><li>Scheduled to run every hour</li><li>Full reloads on almost every table</li></ul><h3>The Breaking Point</h3><p>As they say, nothing good lasts forever. You may already have identified the biggest issue with our batch solution, fully reloading every table every hour would eventually reach a scaling limit. As a fast growing startup, that point came very quickly. Our membership increased, our data volumes increased, and soon our hourly job was running for 55 minutes!</p><p>Knowing we needed a new solution, the Data Engineering team pulled together and began investigating options. Our initial idea was to simply make our existing extract queries incremental. However, we discovered this approach could not accurately replicate our sources because we allow for <a href="https://medium.com/analytics-vidhya/a-good-day-to-delete-hard-22b8be83b622">hard deletes</a> in some tables in our production databases. The performance of the resulting query to identify incremental data was also quite poor on some of the larger tables.</p><p>Like good engineers we resisted the urge to immediately start building a homegrown solution and next explored managed ETL services. We ran proof-of-concepts with several popular vendors and these solutions seemed promising initially. However, we soon encountered a number of issues including slow initial syncs and struggles handling tables that had atypical data types like jsonb. Also some vendors didn’t have the ability to automatically handle the frequent DDL changes/additions our Engineering team makes to our production tables. With the speed we are adding new features to our platform, these DDL changes can happen on a daily basis, so manual intervention was a non-starter. No single vendor had a solution that perfectly fit our use case and production environment.</p><p>We are also big believers in open-source (Airflow, <a href="https://www.amundsen.io/">Amundsen</a>, and other OSS projects are key pieces of our stack), so naturally the next step was to research open-source projects that could help solve our issue. However, we soon discovered the main OSS tool in this space, <a href="https://debezium.io/">Debezium</a>, would require introducing new infrastructure (Apache Kafka) to our tech stack that we had neither the expertise nor bandwidth to manage.</p><p>Our Debezium research set us down the path of learning about Change Data Capture. CDC is a database process that tracks all DML changes made to tables (inserts, updates, and deletes). It is the technology that powers Debezium (and likely many of the vendors in this space as well). In Postgres, these changes are captured in the <a href="https://www.postgresql.org/docs/11/wal-configuration.html">Write-Ahead Log</a> (WAL) which can then be used for things like replication to another Postgres server….or a data warehouse. After our exhaustive research and with our newfound knowledge, we decided to build a solution that would meet all of our needs. It was time to move our data pipeline from Batch to Streaming.</p><p><strong>TL;DR</strong></p><ul><li>Hourly full reloads have a scaling limit</li><li>Incremental extracts didn’t work because of hard deletes</li><li>Managed services struggled with some of our databases</li><li>We didn’t want to introduce new infrastructure to our stack (no Kafka)</li></ul><h3>Avalanche: Batch to Streaming</h3><p>Obviously, the first thing we did after deciding to write our own Postgres to Snowflake CDC solution was to come up with a name. After tossing around a few ideas, some worse than others, the team decided avalanche was the winner and we were ready to actually start working.</p><h3>Design Goals</h3><p>Now that we had a cool name, we established our goals for the project.</p><p>Snowflake is the final destination</p><ul><li>A record should only be acknowledged as being read from the Postgres WAL after it is in our target Snowflake tables. Yes, this tightly couples the two systems but avoids the need for additional infrastructure, such as Kafka or Kinesis.</li></ul><p>Reliability/resilience</p><ul><li>System should be able to recover from failures/restarts</li><li>No missed records — guaranteed at least once delivery to Snowflake target tables</li></ul><p>Low latency</p><ul><li>Our initial goal was to have new data from Snowflake to Postgres in less than 5 minutes</li></ul><p>Minimal impact on production database</p><ul><li>System should read data from WAL as quickly as possible to avoid filling RDS disk</li></ul><p>Minimal manual intervention</p><ul><li>DDL changes and new tables should automatically flow into Snowflake</li></ul><h3>Architecture</h3><p>avalanche is a Go service that works by taking a snapshot of data in Postgres, loading that snapshot into Snowflake, and then consuming the WAL via a <a href="https://www.postgresql.org/docs/11/view-pg-replication-slots.html">replication slot </a>from the point of the snapshot forward. WAL messages are flushed to Snowflake when one of three things happens: 60 seconds has passed, a certain volume of data has been read into memory, or a DDL statement has been identified.</p><p>WAL entries are inserted into Snowflake into “raw” tables and then merged into “final” tables. We have at least once guarantees to the “raw” tables” and use the MERGE statements to verify no duplicates are loaded into the “final” tables. avalanche only sends an acknowledgement back to Postgres after a record has been merged to the “final” table.</p><p>The other benefit of the MERGE approach is that downstream consumers of this data are reading from tables and not views. These tables are optimized for reads, whereas many other CDC solutions simply use JSON blobs with views and are optimized for writes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pC3uTkS8LwGxGrlj" /></figure><p>In addition to normal DML changes, avalanche uses a database event trigger in the Postgres database to capture all DDL changes to a table. These changes then flow to the WAL and we can consume them like normal messages. If avalanche detects a DDL change has happened, it stops streaming, translates the Postgres statement to Snowflake syntax and immediately applies it to the Snowflake table in question. After that it resumes streaming as normal with no manual intervention required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*06HW2T3KgMaSbu52" /></figure><p>We have been running avalanche in production for close to a year now and it has proven to be a reliable system that met all of our initial design goals. It has already become an established piece of Devoted Health’s tech stack and continues to perform and scale as our business (and data volumes) grow.</p><p><strong>TL;DR</strong></p><ul><li>avalanche streams new data from Postgres to Snowflake using the Postgres Write-Ahead Log</li><li>It loads data to “raw” tables and then merges into “final” tables that are optimized for reads</li><li>DDL changes are translated from Postgres to Snowflake and applied immediately</li></ul><h3>The Future</h3><p>Now that avalanche has proven its value to the organization, we are continuing to add new features and make improvements. A few of our future goals include:</p><ul><li>Automated Dynamic Data Masking in Snowflake</li><li>Faster initial full imports</li><li>A UI!</li></ul><p><strong>If this sounds like the type of project you’d be interested in contributing to, we are looking for a </strong><a href="https://jobs.lever.co/devoted/bed26b12-e67f-4d12-8ef1-50748f1563b6"><strong>Senior Data Engineer</strong></a><strong> to join our team!</strong></p><p>Also a big thank you to the brains behind avalanche, Osman Qamar, and other contributors to the project including Mallori Harrell, Karla Goodreau, Jason Brownstein, Jenny Kim, and Josiah Baker.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=130e8c477f07" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devoted-health-tech/avalanche-streaming-postgres-to-snowflake-130e8c477f07">Avalanche: Streaming Postgres to Snowflake</a> was originally published in <a href="https://medium.com/devoted-health-tech">Devoted Health + Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraforming Snowflake]]></title>
            <link>https://medium.com/analytics-vidhya/terraforming-snowflake-91fc23efc488?source=rss-738277c66b59------2</link>
            <guid isPermaLink="false">https://medium.com/p/91fc23efc488</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Adam Boscarino]]></dc:creator>
            <pubDate>Sun, 05 Jan 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-01-09T09:04:21.962Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*H-bKfro_OFU4cNGF.png" /></figure><h3>What is Snowflake?</h3><p><a href="https://www.snowflake.com/">Snowflake</a> is a managed cloud data warehouse solution. It is similar to BigQuery or Redshift, but has some unique features like separation of compute and storage and strong support for semi-structured data (JSON, Parquet, Avro) that differentiate it.</p><h3>What is Terraform?</h3><p><a href="https://www.terraform.io/">Terraform</a> is a tool from HashiCorp for managing infrastructure via code. You can use it to provision, update, or delete a wide range of resources like <a href="https://www.terraform.io/docs/providers/aws/r/instance.html">EC2 instances</a>, <a href="https://www.terraform.io/docs/providers/datadog/r/monitor.html">Datadog monitors</a>, <a href="https://www.terraform.io/docs/providers/opsgenie/r/schedule.html">OpsGenie schedules</a> and more. This allows you to know the current state of your infrastructure at any given time and to control how it is updated. Terraform ships with many <a href="https://www.terraform.io/docs/providers/index.html">providers</a>. Unfortunately, Snowflake is not one of them! However, it also supports <a href="https://www.terraform.io/docs/plugins/basics.html">third-party providers</a>, which means users can write their own providers for almost any service. As an example (and shameless plug), check out <a href="https://github.com/ajbosco/terraform-provider-segment">this one</a> I wrote for <a href="https://segment.com/">Segment</a>’s API.</p><h3>Why use Terraform with Snowflake?</h3><p>As luck would have it, the <a href="https://chanzuckerberg.com/">Chan Zuckerberg Initiative</a> has done the hard work for us and open-sourced a <a href="https://github.com/chanzuckerberg/terraform-provider-snowflake">Snowflake Terraform Provider</a> that we can use to manage many Snowflake objects like roles, grants, and users. Therefore, by using Terraform with Snowflake, we can always know the current state of our Snowflake environments. Like which schemas exists, the size of a warehouse, and maybe most importantly, which users have access to which Snowflake objects. With this setup we can avoid situations where someone <em>accidentally</em> manually grants a user the wrong role with too much access or spins up a 4X-Large Warehouse that never <a href="https://docs.snowflake.net/manuals/user-guide/warehouses-overview.html#auto-suspension-and-auto-resumption">auto-suspends</a>.</p><p>If this all sounds great, then let’s walk through an example using Terraform to setup roles, users, schemas, and grant access in Snowflake.</p><h3>Setting up Terraform</h3><p>Before we get started, you’ll need to install Terraform. I’d recommend following the <a href="https://learn.hashicorp.com/terraform/getting-started/install.html">official documentation</a> for this. I’ll be using Terraform 0.12 in the examples below. I’d also suggest setting up a <a href="https://www.terraform.io/docs/state/remote.html">Remote State</a> to make it easier for a team to manage your resources, but that’s not needed to get started. A Remote State writes your Terraform state to a remote data store like AWS S3 that all team members can access versus using local storage for the state.</p><p>After you have Terraform setup, you’ll need to download the Snowflake Terraform Provider from the latest <a href="https://github.com/chanzuckerberg/terraform-provider-snowflake/releases">releases</a> and move it to the appropriate directory (usually ~/.terraform.d/plugins). Next follow the steps in the provider <a href="https://github.com/chanzuckerberg/terraform-provider-snowflake#authentication">README</a> for the authentication method of your choosing and create a file called main.tf that looks something like this:</p><pre>provider &quot;snowflake&quot; {<br>  account = &quot;your-snowflake-account&quot;<br>  region  = &quot;your-snowflake-region&quot;<br>}</pre><p>After that run terraform init and you should see the following meaning we&#39;re ready to go:</p><pre>Initializing the backend...<br>Initializing provider plugins...<br>Terraform has been successfully initialized!</pre><h3>Terraforming Schemas</h3><p>First, we’ll create two databases in Snowflake. Create a file called schemas.tf that looks like this:</p><pre>locals {<br>  schemas = {<br>    &quot;RAW&quot; = {<br>      database = &quot;DEV&quot;<br>      comment = &quot;contains raw data from our source systems&quot;<br>    }<br>    &quot;ANALYTICS&quot; = {<br>      database = &quot;DEV&quot;<br>      comment = &quot;contains tables and views accessible to analysts and reporting&quot;<br>    }<br>  }<br>}<br><br>resource &quot;snowflake_schema&quot; &quot;schema&quot; {<br>  for_each = local.schemas<br>  name     = each.key<br>  database = each.value.database<br>  comment  = each.value.comment<br>}</pre><p>Note, we’re taking advantage of the new loops in Terraform 0.12 to avoid copying and pasting the snowflake_role resource every time we add a new role. Then run terraform plan to see what resources will be created. This command should return saying 2 new schemas would be created in Snowflake. If things look good, run terraform apply to create them.</p><h3>Terraforming Roles</h3><p>Next, let’s create two <a href="https://docs.snowflake.net/manuals/sql-reference/sql/create-role.html">Snowflake roles</a> with Terraform. As an aside, dbt has a great <a href="https://blog.getdbt.com/how-we-configure-snowflake/">blog post</a> on how they structure roles for their clients that I recommend reading. The example here sort of copies this structure.</p><p>Create a file roles.tf that looks like this:</p><pre>locals {<br>  roles = {<br>    &quot;LOADER&quot; = {<br>      comment = &quot;Owns the tables in raw schema&quot;<br>    }<br>    &quot;TRANSFORMER&quot; = {<br>      comment = &quot;Has query permissions on tables in raw schema and owns tables in the analytics schema.&quot;<br>    }<br>  }<br>}<br><br>resource &quot;snowflake_role&quot; &quot;role&quot; {<br>  for_each = local.roles<br>  name     = each.key<br>  comment  = each.value.comment<br>}</pre><p>As before, run terraform plan to see what resources will be created. This command should return saying 2 new roles would be created in Snowflake. If things look good, run terraform apply to create them.</p><p>Roles are great, but they’re even better if you can do something with them, so let’s change our schemas.tf file to look like this:</p><pre>locals {<br>  schemas = {<br>    &quot;RAW&quot; = {<br>      database = &quot;DEV&quot;<br>      comment = &quot;contains raw data from our source systems&quot;<br>      usage_roles = [&quot;TRANSFORMER&quot;]<br>      all_roles = [&quot;LOADER&quot;]<br>    }<br>    &quot;ANALYTICS&quot; = {<br>      database = &quot;DEV&quot;<br>      comment = &quot;contains tables and views accessible to analysts and reporting&quot;<br>      usage_roles = []<br>      all_roles = [&quot;TRANSFORMER&quot;]<br>    }<br>  }<br>}<br><br>resource &quot;snowflake_schema&quot; &quot;schema&quot; {<br>  for_each = local.schemas<br>  name     = each.key<br>  database = each.value.database<br>  comment  = each.value.comment<br>}<br><br>resource &quot;snowflake_schema_grant&quot; &quot;schema_grant_usage&quot; {<br>  for_each      = local.schemas<br>  schema_name   = each.key<br>  database_name = each.value.database<br>  privilege     = &quot;USAGE&quot;<br>  roles         = each.value.usage_roles<br>  shares        = []<br>}<br><br>resource &quot;snowflake_schema_grant&quot; &quot;schema_grant_all&quot; {<br>  for_each      = local.schemas<br>  schema_name   = each.key<br>  database_name = each.value.database<br>  privilege     = &quot;ALL&quot;<br>  roles         = each.value.all_roles<br>  shares        = []<br>}</pre><p>A quick terraform plan should show that we are ready to grant the appropriate access on each of our schemas to each of our roles. If things look good, run terraform apply to create the grants in Snowflake.</p><h3>Terraforming Users</h3><p>Now that we have roles, let’s make some users for those roles. Create a file called users.tf like this:</p><pre>locals {<br>  users = {<br>    &quot;MAC&quot; = {<br>      login_name = &quot;MAC_DATAENGINEER@MACANDCHEESE.COM&quot;<br>      role       = &quot;TRANSFORMER&quot;<br>      namespace  = &quot;DEV.PUBLIC&quot;<br>      warehouse  = &quot;TRANSFORMER_WH&quot;<br>    }<br>    &quot;CHEESE&quot; = {<br>      login_name = &quot;CHEESE_DATAENGINEER@MACANDCHEESE.COM&quot;<br>      role       = &quot;TRANSFORMER&quot;<br>      namespace  = &quot;DEV.PUBLIC&quot;<br>      warehouse  = &quot;TRANSFORMER_WH&quot;<br>    }<br>    &quot;STITCH&quot; = {<br>      login_name = &quot;STITCH@MACANDCHEESE.COM&quot;<br>      role       = &quot;LOADER&quot;<br>      namespace  = &quot;DEV.PUBLIC&quot;<br>      warehouse  = &quot;LOADER_WH&quot;<br>    }<br>  }<br>}<br><br>resource &quot;snowflake_user&quot; &quot;user&quot; {<br>  for_each             = local.users<br>  name                 = each.key<br>  login_name           = each.value.login_name<br>  default_role         = each.value.role<br>  default_namespace    = each.value.namespace<br>  default_warehouse    = each.value.warehouse<br>  must_change_password = false<br>}</pre><p>Again, run terraform plan to see what resources will be created. This command should return saying 3 new users would be created in Snowflake (note, we also are assuming that passwords do not need to be changed because we&#39;ve setup SSO before we started this). If things look good, run terraform apply to create them.</p><p>But wait, we’ve given these users a default_role, but that role hasn&#39;t been granted to them yet! A user that has not been granted their default role won&#39;t be able to do anything in Snowflake. Let&#39;s fix that by modifying the roles.tf file so that it looks like this:</p><pre>locals {<br>  roles = {<br>    &quot;LOADER&quot; = {<br>      comment = &quot;Owns the tables in raw schema&quot;<br>      users = [&quot;STITCH&quot;]<br>    }<br>    &quot;TRANSFORMER&quot; = {<br>      comment = &quot;Has query permissions on tables in raw schema and owns tables in the analytics schema.&quot;<br>      users = [&quot;MAC&quot;, &quot;CHEESE&quot;]<br>    }<br>  }<br>}<br><br>resource &quot;snowflake_role&quot; &quot;role&quot; {<br>  for_each = local.roles<br>  name     = each.key<br>  comment  = each.value.comment<br>}<br><br>resource &quot;snowflake_role_grants&quot; &quot;role_grant&quot; {<br>  for_each  = local.roles<br>  role_name = each.key<br>  users     = each.value.users<br>  roles     = []<br>}</pre><p>Yet again, we’ll run terraform plan to see the changes, which should be that we will now be granting the appropriate roles to our users. If that&#39;s what the output says, run terraform apply to make it so in Snowflake.</p><p>And that’s it! We now have roles, schemas, and users created in Snowflake and managed by Terraform. Time to commit these files and put a PR into GitHub! As a next step, check out <a href="https://www.runatlantis.io/">Atlantis</a> to manage Terraform through Pull Requests or <a href="https://www.terraform.io/docs/cloud/index.html">Terraform Cloud</a> to make it easier for teams work with Terraform.</p><p><em>Originally published at </em><a href="https://adam.boscarino.me/posts/terraform-snowflake/"><em>https://adam.boscarino.me</em></a><em> on January 5, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91fc23efc488" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/terraforming-snowflake-91fc23efc488">Terraforming Snowflake</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Airflow at Devoted Health]]></title>
            <link>https://medium.com/devoted-health-tech/apache-airflow-at-devoted-health-8fa9a82d1e69?source=rss-738277c66b59------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fa9a82d1e69</guid>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <dc:creator><![CDATA[Adam Boscarino]]></dc:creator>
            <pubDate>Mon, 21 Oct 2019 00:00:00 GMT</pubDate>
            <atom:updated>2021-12-14T15:26:53.611Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*COjzwuU1OxVDW5nU.png" /></figure><p><a href="https://github.com/apache/incubator-airflow">Apache Airflow</a> is an open-source workflow orchestration tool. There are many posts available that explain the core concepts of Airflow (I recommend this <a href="https://medium.com/@itunpredictable/apache-airflow-on-docker-for-complete-beginners-cf76cf7b2c9a">one</a>). This post assumes you have some familiarity with these concepts and focuses on how we develop, test, and deploy Airflow and Airflow DAGs at <a href="https://www.devoted.com/">Devoted Health</a>. Devoted is a Medicare Advantage startup aimed at making healthcare easier, more affordable, and believes every member should be treated like we would treat a member of our own family.</p><h3>Airflow Deployment</h3><p><em>This part of the post discusses </em><a href="https://kubernetes.io/"><em>Kubernetes</em></a><em>, </em><a href="https://helm.sh/"><em>Helm</em></a><em>, </em><a href="https://www.terraform.io/"><em>Terraform</em></a><em>, and </em><a href="https://www.docker.com/"><em>Docker</em></a><em>, but since they are all their own complicated things, it does not go into detail about any of them.</em></p><p>We have a very modern technology stack at Devoted, so of course, we run Airflow on Kubernetes. This means we use Docker containers to deploy all of our Airflow infrastructure. We have a single Docker image that is used for the Airflow Web Server, Scheduler, and most of our Tasks. It has a core set of Python dependencies installed, and whenever an update is made, it is built and deployed to <a href="https://aws.amazon.com/ecr/">Amazon ECR</a> via a CI job.</p><p>We deploy Airflow itself using a Helm chart (based on this one in <a href="https://github.com/helm/charts/tree/master/stable/airflow">charts/stable</a>) that describes all of the Kubernetes resources (Deployments, Services, Persistent Volumes, etc.) we want for Airflow. We couple this with Terraform, which allows us to deploy a new instance of Airflow with a simple command like:</p><pre>terraform apply --target=module.airflow</pre><p>This command creates a RDS database, an EFS volume for DAG storage, a Kubernetes namespace, and Airflow Scheduler and Web Server pods.</p><p>Notice that I didn’t mention any Airflow Workers. We recently migrated to Airflow’s <a href="https://airflow.apache.org/kubernetes.html">Kubernetes Executor</a>, which has no permanent Workers and no Redis/Celery requirement for distributing work. Instead, every Airflow Task is run in its own pod. This means we can allocate resources for each Task rather than just having our workers sized for our most resource intensive jobs. Additionally, we can have a different Docker image for each Task. If a Data Scientist writes a complicated Machine Learning job that has many dependencies, this allows us to keep those separate from our core Airflow image. We’ve been running this setup for a few months now and it has been great for us so far.</p><p><strong>TL;DR</strong></p><ul><li>We use Terraform and Helm to deploy Airflow to Kubernetes.</li><li>We run Airflow using the Kubernetes Executor to allow for maximum flexibility in our DAG design and resource allocation.</li></ul><h3>DAG Development</h3><p>At Devoted, we have many different people working on Airflow DAGs including a team of 8 Data Scientists (they’re awesome and they’re <a href="https://jobs.lever.co/devoted/d0758ba1-3bde-42c6-9981-b28f2041e461">hiring</a>!). This has led to some unique challenges since often different people are working on different parts of the same DAG.</p><p>We’ve solved this by developing an internal tool that allows each developer to spin up their own Airflow instance on Kubernetes (these are smaller than our Staging/Production environments) along with their own clone of our data warehouse (it’s a <a href="https://www.snowflake.com/">Snowflake</a> thing, you should use Snowflake it is also awesome). This tool is called devflow because I am not creative when it comes to naming things except my cats ( <a href="https://www.instagram.com/mac.cheese.cat/">Mac &amp; Cheese</a>). It wraps Helm, kubectl, and Terraform into a few simple commands so developers can run things like devflow start to start up their dev environment and devflow sync to deploy their local changes to their instance.</p><p>Besides helping avoid collisions in DAG development, this setup allows developers to use the same technology and environments in Dev that we use in Staging/Prod creating far less “it works on my machine” scenarios.</p><p>In addition to devflow, the Data Engineering team at Devoted has built another internal tool to streamline DAG development called DAG Builder. This library provides a simple interface for creating a new data pipeline in Airflow. Developers write a DDL query for an end table, a transformation in SQL or Python, and use a YAML file to describe the DAG.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*Fg3LN5dBo9wD59FThjDTRw.png" /></figure><p>The example above generates a DAG that populates two tables, one dependent on the other, and automatically includes alerting, monitoring, support for integration testing, and more. This approach has allowed us to standardize our DAGs, which makes adding new features/enhancements to all DAGs (like the data validation tests below) much easier and improves developer efficiency as Data Scientists can easily understand and work on pipelines they didn’t originally write.</p><p><strong>TL;DR</strong></p><ul><li>Every developer at Devoted using Airflow gets their own dev instance.</li><li>Standardizing DAGs allows Devoted to quickly add new features to all pipelines.</li></ul><h3>Testing &amp; Validation</h3><p>Ok, I’ve talked about how we deploy Airflow and develop DAGs, but how do we make sure they’re working and accurate? Well, obviously, it’s everyone’s favorite thing to the rescue …testing!</p><p>We use three different types of tests to verify that DAGs are working as expected.</p><h4>Unit Tests</h4><p>All DAGs must pass a suite of unit tests in our CI pipeline before being deployed. These are tests that can be run independently of other resources and include a smoke test that validates every DAG can be imported into the Airflow DagBag (I will never not laugh when I type that) as well as tests for any python code used in our DAGs. We use pytest to run these and we feel they&#39;re table stakes for testing.</p><h4>Integration Tests</h4><p>This set of tests interact with other resources, which is obviously very important for a workflow tool like Airflow that connects to a bunch of platforms. Thanks to the efforts of one of our Data Engineers, Julie Rice, we run end-to-end tests for most DAGs in another CI pipeline. This helps validate that our SQL doesn’t have errors and things like complicated CASE statements (who doesn’t love these?) produce the expected results in our data warehouse. This was a challenging thing to implement, but we believe the investment will pay off in increasing Developer confidence as they make changes.</p><h4>Data Validation</h4><p>The third form of testing we use is the only one that doesn’t happen before deployments. Instead, data validation is done within each DAG at run-time. We have a set of standard tasks that allow Airflow Developers to specify things like “this column should be unique”, “this one should never be NULL”, or “this should have a record count greater than X”. This is the final protection we have against allowing our internal users to access reports with incorrect data.</p><p><strong>TL;DR</strong></p><ul><li>Every Airflow DAG is tested before being deployed.</li><li>We run end-to-end Integration Tests for most DAGs to reduce errors in Production.</li><li>Data validation tasks run in each DAG to prevent incorrect data from getting into reports.</li></ul><h3>DAG Deployment</h3><p>We use a single <a href="https://aws.amazon.com/efs/">AWS EFS</a> volume to persistently store Airflow DAGs (and plugins) for each environment. It is shared amongst all of the pods in the Airflow namespace (Web Server, Scheduler, and Tasks), so we only need to push new/updated DAGs to one place for all of our resources. This is done via a simple CI job that runs once DAGs have passed our test suite described above. No old-school release cycle here, we deploy whenever a new change is ready, which happens many times per day.</p><p><strong>TL;DR</strong></p><ul><li>This section is only a couple of sentences, just read it. :)</li></ul><h3>Monitoring</h3><p>I’ve gone over how we develop, test, and deploy Airflow, but saved my favorite for last. Monitoring AKA how we, the team in charge of keeping Airflow running, sleep soundly at night knowing it is, in fact, running.</p><p>Our first line of defense against OpsGenie Alerts is a feature of Kubernetes called Liveness Checks. This allows you to signal to Kubernetes that your container is in a bad state and should be restarted. As all good technologists know, sometimes turning it off and on again is all it takes to fix something. For the Web Server, we simply use Airflow’s /health endpoint to verify it is up and running. For the Scheduler, we have a custom script that says the Scheduler needs to be restarted if there are more than 0 queued tasks, 0 running tasks, and 0 tasks completely recently.</p><p>Liveness are nice for saving someone from a simple fix, but they’re not really monitoring. For that, the core Airflow project is heavily instrumented with <a href="https://github.com/apache/airflow/blob/master/airflow/stats.py#L106">statsd</a> metrics. We send all of these to <a href="https://www.datadoghq.com/">DataDog</a> and use their dashboards to tell us about Airflow’s CPU and memory usage. Additionally, we have several DataDog monitors setup there that alert the team if key DAGs haven’t reported success in the expected time period. Airflow has a SLA feature that does something similar, but this allows us to decouple monitoring from the service.</p><p><strong>TL;DR</strong></p><ul><li>We use Kubernetes Liveness Checks to restart pods that are in a bad state without human intervention.</li><li>We use DataDog to monitor Airflow resource usage and get alerts about DAG SLAs.</li></ul><p>If working on and helping improve Devoted Health’s Airflow setup sounds interesting to you, we’re <a href="https://jobs.lever.co/devoted/">hiring</a>!</p><p><em>Originally published at </em><a href="https://adam.boscarino.me/posts/airflow-at-devoted-health/"><em>https://adam.boscarino.me</em></a><em> on October 21, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fa9a82d1e69" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devoted-health-tech/apache-airflow-at-devoted-health-8fa9a82d1e69">Apache Airflow at Devoted Health</a> was originally published in <a href="https://medium.com/devoted-health-tech">Devoted Health + Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing dag-factory]]></title>
            <link>https://medium.com/@ajbosco/introducing-dag-factory-a107cc598868?source=rss-738277c66b59------2</link>
            <guid isPermaLink="false">https://medium.com/p/a107cc598868</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <dc:creator><![CDATA[Adam Boscarino]]></dc:creator>
            <pubDate>Wed, 21 Nov 2018 13:01:01 GMT</pubDate>
            <atom:updated>2018-11-26T20:49:05.213Z</atom:updated>
            <content:encoded><![CDATA[<h3>dag-factory: generate Airflow DAGs from YAML</h3><p><a href="https://github.com/apache/incubator-airflow">Apache Airflow</a> is “a platform to programmatically author, schedule, and monitor workflows.” And it is currently having its <em>moment</em>. At <a href="https://www.dataengconf.com/speakers-nyc18">DataEngConf NYC 2018</a>, it seemed like every other talk was either about or mentioned Airflow. There have also been <a href="https://medium.com/making-meetup/data-pipeline-infrastructure-at-meetup-with-fewer-nightmares-running-apache-airflow-on-kubernetes-54cb8cdc69c3">countless</a> <a href="https://medium.com/bluecore-engineering/were-all-using-airflow-wrong-and-how-to-fix-it-a56f14cb0753">blog</a> <a href="https://bostata.com/post/built-to-scale-running-highly-concurrent-etl-with-apache-airflow/">posts</a> about how different companies are using the tool and it even has a <a href="https://soundcloud.com/the-airflow-podcast">podcast</a>!</p><p>A major use case for Airflow seems to be ETL or ELT or ETTL or whatever acronym we are using today for moving data in batches from production systems to data warehouses. This is a pattern that will typically be repeated in multiple pipelines. I recently gave a <a href="https://github.com/ajbosco/talks/blob/master/nyc-data-eng-meetup/airflow-at-do.pdf">talk</a> on how we are using Airflow at my day job and use YAML configs to make these repeated pipelines easy to write, update, and extend. This approach is inspired by Chris Riccomini’s seminal post on <a href="https://wecode.wepay.com/posts/airflow-wepay">Airflow at WePay</a>. Someone in the audience then asked “how are you going from YAML to Airflow DAGs?” My response was that we had a Python file that parsed the configs and generated the DAGs. This answer didn’t seem to satisfy the audience member or myself. This pattern is very common in talks or posts about Airflow, but it seems like we are all writing the same logic independently. Thus the idea for <a href="https://github.com/ajbosco/dag-factory">dag-factory</a> was born.</p><p>The <a href="https://github.com/ajbosco/dag-factory">dag-factory</a> library makes it easy to create DAGs from YAML configuration by following a few steps. First, install dag-factory into your Airflow environment:</p><pre>pip install dag-factory</pre><p>Next create a YAML config in a place accessible to Airflow like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nnF0hKlleTNKi8IjWMRohw.png" /></figure><p>Then create a .py file in your Airflow DAGs folder like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ipPUH7idgXqoN4I_XWP9jA.png" /></figure><p>And 💥 you’ll have a DAG running in Airflow that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q38ZMnmWXyYGWPA4.png" /><figcaption>Such a great DAG</figcaption></figure><p>This approach offers a number of benefits including that Airflow DAGs can be created with no Python knowledge. This opens the platform to non-engineers on your team, which can be a productivity boost to both your organization and data platform.</p><p><a href="https://github.com/ajbosco/dag-factory">dag-factory</a> also allows engineers who do not regularly work with Airflow to create DAGs. These people frequently want to use the great features of Airflow (monitoring, retries, alerting, etc.), but learning about Hooks and Operators are outside the scope of their day-to-day jobs. Instead of having to read the docs (ewwww) to learn these primitives, they can create YAML configs just as easily as the cron job (ewwwwwwww) they were going to use. This will reduce the time spent onboarding new teams to Airflow dramatically.</p><p><a href="https://github.com/ajbosco/dag-factory">dag-factory</a> is a brand new project, so if you try it and have any suggestions or issues <a href="https://github.com/ajbosco/dag-factory/issues/new">let me know</a>! Similar tools include <a href="https://github.com/etsy/boundary-layer">boundary-layer</a> from etsy and <a href="https://github.com/wooga/airconditioner">airconditioner</a> (great name!) from wooga, so check them out too!</p><p><em>Originally published at </em><a href="https://adam.boscarino.me/posts/introducing-dag-factory/"><em>adam.boscarino.me</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a107cc598868" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>