<?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 DW Conradie on Medium]]></title>
        <description><![CDATA[Stories by DW Conradie on Medium]]></description>
        <link>https://medium.com/@dewet_59381?source=rss-4ecd8d2aabaf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L4qyoIzYeFt-oOq75TCN2g.png</url>
            <title>Stories by DW Conradie on Medium</title>
            <link>https://medium.com/@dewet_59381?source=rss-4ecd8d2aabaf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:16:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dewet_59381/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[DCP: Snowflake’s Bridge to On-Prem Data]]></title>
            <link>https://medium.com/snowflake/dcp-snowflakes-bridge-to-on-prem-data-21f9680a1d5c?source=rss-4ecd8d2aabaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/21f9680a1d5c</guid>
            <category><![CDATA[snowflake-openflow]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-integration]]></category>
            <dc:creator><![CDATA[DW Conradie]]></dc:creator>
            <pubDate>Fri, 18 Sep 2026 14:01:04 GMT</pubDate>
            <atom:updated>2026-09-18T14:01:04.994Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vd2iRQ71Y8xrUK3djweCCA.png" /></figure><p>Snowflake’s <a href="https://docs.snowflake.com/en/user-guide/data-connectivity-proxy">Data Connectivity Proxy (DCP)</a> lets Snowflake reach a database that lives behind your firewall. No inbound ports, no VPN, no public IP. Snowflake describes it well in the abstract, but the easiest way to actually understand it is to build the whole path yourself: a real Linux box on your home network, a real Postgres database on it, and a real DCP agent tunneling traffic back to Snowflake.</p><p>That’s what this post walks through, end to end:</p><ol><li>Stand up a Linux host on your home network</li><li>Install Docker and run a sample Postgres database on it</li><li>Deploy the DCP agent on that same host</li><li>Wire up the Snowflake side (DCP object, network rule, external access integration)</li><li>Verify the tunnel and point an Openflow connector at the private database</li></ol><blockquote><strong><em>Heads up on scope:</em></strong><em> DCP is currently documented as available for use with Snowflake Openflow, not arbitrary SQL from a virtual warehouse.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3FIav4Ih0c2yplclHw7neA.png" /><figcaption>A high level overview of the setup.</figcaption></figure><h3>Architecture at a glance</h3><p>The agent only ever makes <em>outbound</em> connections: one to Snowflake’s control plane, and one per active data connection to Postgres. Your router never needs a forwarded port.</p><h3>Part 1: Stand up the Linux host</h3><p>Any of these work, since DCP’s requirements are modest (Linux kernel 5.x+, Docker, 1 vCPU, 512 MB RAM, outbound 443):</p><ul><li>A spare Raspberry Pi 4/5</li><li>An old mini PC / NUC</li><li>A VM in VirtualBox, UTM, or Proxmox on a machine you already have</li></ul><p>This post assumes <strong>Ubuntu Server 22.04 LTS</strong>, since setup is identical from here regardless of which of the above you picked.</p><h3>Option A: Raspberry Pi</h3><ol><li>Flash Ubuntu Server 22.04 LTS (64-bit) to an SD card with <a href="https://www.raspberrypi.com/software/">Raspberry Pi Imager</a>, setting hostname, SSH key, and Wi-Fi/static IP in the imager’s advanced options.</li><li>Boot the Pi, then ssh &lt;user&gt;@&lt;pi-ip&gt;.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*kgp07q9eIqynwe0BSRzWvg.png" /><figcaption>Running Ubuntu on a Raspberry Pi 5</figcaption></figure><h3>Option B: VM (VirtualBox example)</h3><ol><li>Download the Ubuntu Server 22.04 LTS ISO.</li><li>Create a VM: 2 vCPU, 2 GB RAM, 20 GB disk, <strong>Bridged Adapter</strong> networking (so it gets its own IP on your home LAN, reachable like a physical box).</li><li>Install Ubuntu Server with OpenSSH enabled during setup.</li></ol><p>Either way, confirm you’re in:</p><pre>lsb_release -a<br>uname -r        # confirm kernel 5.x or later</pre><h3>Part 2: Install Docker</h3><pre>sudo apt update &amp;&amp; sudo apt upgrade -y<br>curl -fsSL https://get.docker.com | sudo sh<br>sudo usermod -aG docker $USER<br>newgrp docker<br>docker run hello-world   # sanity check</pre><h3>Part 3: Run a sample Postgres database</h3><p>Spin up Postgres in a container and seed it with a tiny orders table so there&#39;s something meaningful for Snowflake to pull later.</p><pre>mkdir -p ~/dcp-demo/pgdata<br>docker run -d \<br>  --name demo-postgres \<br>  --restart unless-stopped \<br>  -e POSTGRES_USER=demo_user \<br>  -e POSTGRES_PASSWORD=change_me \<br>  -e POSTGRES_DB=demo_db \<br>  -p 5432:5432 \<br>  -v ~/dcp-demo/pgdata:/var/lib/postgresql/data \<br>  postgres:16</pre><p>Seed it with sample data:</p><pre>docker exec -it demo-postgres psql -U demo_user -d demo_db -c &quot;<br>CREATE TABLE orders (<br>  order_id     SERIAL PRIMARY KEY,<br>  customer     TEXT NOT NULL,<br>  item         TEXT NOT NULL,<br>  amount       NUMERIC(10,2) NOT NULL,<br>  ordered_at   TIMESTAMP DEFAULT now()<br>);<br>INSERT INTO orders (customer, item, amount) VALUES<br>  (&#39;Ada Lovelace&#39;, &#39;Mechanical Keyboard&#39;, 129.99),<br>  (&#39;Grace Hopper&#39;, &#39;USB Debugger&#39;, 45.50),<br>  (&#39;Alan Turing&#39;, &#39;Enigma Replica&#39;, 899.00);<br>&quot;</pre><p>The Openflow Postgres connector we’ll wire up in Part 8 replicates via logical replication, not plain polling, so this container needs a bit more than a table to seed. wal_level defaults to replica on the stock image, and logical replication needs it set to logical:</p><pre>docker exec -it demo-postgres psql -U demo_user -d demo_db -c &quot;ALTER SYSTEM SET wal_level = logical;&quot;<br>docker restart demo-postgres</pre><p>Then create a replication-capable user and a publication covering the table you want replicated. orders has a primary key already (order_id), which logical replication requires:</p><pre>docker exec -it demo-postgres psql -U demo_user -d demo_db -c &quot;<br>CREATE ROLE dcp_replicator WITH LOGIN PASSWORD &#39;change_me_too&#39; REPLICATION;<br>GRANT SELECT ON orders TO dcp_replicator;<br>CREATE PUBLICATION dcp_demo_pub FOR TABLE orders;<br>&quot;</pre><p>Note the host’s LAN IP. You’ll use it (or a hostname you assign it) as the destination in the DCP network rule:</p><pre>hostname -I | awk &#39;{print $1}&#39;</pre><p>For a stable reference, add a line to /etc/hosts on this same machine mapping the FQDN you&#39;ll use in Snowflake to that LAN IP, not to 127.0.0.1. The DCP agent runs in its own Docker container with its own isolated network namespace in Part 5, so 127.0.0.1 inside that container just points back at itself, not at the host running Postgres.</p><pre>echo &quot;&lt;host-lan-ip&gt;  home-postgres.internal&quot; | sudo tee -a /etc/hosts</pre><p>Postgres is already published with -p 5432:5432, so it&#39;s reachable on that LAN IP. Hold onto the IP; you&#39;ll pass it again in Part 5 so the agent container resolves the same hostname on its own.</p><blockquote><strong><em>Set a DHCP reservation before you go further.</em></strong><em> The </em><em>/etc/hosts entry above and the </em><em>--add-host flag in Part 5 both hardcode this LAN IP. If your router hands out a new one on the next lease renewal or reboot — more likely on Wi‑Fi than Ethernet — both of those mappings go stale silently, and the tunnel or replication just stops working with no obvious error. In your router&#39;s admin UI, find the Pi&#39;s MAC address (</em><em>ip link show on the Pi) and reserve its current IP to that MAC. Do this once and you won&#39;t need to re-touch either config file again.</em></blockquote><h3>Part 4: Create the DCP object in Snowflake</h3><p>If this is the first DCP object in the account, issue the per-account certificates DCP relies on for secure agent communication. This only needs to run once per account, not once per DCP object, take note that you should wait at least 30 minutes before starting the agent.</p><pre>SELECT SYSTEM$ISSUE_PER_ACCOUNT_CERTIFICATES();</pre><p>In a Snowflake worksheet, using ACCOUNTADMIN (or a role granted CREATE DATA CONNECTIVITY PROXY):</p><pre>CREATE DATA CONNECTIVITY PROXY home_lab_dcp;</pre><p>Optionally restrict which IPs can talk to the DCP control plane with a network policy:</p><pre>CREATE DATA CONNECTIVITY PROXY home_lab_dcp<br>  NETWORK_POLICY = my_network_policy;</pre><p>Generate a one-time bootstrap token (second argument is validity in days; keep this short for a demo):</p><pre>SELECT SYSTEM$GENERATE_DATA_CONNECTIVITY_PROXY_BOOTSTRAP_TOKEN(&#39;home_lab_dcp&#39;, 7);</pre><p>Copy the resulting JWT. You’ll paste it into a file on the Linux host next. It must be a Snowflake Access JWT; a PAT_-prefixed token won&#39;t work here.</p><h3>Part 5: Deploy the DCP agent on your home Linux box</h3><p>Back on the Ubuntu host:</p><pre>sudo mkdir -p /etc/dcp-agent/secrets<br>echo &#39;&lt;paste the bootstrap token from Part 4&gt;&#39; | sudo tee /etc/dcp-agent/secrets/dcp-bootstrap-token<br>sudo chmod 600 /etc/dcp-agent/secrets/dcp-bootstrap-token</pre><p><strong>For a real deployment you’d pull this from a secrets manager rather than pasting it directly</strong>. Worth mentioning even in a home-lab writeup, since the pattern (write it to that same file path, then start or rotate normally) is identical.</p><p>Start the agent container. Editing the host’s /etc/hosts in Part 3 only helps processes resolving names directly on the host. The agent runs in its own container with its own network namespace, so it needs the same home-postgres.internal mapping added directly to its container, via --add-host:</p><pre>docker run -d \<br>  --name dcp-agent \<br>  --restart unless-stopped \<br>  --add-host home-postgres.internal:&lt;host-lan-ip&gt; \<br>  -v /etc/dcp-agent/secrets:/etc/dcp-agent/secrets:ro \<br>  snowflakedb/dcp-client:latest \<br>  --sf-bootstrap-credentials /etc/dcp-agent/secrets/dcp-bootstrap-token</pre><p>Use the same LAN IP you noted in Part 3. Skip this flag and the agent will fail to resolve the hostname at all, or worse, resolve it to itself if you’d defaulted to 127.0.0.1 there.</p><p>The agent reads the JWT, authenticates to the DCP control plane, receives its mTLS certificate pair, and opens the tunnel to the relay. Watch it come up:</p><pre>docker logs -f dcp-agent</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f8JY1jVY8GCROSyc8cwYhg.png" /><figcaption>Docker Containers Running on the Pi</figcaption></figure><h3>Part 6: Verify the tunnel from Snowflake</h3><p>Back in Snowflake:</p><pre>DESCRIBE DATA CONNECTIVITY PROXY home_lab_dcp;</pre><p>Look for AGENT_HEALTH = HEALTHY and AGENT_STATUS = DCP_AGENT_LIFECYCLE_CONNECTED. If it&#39;s stuck in a pending state, docker logs dcp-agent on the Linux host is the first place to check. Most of the time, though, a stuck agent isn&#39;t a Docker problem at all. It&#39;s outbound 443 getting blocked somewhere between the host and Snowflake.</p><p>This trips people up because home networks are built to assume outbound traffic is always fine, and it usually is. But a few things can still get in the way:</p><ul><li><strong>ISP-level filtering.</strong> Some residential ISPs, especially on business-lite or shared-IP plans, restrict outbound traffic on non-standard patterns. Plain HTTPS on 443 almost always gets through, but it’s worth ruling out if nothing else explains the stall.</li><li><strong>Router or firewall appliance rules.</strong> If you’re running something like pfSense, OPNsense, or a UniFi gateway with outbound rules instead of the usual “allow all outbound” default, double-check that 443 isn’t scoped to a smaller set of destinations than DCP needs.</li><li><strong>DNS resolution from the host, not just the network.</strong> The agent needs to resolve Snowflake’s endpoints before it can even attempt the connection. A quick curl -v https://&lt;your-account&gt;.snowflakecomputing.com from the Ubuntu host will tell you in one shot whether it&#39;s a DNS failure, a connection timeout, or something further along in the TLS handshake.</li><li><strong>Corporate VPN clients running on the host by habit.</strong> If this box also has a work VPN client installed and it decided to grab the default route, outbound traffic can end up routed somewhere DCP was never meant to reach.</li></ul><p>None of this needs special firewall rules to fix. It needs the default “allow all outbound” posture most home routers already ship with, left alone. The moment curl reaches Snowflake cleanly from the host, the agent connecting is just a matter of time.</p><p><strong>A second, separate outbound path: telemetry.</strong> Beyond the control-plane connection above, Snowflake delivers a telemetry hostname to the agent at bootstrap, in the form:</p><pre>&lt;org&gt;-&lt;account&gt;.telemetry.&lt;locator&gt;.snowflakecomputing.com</pre><p>This needs its own outbound TLS on 443, distinct from the control-plane endpoint. Reaching your Postgres database doesn’t confirm this path — that’s the destination side, not the telemetry side — and connection history and some route-check stages in Snowflake stay empty until the agent can reach it. Check both the host and the container, since the agent runs in its own network namespace:</p><pre>export TELEMETRY_HOST=&quot;&lt;org&gt;-&lt;account&gt;.telemetry.&lt;locator&gt;.snowflakecomputing.com&quot;</pre><pre># from the Pi&#39;s host network<br>getent hosts $TELEMETRY_HOST<br>curl -v --max-time 10 https://$TELEMETRY_HOST<br># from inside the agent&#39;s own container/network namespace<br>docker run --rm --network container:dcp-agent curlimages/curl -v --max-time 10 https://$TELEMETRY_HOST</pre><p>If the host-level check succeeds but the container-level one doesn’t, it’s the same class of container-egress issue as the home-postgres.internal resolution problem from Part 3: the container isn&#39;t automatically inheriting the host&#39;s network view.</p><h3>Part 7: Point DCP at the Postgres container</h3><p>Create a network rule naming the Postgres host and port. Use the DNS-style hostname you set in /etc/hosts back in Part 3, not a raw IP. Note the special MODE, which is what routes this rule through DCP instead of ordinary Snowflake egress:</p><pre>CREATE NETWORK RULE home_postgres_rule<br>  MODE = DATA_CONNECTIVITY_PROXY_EGRESS<br>  TYPE = HOST_PORT<br>  VALUE_LIST = (&#39;home-postgres.internal:5432&#39;);</pre><p>Wrap it in an external access integration:</p><pre>CREATE EXTERNAL ACCESS INTEGRATION home_postgres_eai<br>  ALLOWED_NETWORK_RULES = (home_postgres_rule)<br>  ENABLED = TRUE;</pre><p>Creating the EAI doesn’t link it to the DCP object on its own — the DCP has to be told which EAIs it’s allowed to carry traffic for:</p><pre>ALTER DATA CONNECTIVITY PROXY home_lab_dcp SET<br>  EXTERNAL_ACCESS_INTEGRATIONS = (home_postgres_eai);</pre><p>Skip this and the EAI attaches to your Openflow runtime in Part 8 just fine, but traffic never actually routes through home_lab_dcp — it just fails as if the network rule doesn&#39;t exist.</p><h3>Part 8: Configure the Openflow PostgreSQL connector</h3><p>Attach home_postgres_eai to your Openflow runtime first. This is a common miss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*Fld4XPT2itGdH9nu6aD_Fw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*ui_s6uj-aLf2es9pBrEAUw.png" /></figure><p>Before touching the connector, create the destination database and a warehouse for it to land in, and grant both to the role your Openflow runtime executes as — the runtime can’t write to objects it hasn’t been granted:</p><pre>CREATE DATABASE IF NOT EXISTS dcp_demo_db;<br><br>CREATE WAREHOUSE IF NOT EXISTS dcp_demo_wh WITH WAREHOUSE_SIZE = &#39;XSMALL&#39; AUTO_SUSPEND = 60;<br><br>GRANT USAGE ON DATABASE dcp_demo_db TO ROLE &lt;your_openflow_runtime_execute_as_role&gt;;<br><br>GRANT CREATE SCHEMA ON DATABASE dcp_demo_db TO ROLE &lt;your_openflow_runtime_execute_as_role&gt;;<br><br>GRANT USAGE ON WAREHOUSE dcp_demo_wh TO ROLE &lt;your_openflow_runtime_execute_as_role&gt;;<br><br>GRANT OPERATE ON WAREHOUSE dcp_demo_wh TO ROLE &lt;your_openflow_runtime_execute_as_role&gt;;</pre><p>From the Openflow connector catalog, add the <strong>PostgreSQL</strong> connector rather than building a controller service by hand. It asks for:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*yv1MoUgrZGpxIl0SzjCnxg.png" /></figure><p>The connector also needs the PostgreSQL JDBC driver .jar uploaded, since Openflow doesn&#39;t bundle it by default. Same home-postgres.internal:5432 destination as everywhere else in this post. Snowflake&#39;s relay maps that to home_lab_dcp automatically through the EAI, so there&#39;s still no manual tunnel reference to configure by hand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*6LPaAmrhKvzm4gxDLz9Mhw.png" /><figcaption>Flow-file content displaying the data stored in the “On-Prem” Postgres instance.</figcaption></figure><p>Once the connector starts, it reads the replication slot backing dcp_demo_pub and the three seeded orders rows land in your Snowflake table, having traveled: <strong>Postgres → DCP agent (outbound only) → Snowflake relay → Openflow connector</strong>, without a single inbound port opened on your home router.</p><p>A detailed guide for configuring the PostgreSQL connector is available <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/connectors/postgres/setup">here</a>.</p><h3>Cleanup</h3><p>When you’re done experimenting:</p><pre>docker stop dcp-agent demo-postgres<br>docker rm dcp-agent demo-postgres</pre><p>And in Snowflake:</p><pre>DROP EXTERNAL ACCESS INTEGRATION home_postgres_eai;<br>DROP NETWORK RULE home_postgres_rule;<br>DROP DATA CONNECTIVITY PROXY home_lab_dcp;</pre><h3>A few things worth calling out for anyone following along</h3><ul><li><strong>The agent is a dumb pipe.</strong> It operates at the TCP level and never sees credentials or query content. Those stay inside Snowflake and the Openflow connector.</li><li><strong>HA is just more agents.</strong> For a real deployment (not a home lab), run at least two agent instances in separate failure domains; the control plane reroutes automatically if one drops.</li><li><strong>Rotate tokens without downtime.</strong> The agent re-reads the credentials file on every certificate rotation cycle, so swapping the token is just an atomic file replace. No restart needed.</li></ul><p>That’s the full loop: a database that never accepted an inbound connection from the internet, reachable from Snowflake anyway.</p><h3>Next Steps</h3><ul><li>Learn more on <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/about">docs.snowflake.com</a></li><li>Sign up for a <a href="https://bit.ly/SnowflakeTrial">Snowflake Trial</a></li></ul><p>If you found this useful, follow me on <a href="https://www.linkedin.com/in/de-wet-conradie-21b02b42/">LinkedIn </a>for more Data Engineering and Snowflake AI Data Cloud use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21f9680a1d5c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snowflake/dcp-snowflakes-bridge-to-on-prem-data-21f9680a1d5c">DCP: Snowflake’s Bridge to On-Prem Data</a> was originally published in <a href="https://medium.com/snowflake">Snowflake Builders Blog: Data Engineers, App Developers, AI, &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Treating Openflow Like Code: A Git-Backed Workflow for Process Groups]]></title>
            <link>https://medium.com/snowflake/treating-openflow-like-code-a-git-backed-workflow-for-process-groups-215fd46ad2bd?source=rss-4ecd8d2aabaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/215fd46ad2bd</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[snowflake-openflow]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[DW Conradie]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 21:01:01 GMT</pubDate>
            <atom:updated>2026-08-28T21:01:01.145Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r4wgJWP-QX7siDihUYZjCg.png" /></figure><p>If you have worked with any GUI-driven pipeline tool, you have probably lived through some version of this: you build a pipeline visually, and when it is time to move it to another environment, you export it as a file, hand that file to someone else, and hope it imports cleanly on the other side. Maybe you rename it something like pipeline_final_v3_actually_final.xml and drop it in a shared folder, and hope nobody opens it before you do.</p><p>Openflow is Snowflake’s managed service built on Apache NiFi, where a pipeline goes by the name P<strong>rocess Group</strong>, a term you will see throughout this post. But the underlying problem here is not specific to NiFi or Openflow. It is the export-and-reimport pattern itself.</p><p>That pattern has three problems that never really go away, regardless of which tool you are exporting from. The exported file does not capture runtime state, so anything stateful comes back cold on import. There is no diff. You cannot look at two exported files and see what actually changed between them, so review means eyeballing a canvas and hoping you notice the one property someone edited. And the whole thing is manual. A human exports, a human renames, a human imports, a human promotes. Every one of those steps is a place to fumble a change between dev and prod.</p><p>Openflow does not solve that by giving you a better export button. It solves it by giving process groups an actual relationship with Git: branches, commits, diffs, pull requests, the works. This month is about setting that up end to end, from a bare GitHub repo to a real dev-to-prod promotion with parameters handled properly.</p><h3>What We’re Building</h3><ul><li>A GitHub-backed Registry Client wired into Controller Settings, so process groups can start version control against a real repo</li><li>A small but real transform flow, version-controlled from the canvas, with a look at what actually lands in Git as JSON</li><li>A feature-branch workflow: change on canvas, commit to a branch, open a PR, review the diff, merge</li><li>A promotion path where a separate prod runtime pulls the merged flow from main</li><li>Parent and child Parameter Contexts that share common values but override per environment</li></ul><h3>Mindset Shift: The Process Group Is the Unit of Change, Not the Export</h3><p>The instinct coming from template-based NiFi is to think in terms of files you move around. Export this, import that, keep a folder of versions somewhere safe.</p><p>With Git-backed process groups, the process group itself is the thing under version control. It has a working state on the canvas and a committed state in Git, the same way a working directory relates to a Git repo. You do not export when you want a snapshot. You commit. You do not compare two exported files by hand. You open a PR and read the diff. The unit of change is the process group’s configuration, not an artifact you generate from it.</p><p>This matters most when you get to promotion. Moving a change to prod is not “import this file into a different environment.” It is “point the prod process group at a newer commit,” which is a much smaller and much safer operation.</p><h3>Architecture Overview</h3><p>Dev work happens on a feature branch inside the Registry Client’s GitHub repo. A PR merges that branch into main. A prod process group, versioned against the same repo, updates to pull the latest commit from main when you are ready to promote.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xg3xIBnUEb_80M0GjUCOMg.png" /></figure><p>The dev canvas and the prod canvas are two different process groups pointed at the same bucket in the same registry. Neither one owns the flow definition. Git does. What differs between them is which commit they are currently synced to, and which Parameter Context resolves the environment-specific values at runtime.</p><h3>Prerequisites</h3><ol><li>A GitHub repository to act as flow storage, plus a Personal Access Token with repo scope for Openflow to authenticate against it</li><li>Openflow ACCOUNTADMIN-equivalent access to Controller Settings, to add a Registry Client</li><li>A dev and a prod Openflow runtime (or two environments you treat as such) with network access to GitHub</li></ol><p>If your organization runs on Azure DevOps or GitLab instead of GitHub, Openflow also ships an Azure DevOps/ GitLab Registry Client that works the same way, repo and PAT included. Everything past the Registry Client setup in this post applies the same way regardless of which one you pick.</p><h3>Setup</h3><h3>Create the GitHub repo and PAT</h3><p>Create an empty repository to hold flow definitions. It does not need a README or a .gitignore, Openflow will populate it. Generate a PAT scoped to repo access on that repository and store it somewhere your Secrets Manager or Openflow can read it from securely. Do not paste it directly into a processor property.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*p-wD18WIWJY0saqpTlGvuQ.png" /></figure><h3>Add a GitHub Registry Client</h3><p>In Controller Settings, go to Registry Clients and add a new client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*fLAre8U8DQy2n1w7-YpmJw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*R9y6hGTPIcdjizqGyCED1w.png" /></figure><p>The Repository Branch here is the default branch Openflow reads from when you first browse the registry. It is not a lock. Individual process groups can and will version against feature branches once you start making changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*0BGx7Z5PwrNgI4AUlSB4pQ.png" /></figure><h3>Starting Version Control on a Process Group</h3><p>I built a small but real transform flow rather than a GenerateFlowFile toy, since a two-processor loop does not tell you anything useful about what actually lands in Git. Here is how to reproduce it:</p><ol><li>Create a new process group on the dev canvas and name it json-transform-router.</li><li>Drag in a GenerateFlowFile processor as the source. Set <strong>Custom Text</strong> to a small order payload, { &quot;id&quot;: &quot;ORD-1042&quot;, &quot;email&quot;: &quot;jane@example.com&quot; }, and add a record.type attribute to it (via the <strong>Insert Header</strong> / dynamic property fields on the processor) so downstream routing has something to key off.</li><li>Drag in a JoltTransformJSON processor. Set <strong>Jolt Transform</strong> to chain and <strong>Jolt Specification</strong> to the shift spec below, which renames the two fields into the shape downstream systems expect.</li><li>Drag in a RouteOnAttribute processor. Add a dynamic property, record.type, with the value ${record.type:equals(&#39;order&#39;)}, so FlowFiles carrying an order record route down a separate relationship from everything else.</li><li>Wire the processors together: GenerateFlowFile&#39;s success relationship connects into JoltTransformJSON, whose success relationship connects into RouteOnAttribute. Terminate or route the unmatched relationship on RouteOnAttribute so the canvas has no dangling relationships.</li></ol><p>Three processors, one JOLT spec, one routing decision. Small enough to read in a screenshot, real enough that the diff later in this post means something.</p><pre>[<br>  {<br>    &quot;operation&quot;: &quot;shift&quot;,<br>    &quot;spec&quot;: {<br>      &quot;id&quot;: &quot;order_id&quot;,<br>      &quot;email&quot;: &quot;customer_email&quot;<br>    }<br>  }<br>]</pre><p>A FlowFile shaped like { &quot;id&quot;: &quot;ORD-1042&quot;, &quot;email&quot;: &quot;jane@example.com&quot; } comes out the other side as { &quot;order_id&quot;: &quot;ORD-1042&quot;, &quot;customer_email&quot;: &quot;jane@example.com&quot; }. Nothing nested, nothing clever, just enough of a rename to prove the transform did something when you look at the diff later.</p><p>With the process group built on the dev canvas, right-click it and choose <strong>Version → Start Version Control</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*SADrt-YXlEZJMIOpZB2RfA.png" /></figure><p>Once it commits, the process group’s canvas header shows a version badge instead of the usual “unversioned” state. This is the part most tutorials skip. Here is what actually lands in the repo:</p><pre>{<br>  &quot;flowContents&quot;: {<br>    &quot;processGroups&quot;: [],<br>    &quot;processors&quot;: [<br>      {<br>        &quot;identifier&quot;: &quot;5e2c...&quot;,<br>        &quot;name&quot;: &quot;JoltTransformJSON&quot;,<br>        &quot;type&quot;: &quot;org.apache.nifi.processors.jolt.JoltTransformJSON&quot;,<br>        &quot;properties&quot;: {<br>          &quot;Jolt Transform&quot;: &quot;chain&quot;,<br>          &quot;Jolt Specification&quot;: &quot;[ { \&quot;operation\&quot;: \&quot;shift\&quot;, \&quot;spec\&quot;: { \&quot;id\&quot;: \&quot;order_id\&quot;, \&quot;email\&quot;: \&quot;customer_email\&quot; } } ]&quot;<br>        },<br>        &quot;position&quot;: { &quot;x&quot;: 320.0, &quot;y&quot;: 128.0 }<br>      },<br>      {<br>        &quot;identifier&quot;: &quot;8a91...&quot;,<br>        &quot;name&quot;: &quot;RouteOnAttribute&quot;,<br>        &quot;type&quot;: &quot;org.apache.nifi.processors.standard.RouteOnAttribute&quot;,<br>        &quot;properties&quot;: {<br>          &quot;record.type&quot;: &quot;${record.type:equals(&#39;order&#39;)}&quot;<br>        }<br>      }<br>    ],<br>    &quot;connections&quot;: [ /* processor-to-processor wiring, by identifier */ ]<br>  },<br>  &quot;parameterContexts&quot;: {},<br>  &quot;flowEncodingVersion&quot;: &quot;1.0&quot;<br>}</pre><p>Processor properties, canvas positions, and connection wiring all serialize into that JSON. Processor identifiers are stable within a registry, which is what makes diffs meaningful. Change a JOLT spec and the diff shows exactly that string changing, not a wall of noise from every processor shifting position by a pixel.</p><h3>The Dev → Review → Prod Loop</h3><h3>Feature branches for changes made on canvas</h3><p>For the next change, I didn’t need to touch GitHub at all first. Right-click the versioned process group and choose <strong>Version → Create Branch</strong>, which pops a dialog showing the current branch (main) and a field for the new branch name, feature/add-error-routing. Openflow creates the branch in GitHub and switches the process group to version against it in one step. Every commit from the canvas after that lands on the feature branch, not on main directly.</p><p>Openflow will not let you commit straight to a protected branch if you have branch protection turned on in GitHub, which is worth enabling for main on this repo the same way you would for application code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*RuR52JxHpUHzWr8jjovKKg.png" /></figure><p>With the branch created, I made the actual change on canvas: a LogAttribute processor wired to RouteOnAttribute&#39;s unmatched relationship, so rows that fail the record.type check get logged instead of silently dropping off the canvas. The process group&#39;s status bar picks up the change immediately, showing a count of local modifications not yet in Git.</p><p>To commit, right-click the process group again and choose <strong>Version → Commit local changes</strong>. That opens a dialog to write a commit message, same as the initial version control commit, and pushes the result straight to feature/add-error-routing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*t-2dli70g9wP4o2FyupmSw.png" /></figure><h3>Opening a PR and reviewing the diff</h3><p>With the branch pushed, open a pull request in GitHub as usual. This is where the “no diff” problem from template exports actually gets solved, but it needs one piece of setup first: drop Snowflake’s Flow Diff GitHub Action into .github/workflows/flowdiff.yml in the flow storage repo. Once that workflow exists, every PR against the repo gets a visual, human-readable flow diff rendered directly into the PR conversation, added processors, changed properties, and rewired connections shown as a real diagram instead of a raw JSON blob.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*D-umqpBvFFETDe6cpw5tdw.png" /></figure><p>A reviewer who has never opened the canvas can look at that diff and understand exactly what changed: one new RouteOnAttribute relationship, one new LogAttribute processor wired to it, no changes to the existing transform logic. That is the review that template exports never gave you.</p><h3>Merge to main</h3><p>Approve, merge, done. main now has the failure-routing change committed.</p><h3>Promoting to Prod</h3><p>The prod environment has its own process group, versioned against the same bucket and flow name, currently synced to the commit that predates the failure-routing change. Promotion is not a redeploy. It is telling that process group to change its version.</p><p>Right-click the prod process group and choose <strong>Version → Change Version</strong>, then pick the latest commit on main.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*rHRYqmgxzjSeAXhSqZQgaQ.png" /></figure><p>Openflow diffs the currently running configuration against the target commit and applies the difference. It does not tear down and rebuild the whole process group. Only what changed on canvas changes in prod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*lrwLHDTSmKjmexyMKv-iDg.png" /></figure><h3>Parameter Contexts Across Environments</h3><p>The flow itself should be identical between dev and prod. What differs is configuration: which database to hit, which bucket to read from, what the retry count should be. That is exactly what Parameter Contexts are for, and Openflow supports inheritance between them.</p><p>Each Parameter Context maps one-to-one with a process group, which is why the inheritance model matters here. You are not sharing one giant context across every flow. You are giving each process group its own context and letting the parent-child relationship carry the values that should stay identical across environments.</p><p>I set up a parent context, shared-pipeline-params, holding values that are the same everywhere: retry counts, batch sizes, timezone settings. Each environment gets its own child context that inherits from the parent and overrides only what actually differs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*nI-XTgXzEcJMC6Msn-9BuQ.png" /></figure><p>The dev environment gets its own child context, dev-params, inheriting the same retry.count and batch.size, overriding target.database to DEV_DB and target.warehouse to a smaller warehouse. The process group references the child context appropriate to its environment. Nobody has to remember to keep the shared values in sync by hand, since they only exist in one place.</p><h3>Limitations and Caveats</h3><ul><li><strong>Flow IDs are not portable across registries.</strong> A process group versioned against one Registry Client cannot simply be repointed at a different registry and expect history to carry over. If you are migrating registries, plan on a fresh Start Version Control and treat history in the old registry as an archive, not something you drag forward.</li><li><strong>Rolling back does not restore processor state.</strong> Changing version to an older commit restores the configuration, not in-flight state like a stateful processor’s last watermark or cursor. Know what state your processors hold before you roll back, and be ready to reset or reseed it.</li><li><strong>Parameter changes are not versioned the same way flow structure is.</strong> A recent release note flagged this explicitly: editing a Parameter Context’s values does not itself generate a flow commit, only structural changes to the process group do. It is easy to assume a parameter edit is tracked the same way a processor change is. It is not. Treat parameter changes as their own change management concern, not something Git-backed versioning covers for free.</li><li><strong>Branch protection is your responsibility, not Openflow’s.</strong> Nothing stops someone from versioning a process group straight against main if the repo does not enforce protection rules. Set them up the same way you would for any other repo you care about.</li></ul><h3>Wrapping Up</h3><p>Export as template, re-import is gone from this workflow entirely. What replaced it is a process group with a real relationship to Git: branches for in-progress work, diffs a reviewer can actually read, a PR before anything reaches prod, and a promotion step that is a version change instead of a file shuffle. Parameter Contexts and a Secrets Manager handle the part that version control alone never could, letting the exact same flow definition run correctly in two environments without carrying a single secret in the JSON.</p><p><strong>Checklist for setting this up end to end:</strong></p><ul><li>[ ] Create a GitHub repo for flow storage and a PAT scoped to it</li><li>[ ] Add a GitHub (or Azure DevOps) Registry Client in Controller Settings</li><li>[ ] Start version control on a process group, confirm the JSON lands in the repo as expected</li><li>[ ] Branch, edit on canvas, commit to the branch, open a PR, review with Flow Diff, merge</li><li>[ ] Point the prod process group at the merged commit via Change Version</li><li>[ ] Set up a parent Parameter Context for shared values and child contexts per environment</li><li>[ ] Enable branch protection on main in the flow storage repo</li></ul><p><strong>Reference:</strong> <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/version-control-custom-flows">Version control for custom flows in Openflow</a> — the official Snowflake documentation for Registry Clients, the Flow Diff GitHub Action, and Parameter Context inheritance covered in this post.</p><p><strong>Next steps:</strong></p><ul><li>Wire sensitive parameters through a Secrets Manager (AWS Secrets Manager, Azure Key Vault, or similar) instead of storing them as literal values in a Parameter Context, so credentials never touch the JSON that gets committed to Git</li><li>Now that flow structure and environment config both promote cleanly, look at what a CI check on that PR could actually validate before a human ever opens the diff</li></ul><p><em>This is part of an ongoing series on building data pipelines with Snowflake Openflow.</em></p><h3>Next Steps</h3><ul><li>Learn more on <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/about">docs.snowflake.com</a></li><li>Sign up for a <a href="https://bit.ly/SnowflakeTrial">Snowflake Trial</a></li></ul><p>If you found this useful, follow me on <a href="https://www.linkedin.com/in/de-wet-conradie-21b02b42/">LinkedIn </a>for more Data Engineering and Snowflake AI Data Cloud use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=215fd46ad2bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snowflake/treating-openflow-like-code-a-git-backed-workflow-for-process-groups-215fd46ad2bd">Treating Openflow Like Code: A Git-Backed Workflow for Process Groups</a> was originally published in <a href="https://medium.com/snowflake">Snowflake Builders Blog: Data Engineers, App Developers, AI, &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ingesting On-Prem Data with JDBC in Openflow: The 6-Processor Pattern]]></title>
            <link>https://medium.com/snowflake/ingesting-on-prem-data-with-jdbc-in-openflow-the-6-processor-pattern-b36d536e5617?source=rss-4ecd8d2aabaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b36d536e5617</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[snowflake-openflow]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <dc:creator><![CDATA[DW Conradie]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 19:01:01 GMT</pubDate>
            <atom:updated>2026-07-27T19:01:01.673Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lu9nTGVZYjqondIHEE0zrQ.png" /></figure><p>A practical walkthrough for building a reusable SQL Server to Snowflake ingestion flow.</p><h3>Last Month We Coordinated Async Workloads. This Month We Build the Ingestion Backbone.</h3><p>Last month we used Wait and Notify to coordinate asynchronous fan-out and fan-in work. That solved the &quot;when is everything done?&quot; problem.</p><p>This month is about the foundation underneath that pattern: a clean JDBC ingestion design that runs on schedule, fetches only changed rows, and lands data into Snowflake reliably.</p><p>We will build the standard six-processor pattern and keep it parameterized so it can be reused table by table.</p><h3>What We’re Building</h3><ul><li>A reusable incremental ingestion pipeline from on-prem SQL Server into Snowflake</li><li>A watermark-driven extraction pattern that only pulls changed rows</li><li>A paginated JDBC read using GenerateTableFetch and ExecuteSQLRecord</li><li>Avro transport into PutSnowpipeStreaming</li><li>A controller-service and parameter setup that is safe to promote across environments</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaWsJNV7YZOhidT_IeD9XA.png" /></figure><h3>Mindset Shift</h3><p>The fastest way to create technical debt in Openflow is to treat every table as a custom project. It works for one or two tables, then maintenance becomes noisy.</p><p>The repeatable approach is better: same processor pattern, same naming convention, same failure handling, different parameters. Copy, configure, validate, promote.</p><h3>Architecture Overview</h3><p>At a high level, data moves from SQL Server through Openflow and into Snowflake:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*i1HHSAAN57vprxqQKp6mLw.png" /></figure><p>And inside each table process group:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sr-XvEpUVdZNs6BNCfjq0A.png" /></figure><h3>Processor Version Note</h3><p>This walkthrough deliberately uses PutSnowpipeStreaming (v1) because it remains available and is still widely used in existing Openflow implementations.</p><p>For this specific pattern (single-table incremental JDBC ingestion with Avro payloads), PutSnowpipeStreaming is still a valid and practical choice.</p><p>Quick comparison:</p><ul><li>PutSnowpipeStreaming: current pattern-compatible option used across many existing production flows; good for stability and compatibility when you are not refactoring all process groups.</li><li>PublishSnowpipeStreaming: is a newer recommended processor it is better for net-new builds and should align with current naming and forward platform evolution.</li></ul><p>When to prefer PublishSnowpipeStreaming:</p><ul><li>You are on a newer runtime where it is the recommended Snowpipe Streaming processor</li><li>You want to align new pipeline development with the current processor naming and long-term platform direction</li><li>You are modernizing existing flows and want consistency with updated Openflow documentation and examples</li></ul><p>In short: for compatibility with existing deployed process groups, PutSnowpipeStreaming is fine here; for new builds on current runtimes, choose PublishSnowpipeStreaming.</p><h3>Prerequisites</h3><ol><li>Openflow runtime with network connectivity to your SQL Server endpoint</li><li>SQL Server JDBC driver configured in Openflow</li><li>A Snowflake target table ready for landing records</li><li>Parameter contexts created for source and target settings</li><li>A reliable source watermark column (for example a last-update timestamp)</li></ol><pre>-- Example target table (replace names with your own environment values)<br>CREATE TABLE IF NOT EXISTS &lt;TARGET_DATABASE&gt;.&lt;TARGET_SCHEMA&gt;.&lt;TARGET_TABLE&gt; (<br>    &lt;PRIMARY_KEY_COLUMN&gt; NUMBER,<br>    &lt;WATERMARK_COLUMN&gt; TIMESTAMP_NTZ,<br>    &lt;OTHER_COLUMNS&gt; VARIANT,<br>    INGESTED_AT TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP()<br>);</pre><h3>Controller Services</h3><h4>Source JDBC Connection Pool</h4><p><strong>Type:</strong> HikariCPConnectionPool</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*6ikxCoMOUBUPGCwry7shyg.png" /></figure><p><strong>Connection:</strong> used by Create-Queries and Fetch-Data</p><h3>Snowflake Connection Service</h3><p><strong>Type:</strong> SnowflakeConnectionService</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*HtkmAqyKiyn6sEGaL4p23Q.png" /></figure><p><strong>Connection:</strong> used by Fetch-Watermark ,PutSnowpipeStreaming</p><h3>Record Services</h3><p><strong>Types:</strong> JsonRecordSetWriter, AvroRecordSetWriter, AvroReader</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*GJwCijU75RfU_LpU1KcrWw.png" /></figure><h3>Step-by-Step Walkthrough</h3><h3>1. init</h3><p><strong>Type:</strong> GenerateFlowFile<br><strong>Scheduling:</strong> Timer/CRON</p><p>This generates one trigger FlowFile and sets the dynamic attributes that parameterize the entire run.</p><p>Dynamic attributes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QB1tswHD4sSxsFyWz0O7Xg.png" /></figure><p><strong>Connection:</strong> success -&gt; Fetch-Watermark</p><h3>2. Fetch-Watermark</h3><p><strong>Type:</strong> ExecuteSQLRecord</p><p>Reads the current high-water mark from the target table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*Fven_G0fEtSISE0IY8oV1A.png" /></figure><p><strong>Connection:</strong> success -&gt; Bind-Watermark<br><strong>Failure:</strong> failure -&gt; LogAttribute</p><h3>3. Bind-Watermark</h3><p><strong>Type:</strong> EvaluateJsonPath</p><p>Extracts watermark values from JSON content into FlowFile attributes.</p><p>Dynamic JSONPath properties:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*UtL40JPxN55HtCbONAguig.png" /></figure><p><strong>Connection:</strong> matched -&gt; Create-Queries<br><strong>Failure:</strong> failure and unmatched -&gt; LogAttribute</p><h3>4. Create-Queries</h3><p><strong>Type:</strong> GenerateTableFetch</p><p>Generates paginated source SQL statements based on the watermark.</p><p>Keep Concurrent Tasks at 1 because GenerateTableFetch maintains internal state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*20XbOcif28BxrF9lxmYcIA.png" /></figure><p><strong>Connection:</strong> success -&gt; Fetch-Data<br><strong>Failure:</strong> failure -&gt; LogAttribute</p><h3>5. Fetch-Data</h3><p><strong>Type:</strong> ExecuteSQLRecord</p><p>Executes each generated SQL query against SQL Server and writes records as Avro.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*hCNbyJTtkI65322ZQcNDLA.png" /></figure><p><strong>Connection:</strong> success -&gt; PutSnowpipeStreaming<br><strong>Failure:</strong> failure -&gt; LogAttribute</p><h3>6. PutSnowpipeStreaming</h3><p><strong>Type:</strong> PutSnowpipeStreaming</p><p>Streams Avro records into the target Snowflake table.</p><p>At least once is resilient, but design downstream deduplication where required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*6HMgencJZ1wgEHuyr2NJBg.png" /></figure><p><strong>Failure:</strong> failure -&gt; LogAttribute</p><h3>7. LogAttribute</h3><p><strong>Type:</strong> LogAttribute</p><p>Standard failure sink for diagnostics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*XscEND-BUlgf6ou1QNmskQ.png" /></figure><h3>Validation Query</h3><pre>SELECT COUNT(*) AS row_count,<br>       MAX(&lt;WATERMARK_COLUMN&gt;) AS latest_loaded<br>FROM &lt;TARGET_DATABASE&gt;.&lt;TARGET_SCHEMA&gt;.&lt;TARGET_TABLE&gt;;</pre><h3>Limitations and Caveats</h3><ul><li><strong>Watermark quality determines incremental quality.</strong> If the source watermark column is unreliable, incremental extraction will drift.</li><li><strong>GenerateTableFetch is stateful.</strong> Keep it single-threaded to avoid watermark state corruption.</li><li><strong>At least once can duplicate on retries.</strong> Plan for deduplication in downstream models.</li><li><strong>Backfills need tuning.</strong> Large historical loads often require temporary Partition Size changes.</li><li><strong>Schema drift causes load failures.</strong> Source DDL changes must be reflected in target tables.</li><li><strong>Sensitive parameters are not exported.</strong> Secrets must be re-entered when importing flows into a new environment.</li></ul><h3>Wrapping Up</h3><p>This pattern gives you a stable JDBC ingestion baseline: incremental, parameterized, and repeatable. Once the services and conventions are in place, onboarding additional tables becomes mostly a configuration exercise.</p><p><em>This is part of an ongoing series on building data pipelines with Snowflake Openflow.</em></p><h3>Next Steps</h3><ul><li>Learn more on <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/about">docs.snowflake.com</a></li><li>Sign up for a <a href="https://bit.ly/SnowflakeTrial">Snowflake Trial</a></li></ul><p>If you found this useful, follow me on <a href="https://www.linkedin.com/in/de-wet-conradie-21b02b42/">LinkedIn </a>for more Data Engineering and Snowflake AI Data Cloud use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b36d536e5617" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snowflake/ingesting-on-prem-data-with-jdbc-in-openflow-the-6-processor-pattern-b36d536e5617">Ingesting On-Prem Data with JDBC in Openflow: The 6-Processor Pattern</a> was originally published in <a href="https://medium.com/snowflake">Snowflake Builders Blog: Data Engineers, App Developers, AI, &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Knowing When You’re Done: Coordinating Async Flows with Wait & Notify]]></title>
            <link>https://medium.com/snowflake/knowing-when-youre-done-coordinating-async-flows-with-wait-notify-669773af1b15?source=rss-4ecd8d2aabaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/669773af1b15</guid>
            <category><![CDATA[snowflake-openflow]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[elt-pipeline]]></category>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[DW Conradie]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 14:01:03 GMT</pubDate>
            <atom:updated>2026-06-30T14:01:03.315Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bsk3oN0aUfrkdwEHvMNt4w.png" /></figure><h3>Last Month We Built the Loop. This Month We Know When to Stop.</h3><p>Last month’s pipeline followed a next URL through every page of the Pokémon API, writing each batch to Snowflake as it went. The loop worked beautifully — eight processors, clean fan-out, no special state management required.</p><p>But there’s a problem that loop doesn’t solve.</p><p>What do you do when something needs to happen <em>after all the pages are done</em>? Not during. Not per-page. After. A final transformation, a data quality check, a notification that the extract is complete, a merge of all the staged files. These are the operations that can’t start until the last page has landed; and in a concurrent, event-driven pipeline, “the last page has landed” isn’t an event you get for free.</p><p>This month we fix that. We’ll use the Wait and Notify processors together with a HazelcastMapCacheClient controller service to build a coordination layer that holds downstream processing in place until every upstream signal has arrived.</p><h3>What We’re Building</h3><ul><li>A HazelcastMapCacheClient controller service that gives Wait and Notify shared state to talk through</li><li>A Wait processor that holds a FlowFile at a gate until a target signal count is reached</li><li>A Notify processor that increments that counter each time a page (or file, or batch) finishes processing</li><li>A working example based on a paginated API that tells you upfront how many pages it will return</li><li>Practical configuration for signal identifiers, target counts, and expiration handling</li></ul><h3>The Signal Model: Think of It as a Gate with a Counter</h3><p>The mental model here is worth a few sentences before diving in.</p><p>Wait and Notify communicate through a shared distributed cache — Hazelcast in this case. Wait holds a FlowFile at a checkpoint and keeps checking: <em>has the signal count for my identifier reached the target?</em> Notify gets called once per completed unit of work and says: <em>increment the signal count for this identifier by one.</em></p><p>When the count hits the target, the gate opens. The held FlowFile is released and downstream processing begins.</p><p>The important thing to internalise: the FlowFile that Wait is holding is <strong>not</strong> the data being processed. It&#39;s a separate coordination FlowFile — a trigger that represents &quot;the whole job is done.&quot; Your actual page data flows through a completely independent path. The two paths never need to touch each other directly. They coordinate only through the cache.</p><p>This is the pattern’s real power. The pagination logic and the downstream logic are fully decoupled. One doesn’t know the other exists.</p><h3>Architecture Overview</h3><p>The full coordination pattern fits two parallel tracks connected through Hazelcast:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*znr9tLBqxgTxya5CMLNY6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WgBtMRsM-rE4USZ-lzhG2A.png" /></figure><p>The top track generates one coordination FlowFile that parks at Wait. The bottom track is your existing pagination loop — the only addition is a Notify processor at the end of each page&#39;s processing path. Both tracks reference the same signal identifier via Hazelcast, and Wait releases itself automatically when the counter reaches the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDOhvjD9rfn-AjFOr31q-g.png" /></figure><h3>Prerequisites</h3><p>You’ll need:</p><ol><li><strong>An Openflow instance</strong> — Hazelcast is embedded in the Openflow runtime, so no external Hazelcast setup is required</li><li><strong>An existing or new pagination pipeline</strong> — the Notify processor slots into the end of any per-page processing path</li><li><strong>An API that returns total page count</strong> — or any upfront count of work units. The example here uses a hypothetical API that returns total_pages in the first response</li></ol><p>No additional Snowflake network rules or external access integrations are needed for the Wait/Notify pattern itself — Hazelcast communication is internal.</p><h3>Controller Service: HazelcastMapCacheClient</h3><p>Before placing any processors, the controller service needs to exist and be enabled. This is the shared memory that Wait and Notify communicate through.</p><p>You’ll configure two controller services in sequence: a connection service that points to the Hazelcast instance, and the cache client that Wait and Notify will actually reference.</p><h3>1. HazelcastConnectionService</h3><p><strong>Type:</strong> EmbeddedHazelcastCacheManager</p><p>In Openflow’s managed runtime, Hazelcast runs as part of the same process on port 5701, so this embedded manager is the standard choice. If you&#39;re connecting to an external Hazelcast cluster, use ExternalHazelcastCacheManager instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*qtLbApB1i7HOIPRuhS6CDA.png" /></figure><h3>2. HazelcastMapCacheClient</h3><p><strong>Type:</strong> HazelcastMapCacheClient</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*MzB-o305LJmfIfFI9rCwMA.png" /></figure><p>The Hazelcast Map Name is a namespace for your cache entries — it keeps signal state for this pipeline isolated from any other flows using Hazelcast. Name it something meaningful. Both the Wait and Notify processors must reference <strong>this same controller service instance</strong> — that&#39;s what connects them.</p><p>Enable both controller services before adding processors.</p><h3>The Processors</h3><h3>1. Generate Trigger FlowFile</h3><p><strong>Type:</strong> GenerateFlowFile<br><strong>Scheduling:</strong> 9999 sec</p><p>This creates the single coordination FlowFile that will sit in Wait until all pages are done. One FlowFile, one job. The content is irrelevant — we just need something to hold the signal attributes on.</p><p><strong>Connection:</strong> success → <strong>Set Signal Attributes</strong></p><h3>2. Set Signal Attributes</h3><p><strong>Type:</strong> UpdateAttribute</p><p>This is where we stamp the coordination FlowFile with everything Wait needs to do its job: what signal to listen for, and how many notifications to expect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*LyG5pO_yXh7K2aEXlSQG5A.png" /></figure><p>signal.identifier is the key that links Wait and Notify through Hazelcast. It needs to be unique per execution if you&#39;re running the pipeline on a schedule — including a timestamp prevents a signal from a previous run from accidentally releasing a future one. In a real pipeline, you&#39;d set target.signal.count dynamically from the first API response (the value that tells you how many pages exist), using UpdateAttribute or EvaluateJsonPath after the initial call.</p><p><strong>Connection:</strong> success → <strong>Wait</strong></p><h3>3. Wait</h3><p><strong>Type:</strong> Wait</p><p>The gate. This processor parks the trigger FlowFile and checks Hazelcast on every scheduling cycle. When the signal count for signal.identifier reaches target.signal.count, the FlowFile exits through success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*qegvCyvxgqOFLQ4nTwRl0g.png" /></figure><p>A few settings worth calling out:</p><p>Expiration Duration sets a timeout on the waiting FlowFile. If the signal count never reaches the target — because a page failed silently, or the pipeline was stopped mid-run — the FlowFile will eventually exit through expired rather than hanging forever. Route expired to a LogAttribute or an alert processor so you know it happened.</p><p>Wait Penalty Duration controls how long Wait backs off between checks. 30 seconds is a reasonable default. You don&#39;t want it polling Hazelcast at full scheduler speed.</p><p>Do not auto-terminate wait if you expect re-check behavior. The simplest setup is to route wait back to Wait as a self-loop so the same FlowFile keeps waiting and checking again. Route expired to your error handling and success downstream.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*PeWMG_WGfIsD26XvrrMYHg.png" /></figure><p><strong>Connection:</strong> success → <strong>Downstream Logic</strong> (your final transformation, notification, or load)</p><h3>4. Notify</h3><p><strong>Type:</strong> Notify</p><p>Drop this at the end of your per-page processing path — after the data has been written to Snowflake, after validation, wherever “done with this page” means. Each time a FlowFile passes through, it increments the signal counter in Hazelcast by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*e9GrHywSeS8Jf85H40W5HQ.png" /></figure><p>signal.identifier must match exactly what you set in the coordination track. Since both tracks originate from the same trigger FlowFile (or share the same attribute via expression language), this is straightforward — just make sure whatever expression you use here resolves to the same value as it does in Wait.</p><p>Signal Counter Delta controls how much the counter increments per FlowFile (default: 1). Leave it at 1 for standard one-signal-per-page counting.</p><p>Signal Buffer Count is a separate batching and performance property: it controls how many FlowFiles are buffered before signals flush to the cache. It does not change the increment value and can usually be left at its default.</p><p>Auto-terminate success and failure (or route failure to logging).</p><h3>How the Signal Flows End-to-End</h3><p>Pull it all together. When the pipeline runs:</p><ol><li>Generate Trigger FlowFile creates one FlowFile with signal.identifier = api_extract_202606041400 and target.signal.count = 10</li><li>That FlowFile parks at Wait, which registers interest in the signal api_extract_202606041400 with a target of 10</li><li>The pagination loop fetches pages in parallel. Each page completes and hits Notify</li><li>Hazelcast increments the counter: 1, 2, 3... 10</li><li>On the Wait processor&#39;s next scheduling tick after the counter hits 10, the FlowFile is released through success</li><li>Downstream logic runs — exactly once, exactly after all pages are done</li></ol><p>The count in Hazelcast looks like this as pages complete:</p><pre>Page 1 processed → counter = 1<br>Page 2 processed → counter = 2<br>Page 3 processed → counter = 3<br>...<br>Page 10 processed → counter = 10  ← Wait releases</pre><h3>Making the Target Count Dynamic</h3><p>The example above hardcodes target.signal.count = 10, which only works if you already know you&#39;ll get exactly ten pages. In practice, you want to set this dynamically from the first API response.</p><p>A typical approach:</p><ol><li>The first page response contains &quot;total_pages&quot;: 10</li><li>An EvaluateJsonPath processor extracts that value: $.total_pages → total_pages attribute</li><li>An UpdateAttribute copies it onto the coordination FlowFile: target.signal.count = ${total_pages}</li></ol><p>You’d need to route the total_pages attribute from the pagination track back to the coordination FlowFile — one way to do this cleanly is to generate the coordination FlowFile from the first page response rather than from a separate trigger, using ExtractText or EvaluateJsonPath before the fan-out into Wait.</p><h3>Limitations and Caveats</h3><ul><li><strong>Signal count must be exact.</strong> If target.signal.count is set to 10 but only 9 Notify signals arrive — because one page failed before reaching Notify — the FlowFile will sit in Wait until it expires. Route expired to alerting and make sure your per-page error handling is solid.</li><li><strong>Signal identifiers must be unique per execution.</strong> If two pipeline runs share the same signal.identifier, their signals will interfere with each other. Always include a timestamp, job ID, or execution token in the identifier.</li><li><strong>Hazelcast map entries persist between runs.</strong> A signal that reaches its target but isn’t consumed will stay in the Hazelcast map. Clean up stale entries by configuring a TTL on the Hazelcast map, or by adding a DeleteDistributedMapCacheEntry step after Wait releases.</li><li><strong>This pattern assumes you know the count upfront.</strong> If the total number of work units isn’t known until processing completes, the pattern needs a different approach — a two-phase design where one track counts completions and another track compares against a dynamically determined total.</li></ul><h3>Wrapping Up</h3><p>The Wait and Notify pattern fills a real gap in event-driven pipeline design: it gives you a clean, explicit synchronization point without coupling your processing logic together. The pagination loop doesn&#39;t need to know downstream logic exists. The downstream logic doesn&#39;t need to watch the queue. Hazelcast holds the count, and Wait does the watching.</p><p>Once you’ve got this wired up, the same pattern works for anything that needs a fan-in: multi-file ingestion, parallel API calls across multiple stores, batch job monitoring. The processors are the same — only the signal attributes change.</p><p><em>This is part of an ongoing series on building data pipelines with Snowflake Openflow.</em></p><h3>Next Steps</h3><ul><li>Learn more on <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/about">docs.snowflake.com</a></li><li>Sign up for a <a href="https://bit.ly/SnowflakeTrial">Snowflake Trial</a></li></ul><p>If you found this useful, follow me on <a href="https://www.linkedin.com/in/de-wet-conradie-21b02b42/">LinkedIn </a>for more Data Engineering and Snowflake AI Data Cloud use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=669773af1b15" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snowflake/knowing-when-youre-done-coordinating-async-flows-with-wait-notify-669773af1b15">Knowing When You’re Done: Coordinating Async Flows with Wait &amp; Notify</a> was originally published in <a href="https://medium.com/snowflake">Snowflake Builders Blog: Data Engineers, App Developers, AI, &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Pagination with Openflow]]></title>
            <link>https://medium.com/snowflake/practical-pagination-with-openflow-03f157bbf276?source=rss-4ecd8d2aabaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/03f157bbf276</guid>
            <category><![CDATA[snowflake-openflow]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[DW Conradie]]></dc:creator>
            <pubDate>Wed, 27 May 2026 19:01:00 GMT</pubDate>
            <atom:updated>2026-05-27T19:01:00.658Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KClTQsDuwRRlpYhx6vxZA.png" /></figure><p>Last month I wrote about how Shopify’s move to GraphQL pushed us toward a better pattern — submit a bulk export job, let Shopify do the heavy lifting, come back when it’s ready. No pagination required.</p><p>But here’s the thing: that approach is overkill for most APIs.</p><p>Not every API offers a bulk export endpoint. Not every dataset is millions of rows deep. Sometimes you’ve got a well-behaved REST API that hands you a next URL in every response, and the simplest thing you can do is just... follow it.</p><p>That’s what we’re doing this month. We’ll use the <a href="https://pokeapi.co/">Pokémon API</a> as our example; it’s free, it’s public, and it paginates in a way that’s representative of hundreds of real-world APIs. By the end, we’ll have every Pokémon sitting in Snowflake, and the pipeline that got them there will fit on a single canvas.</p><h3>Why the Pokémon API?</h3><p>The Pokémon API (https://pokeapi.co/api/v2/pokemon) is dead simple. Hit the endpoint, and you get back something like this:</p><pre>{<br>  &quot;count&quot;: 1302,<br>  &quot;next&quot;: &quot;https://pokeapi.co/api/v2/pokemon?offset=25&amp;limit=25&quot;,<br>  &quot;previous&quot;: null,<br>  &quot;results&quot;: [<br>    { &quot;name&quot;: &quot;bulbasaur&quot;, &quot;url&quot;: &quot;https://pokeapi.co/api/v2/pokemon/1/&quot; },<br>    { &quot;name&quot;: &quot;ivysaur&quot;, &quot;url&quot;: &quot;https://pokeapi.co/api/v2/pokemon/2/&quot; },<br>    ...<br>  ]<br>}</pre><p>See that next field? It&#39;s either a fully-formed URL pointing to the next page, or null when you&#39;ve hit the end. That&#39;s the only signal we need to build a complete pagination loop. No cursors to decode, no page tokens to track.</p><h3>What You’ll Need Before Starting</h3><p>A few things to have in place before you build:</p><ol><li><strong>An Openflow instance</strong></li><li><strong>A Snowflake account</strong> with a database and schema ready to receive data. This example uses DATALAB_SANDBOX.PUBLIC. You&#39;ll also want the target table created up front:</li></ol><pre>CREATE TABLE IF NOT EXISTS DATALAB_SANDBOX.PUBLIC.POKEMON_RAW (     <br>name   VARCHAR<br>,url    VARCHAR );</pre><p><strong>3. Network access</strong> in the form of a network rule and external access integration so the runtime can reach the API:</p><pre>CREATE NETWORK RULE IF NOT EXISTS POKEAPI_RULE     <br>  TYPE = HOST_PORT     <br>  MODE = EGRESS     <br>  VALUE_LIST = (&#39;pokeapi.co:443&#39;);  </pre><pre>CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION POKEAPI_EAI     <br>ALLOWED_NETWORK_RULES = (POKEAPI_RULE)     <br>ENABLED = TRUE;  </pre><pre>GRANT USAGE ON INTEGRATION POKEAPI_EAI TO ROLE OPENFLOW_RUNTIME_ROLE;</pre><p>The Pokémon API is completely open so there is no need to configure API keys and OAuth secrets to manage, I will be covering that in a future blog post.</p><h3>The Architecture at a Glance</h3><p>The whole pipeline consists of eight processors and two controller services. Here’s how data moves through it:</p><pre>Generate Initial URL <br>         │<br>         │ success<br>         ▼<br>  Fetch Pokemon Page   ◄──────────────────────────────────────┐<br>  InvokeHTTP                                                  │<br>         │                                                    │<br>         │ Response                                           │<br>         ▼                                                    │<br>  Extract Next URL                                            │<br>  EvaluateJsonPath                                            │<br>         │                                              Set Next URL<br>         │ matched (fan-out)                            UpdateAttribute<br>         ├─────────────────────────────────────────────►      ▲<br>         │                                                    │ has_next<br>         ▼                                                    │<br>  Split Pokemon Array          Check Has Next Page  ──────────┘<br>  SplitJson                    RouteOnAttribute<br>         │<br>         │ split<br>         ▼<br>  Write to Snowflake<br>  PutSnowpipeStreaming<br>         │<br>         │ failure<br>         ▼<br>  LogAttribute</pre><p>The important bit is the <strong>fan-out after </strong><strong>Extract Next URL</strong>. The same flow file gets cloned and sent down two paths at once: one side writes the current page to Snowflake, while the other checks whether there&#39;s another page and loops back to fetch it. Writing and paginating happen in parallel, you&#39;re never waiting for one to finish before the other starts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e27bTNyFFdvv8NKI9Fa8fg.png" /></figure><h3>Controller Services</h3><p>Before we get into the processors themselves, let’s set up the two controller services that the pipeline depends on.</p><h4>1. Pokemon Snowflake Connection</h4><p><strong>Type:</strong> SnowflakeConnectionService</p><p>This manages your connection pool to Snowflake. Set it up once, and every processor that needs Snowflake will share the same pool. No duplicated connection configs scattered everywhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*cPBSZ_PK17drALEV0wyDig.png" /></figure><h4>2. Pokemon JSON Reader</h4><p><strong>Type:</strong> JsonTreeReader</p><p>The Write to Snowflake processor needs a reader to interpret each Pokémon record. Since we&#39;re dealing with a consistent two-field JSON object (name and url), schema inference handles it without any manual schema definition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*-RoxNf0F-4Kkd66kzPxMaQ.png" /></figure><h3>The Processors, Step by Step</h3><h4>1. Generate Initial URL</h4><p><strong>Type:</strong> GenerateFlowFile<br><strong>Scheduling</strong></p><p>For the purpose of this article the process is started via a GenerateFlowfile to create the initial URL, this can also be triggered by an upstream process, like retrieving the last processed date or page from a control table in your database or be configured to run on a CRON schedule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*VG1t0NW7HpBZy7obzqBMLw.png" /></figure><p>The content doesn’t matter here — it’s just a trigger. The actual first URL gets handled downstream via the replaceNull expression language function.</p><p><strong>Connection:</strong> success → <strong>Fetch Pokemon Page</strong></p><h4>2. Fetch Pokemon Page</h4><p><strong>Type:</strong> InvokeHTTP</p><p>This is where we actually talk to the API. The URL comes from a flow file attribute, with a clever fallback for the first request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*rlaCjRzwb7wrC_1fEsRXGQ.png" /></figure><p>HTTP URL${pokemon.url:replaceNull(&#39;https://pokeapi.co/api/v2/pokemon?limit=25&amp;offset=0&#39;)}</p><p>Here’s what makes this work: on the first pass, pokemon.url doesn&#39;t exist yet, so replaceNull kicks in and substitutes the hard-coded first-page URL. On every subsequent pass, pokemon.url already contains the next page&#39;s URL (set by an upstream processor), so it just uses that. One property, two behaviours — no if logic needed.</p><p>Auto-terminate Failure, No Retry, Original, and Retry unless you want to add explicit retry handling.</p><p><strong>Connection:</strong> Response → <strong>Extract Next URL</strong></p><h4>3. Extract Next URL</h4><p><strong>Type:</strong> EvaluateJsonPath</p><p>Now we’ve got the API response as our flow file content. This processor reaches into the JSON and pulls out the next field, stashing it as a flow file attribute for later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*2V7QrLpXvEfchoVpIiJs5g.png" /></figure><p>The next dynamic property tells the processor to evaluate the JSONPath $.next and store the result as an attribute called next. The Null Value Representation: empty string setting is important: when the API returns &quot;next&quot;: null on the last page, we want the attribute to be empty rather than the literal string &quot;null&quot;. That distinction matters for how we check it downstream.</p><p>Auto-terminate failure and unmatched.</p><p><strong>Connections:</strong></p><ul><li>matched → <strong>Split Pokemon Array</strong></li><li>matched → <strong>Check Has Next Page</strong></li></ul><p>Yes, both connections come off the same matched relationship. Openflow clones the flow file and sends a copy down each path. This is the fan-out I mentioned earlier.</p><h4>4. Split Pokemon Array</h4><p><strong>Type:</strong> SplitJson</p><p>The API wraps its results in an array under the results key. This processor explodes that array, each Pokémon becomes its own flow file, ready to be written as an individual record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*-NsjePghyLZ2vp2xbw_gKw.png" /></figure><p>Auto-terminate failure and original.</p><p><strong>Connection:</strong> split → <strong>Write to Snowflake</strong></p><h4>5. Check Has Next Page</h4><p><strong>Type:</strong> RouteOnAttribute</p><p>This is the decision point: do we keep paginating, or are we done? It uses a dynamic property with an expression that checks whether the next attribute actually contains a usable URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*xOWRz4nliG5bTr1pClJ8YA.png" /></figure><p>In plain English: “route to has_next if the attribute is not empty AND not the literal string &#39;null&#39;.&quot;</p><p>The first check handles the normal end-of-pagination case (API returns null, which becomes an empty string). The second is a belt-and-suspenders guard for edge cases. If neither condition is met, the flow file hits unmatched, which is auto-terminated. The loop just stops — no special &quot;end&quot; logic needed.</p><p><strong>Connection:</strong> has_next → <strong>Set Next URL</strong></p><h4>6. Set Next URL</h4><p><strong>Type:</strong> UpdateAttribute</p><p>Straightforward plumbing. Takes the next attribute we extracted earlier and copies it into pokemon.url.This is exactly what Fetch Pokemon Page is expecting on the next loop iteration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*NJ3Aq2iumElgCBQpF1zbCQ.png" /></figure><p><strong>Connection:</strong> success → <strong>Fetch Pokemon Page</strong></p><p>And that closes the loop. The flow file re-enters Fetch Pokemon Page with a fresh URL, and the whole cycle repeats until we run out of pages.</p><h4>7. Write to Snowflake</h4><p><strong>Type:</strong> PutSnowpipeStreaming</p><p>Each individual Pokémon record (produced by Split Pokemon Array) gets written to Snowflake via Snowpipe Streaming. Low latency, no staging files, no COPY INTO commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*lJYZwRObmVAEPaOq3RMrtg.png" /></figure><p>Auto-terminate success.</p><p><strong>Connection:</strong> failure → <strong>LogAttribute</strong></p><h4>8. LogAttribute</h4><p><strong>Type:</strong> LogAttribute</p><p>A safety net. Any flow file that fails to write to Snowflake ends up here, where all its attributes get logged so you can figure out what went wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*Fr2aAgV5itkeL3XW-vOrKA.png" /></figure><p>PropertyValueLog LevelinfoAttributes to Log Regular Expression.*Log Payloadfalse</p><p>Auto-terminate success.</p><h3>How the Loop Actually Works</h3><p>If you step back and look at what’s happening, the whole pagination mechanism fits in a single sentence:</p><blockquote><em>A flow file carries the next URL as an attribute, fetches that page, extracts the new next URL, checks if it’s real, updates the attribute, and sends itself back to the fetch step.</em></blockquote><p>That’s it. The flow file <em>is</em> the cursor. It doesn’t need a database table to track offsets, no shared state between processors, no external counter. Everything it needs to navigate the API lives on the flow file itself.</p><p>And because of the fan-out from Extract Next URL, you&#39;re never blocked: while one copy of the flow file is being split and written to Snowflake, the other has already checked for the next page and looped back to Fetch Pokemon Page. The pipeline moves through pages as fast as the API will serve them.</p><h3>Wrapping Up</h3><p>Last month’s Shopify pipeline was about stepping back and letting the API do the work. This one is the opposite — the API is simple, the pagination is predictable, and the right move is to just follow the next link until it runs out.</p><p>Eight processors. Two controller services. No external state. No authentication. No overthinking.</p><p>Sometimes the pipeline that looks too simple is exactly the right one.</p><h3>Next Steps</h3><ul><li>Learn more on <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/about">docs.snowflake.com</a></li><li>Sign up for a <a href="https://bit.ly/SnowflakeTrial">Snowflake Trial</a></li></ul><p>If you found this useful, follow me on <a href="https://www.linkedin.com/in/de-wet-conradie-21b02b42/">LinkedIn </a>for more Data Engineering and Snowflake AI Data Cloud use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03f157bbf276" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snowflake/practical-pagination-with-openflow-03f157bbf276">Practical Pagination with Openflow</a> was originally published in <a href="https://medium.com/snowflake">Snowflake Builders Blog: Data Engineers, App Developers, AI, &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating Your Shopify Data Pipeline from REST to GraphQL with Openflow and Snowflake]]></title>
            <link>https://medium.com/snowflake/migrating-your-shopify-data-pipeline-from-rest-to-graphql-with-openflow-and-snowflake-9746372d6629?source=rss-4ecd8d2aabaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/9746372d6629</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[shopify]]></category>
            <dc:creator><![CDATA[DW Conradie]]></dc:creator>
            <pubDate>Wed, 29 Apr 2026 14:01:07 GMT</pubDate>
            <atom:updated>2026-04-29T14:01:07.369Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v1-8pO9dndzINFCzFLNOCQ.png" /></figure><h3>When “Simple” Stops Scaling</h3><p>Building data pipelines using Apache Nifi / Openflow to land Shopify data has historically been pretty straightforward. The GetShopify processor handles most of the heavy lifting. It is as simple as configuring your Shopify credentials in Openflow, creating the appropriate network rules and external access Integration. Once done it was simply a matter of dragging a GetShopify Processor on to the Canvas, selecting the appropriate endpoint, and choosing a destination of your choice. Shopify has however deprecated the admin REST API in favour of Graph QL, and whilst these processors will still work for the foreseeable future, they will undoubtedly be decommissioned entirely at some point.</p><p>At first glance, this might feel like a major inconvenience, however I do feel that it challenges some of our notions on how we build data pipelines that pull data from API’s. Backfilling a meaningful volume of data from an API is rarely straightforward — it typically becomes a slow, methodical process of paginating through results, staying within rate limits, handling errors, and navigating a range of other practical challenges.</p><p>It may even be a case requesting some kind of manual assistance to land the historical data in a structured or semi structured format.</p><p>I believe that the migration to GraphQL has challenged me to rethink the process, instead of pulling data one request at a time,rather let Shopify handle the processing and notify the ELT when the data is ready to fetch.</p><h3>What we are building:</h3><p>Rather than simply swapping API’s we will have to redesign our pipeline: Use Shopify’s GraphQL bulk API to extract large datasets efficiently handle the asynchronous flow (start -&gt; wait -&gt; retrieve), and load raw data into Snowflake for scalable downstream processing</p><h3>A Small But Important Mindset Shift</h3><p>You’re no longer pulling data. You’re orchestrating a data export. That has a few knock-on effects:</p><ul><li>You kick things off, but don’t get results immediately</li><li>You need to track progress (job IDs, statuses)</li><li>You need to design for waiting, retrying, and branching</li></ul><h3>What The Architecture Looks Like</h3><p>At a glance the flow is pretty clean: Openflow -&gt; Shopify GraphQL API -&gt; Bulk Operation -&gt; JSONL Export -&gt; Snowflake Stage -&gt; Stream -&gt;Task -&gt;Tables</p><p>There are two main ideas to consider</p><ol><li>Shopify does the heavy lifting</li><li>Instead of sending thousands, or even hundreds of thousands of requests to the API, we ask it to prepare a dataset for us</li><li>Snowflake does the data processing once OpenFlow lands the data, Snowflake does the transformation</li></ol><h3>Flow Files Are State Machines</h3><p>In this setup, Flow files are used to carry progress: The journey of a single flow file looks something like this</p><ol><li>Starts as a Graph QL query</li><li>Becomes an API response with a job Id</li><li>Tracks the the status as we poll</li><li>Retrieves the download URL</li><li>Finally contains the dataset</li></ol><p>What this means, is that you can build a single pipeline that can be run for multiple stores, concurrently. Each flow file is independent and contains everything it needs to perform its required tasks.</p><h3>Parameter Contexts Keep Things Clean</h3><p>Parameter Contexts let you separate configuration from logic.</p><p>So things like:</p><ul><li>Shopify endpoints</li><li>Access tokens</li><li>Snowflake details</li></ul><p>…live outside the pipeline itself. Which means you can move the same pipeline between environments e.g dev, test, production.</p><h3>Controller Services Reduce Complexity</h3><p>Things like the DBCPConnectionPool aren’t just technical plumbing,they simplify how everything connects. Instead of configuring Snowflake access in multiple places, you define it once and reuse it. Cleaner, more consistent, and easier to maintain.</p><h3>How the Pipeline Flows:</h3><p>First, some prerequisites:</p><ol><li>A Snowflake account with a database and schema set up, and the necessary permissions to create stages, streams, and tasks, network rules and external access integrations for Shopify and Google Cloud Storage.</li><li>A Shopify store with API access and the necessary permissions</li><li>Openflow installed and configured with access to both Snowflake and Shopify</li><li>Network rules and external access integrations set up in Snowflake for both Shopify and Google Cloud Storage (where Shopify will export the data)</li><li>You do not need to have separate external access integrations for Shopify and Google Cloud Storage, you can use the same one if you prefer, just make sure to include network rules for both in the integration.</li></ol><pre>-- Create a network rule for your Shopify store<br>CREATE NETWORK RULE IF NOT EXISTS SHOPIFY_RULE<br>    TYPE = HOST_PORT<br>    MODE = EGRESS<br>    VALUE_LIST = (&#39;my-store.myshopify.com:443&#39;);<br>-- Create network rule for Google Storage domains<br>CREATE OR REPLACE NETWORK RULE SHOPIFY_BULK_EXTRACT_RULE<br>    MODE = EGRESS<br>    TYPE = HOST_PORT<br>    VALUE_LIST = (&#39;storage.googleapis.com:443&#39;, &#39;*.storage.googleapis.com:443&#39;);<br>-- External access integration for Shopify<br>CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION SHOPIFY_EAI<br>    ALLOWED_NETWORK_RULES = (SHOPIFY_RULE)<br>    ENABLED = TRUE;<br>-- Create external access integration for Google Cloud Storage<br>CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION SHOPIFY_BULK_EXTRACT_EAI<br>    ALLOWED_NETWORK_RULES = (SHOPIFY_BULK_EXTRACT_RULE)<br>    ENABLED = TRUE;<br>GRANT USAGE ON INTEGRATION SHOPIFY_EAI TO ROLE OPENFLOW_RUNTIME_ROLE;<br>GRANT USAGE ON INTEGRATION SHOPIFY_BULK_EXTRACT_EAI TO ROLE OPENFLOW_RUNTIME_ROLE</pre><h3>Limitations and Caveats</h3><p>While the Bulk Operations API is powerful, it’s important to be aware of its limitations:</p><ul><li><strong>It’s Not Real-Time</strong>: Bulk operations are asynchronous. You submit a job, and it can take anywhere from a few seconds to several hours to complete, depending on the amount of data. Your pipeline must be designed to handle this waiting period.</li><li><strong>Rate Limits</strong>: Shopify limits the number of concurrent bulk operations that can be run at one time. If you have many different data exports running simultaneously, you may encounter throttling.</li><li><strong>Query Complexity</strong>: There are limits to the complexity of the GraphQL query you can submit. Very complex queries with many nested levels may be rejected.</li><li><strong>Data Availability</strong>: Not all data fields are available through the Bulk API. You’ll need to consult the Shopify developer documentation to ensure the fields you need are supported.</li><li><strong>Fixed Output Format</strong>: The data is always exported in JSONL format. While this is a convenient format for many data warehousing solutions, it’s not configurable.</li></ul><h3>Step 1: Configure Openflow</h3><p>Set up your parameter contexts with the necessary configuration for both Shopify and Snowflake. This includes API endpoints, access tokens, database connection details, and any other relevant settings.</p><h3>Step 2: Build the Pipeline</h3><p>The pipeline will consist of the following stages:</p><ol><li>The process is initiated by a flowfile entering an <strong>Input Port</strong>. This flowfile is bound to a specific store and dataset, allowing the same pipeline to run for multiple stores concurrently using parameter contexts.</li><li>A <strong>ReplaceText</strong> processor constructs the GraphQL mutation that will be sent to Shopify. It uses a template for the mutation and replaces a placeholder with a flowfile attribute (e.g., shopify.query) to create the final query. This makes the query dynamic. For example:</li></ol><pre>mutation {<br>  bulkOperationRunQuery(<br>    query: &quot;&quot;&quot;<br>    {<br>      ${shopify.query}<br>    }<br>    &quot;&quot;&quot;<br>  ) {<br>    bulkOperation {<br>      id<br>      status<br>    }<br>    userErrors {<br>      field<br>      message<br>    }<br>  }<br>}</pre><p>3. An <strong>InvokeHTTP</strong> processor sends the GraphQL mutation to Shopify to initiate the bulk export. The response contains a job ID that we’ll use to track the export’s progress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vk6q848b7_krjl_S4lTqWw.png" /></figure><p>4. A <strong>RouteOnAttribute</strong> and a <strong>ControlRate</strong> processor are used to poll the Shopify API for the status of the export job. This loop continues until the job is complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yvwlrg-b_BAt50xhe_Zphg.png" /></figure><p>5. Once the export is finished, another <strong>InvokeHTTP</strong> processor retrieves the download URL for the exported dataset.</p><p>6. A <strong>InvokeHTTP</strong> processor downloads the dataset from the provided URL. Shopify exports this data in JSONL format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*lqYvarYBRsatcdNGJlM_yQ.png" /></figure><p>7. A <strong>PutSnowflakeInternalStageFile</strong> processor loads the JSONL file directly into a Snowflake stage.</p><p>8. An <strong>ExecuteSQLStatement</strong> processor calls a stored procedure in Snowflake to process the raw data from the stage. This kicks off the downstream transformations and loading into final tables. you can also choose to use Snowflake Streams and Tasks to automate this part, rather than calling a stored procedure directly from Openflow.</p><p>9. Throughout the flow, <strong>LogAttribute</strong> processors can be used to log important information such as job IDs, statuses, and any errors that may occur.</p><h3>Wrapping Up</h3><p>It’s easy to see the move away from REST as a disruption.</p><p>But it’s really an opportunity.</p><p>If you lean into GraphQL’s bulk model, and combine it with Openflow and Snowflake in the right way, you don’t just adapt — you improve the entire data pipeline.</p><p>You end up with something that’s scalable, efficient, and maintainable</p><p>And ready for whatever comes next.</p><h3>Next Steps</h3><ul><li>Learn more on <a href="https://docs.snowflake.com/en/user-guide/data-integration/openflow/about">docs.snowflake.com</a></li><li>Sign up for a <a href="https://bit.ly/SnowflakeTrial">Snowflake Trial</a></li></ul><p>If you found this useful, follow me on <a href="https://www.linkedin.com/in/de-wet-conradie-21b02b42/">LinkedIn </a>for more Data Engineering and Snowflake AI Data Cloud use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9746372d6629" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snowflake/migrating-your-shopify-data-pipeline-from-rest-to-graphql-with-openflow-and-snowflake-9746372d6629">Migrating Your Shopify Data Pipeline from REST to GraphQL with Openflow and Snowflake</a> was originally published in <a href="https://medium.com/snowflake">Snowflake Builders Blog: Data Engineers, App Developers, AI, &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>