<?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 Henning Holgersen on Medium]]></title>
        <description><![CDATA[Stories by Henning Holgersen on Medium]]></description>
        <link>https://medium.com/@henning.holgersen?source=rss-3659b65be950------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Gc2otY9QpkYr73dmJA9Okw.png</url>
            <title>Stories by Henning Holgersen on Medium</title>
            <link>https://medium.com/@henning.holgersen?source=rss-3659b65be950------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 00:09:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@henning.holgersen/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[Up to code: How Storebrand does data ingestion on Snowflake]]></title>
            <link>https://medium.com/storebrand-tech/up-to-code-how-storebrand-does-data-ingestion-on-snowflake-a55d8e99499?source=rss-3659b65be950------2</link>
            <guid isPermaLink="false">https://medium.com/p/a55d8e99499</guid>
            <category><![CDATA[modern-data-stack]]></category>
            <category><![CDATA[data-ingestion]]></category>
            <category><![CDATA[data-engineer]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[meltano]]></category>
            <dc:creator><![CDATA[Henning Holgersen]]></dc:creator>
            <pubDate>Thu, 22 Jun 2023 11:58:46 GMT</pubDate>
            <atom:updated>2023-06-22T11:58:46.462Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1GA_udMGv9DICfRURJFtQw.png" /><figcaption>Data pipelines, as envisioned by DALL-E</figcaption></figure><p>Storebrand is building a cloud-based data platform, centered around Snowflake and what is loosely referred to as “the modern data stack”.</p><p>Loading data into the platform seems like a simple task, however we have encountered a lot of different issues specifically tied to ingesting CSV-files from a wide range of SFTP-servers. What should be a trivial ingest has been complicated by different encodings, type parsing, extra header rows, null values and connection errors from sources where we have no authority to fix the data.</p><h3>The options</h3><p>Finding a solution for loading large amounts of data in a way that is both cost-effective, stable and flexible enough proved to be a challenge. There are a number of different solutions:</p><ol><li>SaaS Services: Fivetran is perhaps the most known Extract/Load SaaS solution, and our technical tests of the platform were largely positive. Setting up connectors was intuitive, it handled almost all of our different edge cases without issues, but the pricing model based on the number of rows loaded was not a good match for our data, and made it excessively expensive — and Fivetran is already known for being expensive. Additionally, we had some minor technical quibbles with Fivetran. There are a number of other SaaS solutions as well, but they generally fell through due to technical limitations.</li><li>Self-hosted extract/load frameworks: The open Singer specification for extracting and loading data is interesting, and can be used independently as a command line tool or together with a framework for managing configuration and bookmarks. The two main players in this market are Airbyte and Meltano. The main difference between the two is that Airbyte is a GUI-first framework, while Meltano is CLI-first, with all configuration in code and version controlled.</li><li>Custom frameworks: Because of the wide range of SFTP-servers we need to load data from, it wouldn’t be unreasonable to create custom python scripts to load the data. The problem with custom scripts is that they are custom, and a lot of functionality that comes free with frameworks and SaaS solution has to be reinvented. This was not an option we seriously considered.</li></ol><p>There were a few fundamental choices contained in this:</p><ol><li>Do we want a GUI-driven solution? Click-ops can be convenient for tasks we rarely do, while code is convenient for tasks we do regularly. While we do want different teams in Storebrand to be able to add data themselves, ingestion is primarily handled and monitored by a central team. This makes a code-based solution preferable.</li><li>Do we want to host a UI ourselves? The short answer is a resounding No. Web applications increase our attack surface, and the log4shell vulnerability was actually the final nail in the coffin for Airbyte. Our first step in incident response was to shut down the Airbyte server, and we never cared to update it and turn it on again. An additional consideration is authentication. A number of solutions come in a “freemium” pricing model, where Enterprise level security comes at an Enterprise price point. If we were to host our own service, we would need to bring our own authentication. Our platform is hosted on Azure, and since Azure does not have an identity-aware-proxy offering, setting up sufficiently good authentication would have required extra work.</li></ol><p>This left us with two options: SaaS, or running Meltano on our own Azure platform. We decided on Meltano, choosing a code-first approach over GUIs. Getting to use machines in our own network is a bonus.</p><h3>Orchestrating Meltano</h3><p>We had already decided on an orchestration tool, Prefect, that allows us to schedule and run python code on our own infrastructure, nicely containerized. We won’t go into details about Prefect here, but it is an evolution of the older but more well-known Airflow scheduler. Because of the flexibility of orchestration tools like Prefect, we are able to package both Meltano and Prefect into a Docker image and schedule our extract/load jobs in Prefect Cloud. This combination of Prefect and Meltano proved highly flexible, and allows us to combine our extract/load jobs with other tasks — like table swaps in Snowflake so that we can do full reloads of data and seamlessly replace the old data with new.</p><p>From a developer perspective, the setup contains two parts: Configuring the Meltano project in docker images, and creating Prefect flows that handle credentials to the different sources and runs the Meltano jobs.</p><p>We are largely happy with this solution. It allows us to run code-based Extract/Load pipelines defined as code, we get all the benefits from Meltano, and run it on our own infrastructure hosted in Azure.</p><h3>The Singer ecosystem</h3><p>Singer is an open-source specification of data format in data exchange. It was designed to decouple the task of extracting data from a source system, from the task of loading the data into a target system (usually a database). Programs that extract data from a source system and print the data as singer-formatted records are called Taps. Programs that read data in a Singer format and write it to a destination, are called Targets. There is a large ecosystem of open-source Singer connectors, and anyone can add new ones. Meltano uses the Singer ecosystem of connectors and provides an organized way to install taps and targets, keep track of all configurations, track run history, and store bookmarks (an updated-at timestamp or similar that lets us load data incrementally instead of doing a full reload each time). These are things that we otherwise would have had to keep track of manually through a number of JSON files.</p><h3>The Meltano SDK</h3><p>While Singer connectors are generally quite simple to make, Meltano has created an SDK that provides a number of useful abstractions for creating connectors. Things like authenticating to REST APIs, handling common types of pagination, keeping track of bookmarks and a lot more. This is indeed so simple that creating a new, custom connector can take just an hour or two. Especially once you have a little experience.</p><p>Our team has already created several connectors. One for reading from an internal API, and two that we have open-sourced and can be found on the Meltano Hub and on Storebrand’s open-source Github account: tap-sharepointsites reads data from Sharepoint (currently only sharepoint Lists, but more is coming) and target-mssql for writing to Microsoft SQL Server databases. Although our new platform is Snowflake, we still have plenty of data in SQL Server.</p><h3>Meltano Cloud</h3><p>While we are generally happy with running Meltano on our own infrastructure and orchestrating it with Prefect, there are some drawbacks that have caused us to keep an eye out for other solutions:</p><ol><li>The developer experience suffers because it splits focus between two different repositories: The one for Prefect flows and the one for Docker images. First, the Meltano project needs to be updated with new taps/targets, and then we need to create or update a Prefect flow.</li><li>In Prefect, Meltano is invoked from the command line. For all of Prefect’s logging capabilities, logs are sadly missing when executing CLI commands. Errors show up, but for a normal run, we don’t get the normal visibility. We are exploring some options for fixing this.</li><li>A small number of flows have a tendency to fail silently: The data loading process stops, but the Prefect flow continues running indefinitely. Combined with the lack of logs, this has proven a difficult issue to debug and increases the monitoring requirements.</li></ol><p>Meltano, being a commercial company after all, has recently launched its cloud offering in Beta. Unlike other SaaS offerings, it is code-first, bring-your-own-repo and with a CLI to view logs, manually trigger runs, and enable/disable schedules. We wouldn’t want it any other way.</p><p>And since Meltano Cloud is priced by the number of runs and run duration, the pricing makes sense for our use case.</p><p>Meltano cloud is currently in beta and we are very excited about the direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3WMBwvAZYyqRP5FjQommnA.png" /><figcaption>Melty, the purple dragon mascot of Meltano, sitting on top of our snowflake database.</figcaption></figure><h3>Get started with Meltano</h3><p>If loading data with Meltano sounds interesting, you can get started with Meltano’s quickstart guide: <a href="https://docs.meltano.com/getting-started/part1">https://docs.meltano.com/getting-started/part1</a></p><p>And if you happen to use Sharepoint or SQL Server, you can find our taps and targets on our github page:</p><ul><li>tap-sharepointsites: <a href="https://github.com/storebrand/tap-sharepointsites">https://github.com/storebrand/tap-sharepointsites</a></li><li>target-mssql: <a href="https://github.com/storebrand/target-mssql">https://github.com/storebrand/target-mssql</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a55d8e99499" width="1" height="1" alt=""><hr><p><a href="https://medium.com/storebrand-tech/up-to-code-how-storebrand-does-data-ingestion-on-snowflake-a55d8e99499">Up to code: How Storebrand does data ingestion on Snowflake</a> was originally published in <a href="https://medium.com/storebrand-tech">Storebrand Digital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>