<?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 Kelson Vincien on Medium]]></title>
        <description><![CDATA[Stories by Kelson Vincien on Medium]]></description>
        <link>https://medium.com/@kelson.vincien?source=rss-389f3395e89f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9RG9Uuh5db0cQAEG</url>
            <title>Stories by Kelson Vincien on Medium</title>
            <link>https://medium.com/@kelson.vincien?source=rss-389f3395e89f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:50:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kelson.vincien/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[Moving Data from SQL Server to Postgres with NiFi]]></title>
            <link>https://medium.com/@kelson.vincien/moving-data-from-sql-server-to-postgres-with-nifi-c5357cf7cba8?source=rss-389f3395e89f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5357cf7cba8</guid>
            <category><![CDATA[data-engineer]]></category>
            <category><![CDATA[apache-nifi]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Kelson Vincien]]></dc:creator>
            <pubDate>Mon, 26 Jan 2026 15:05:19 GMT</pubDate>
            <atom:updated>2026-01-26T15:15:17.235Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Learn how to build a containerized ETL pipeline using Apache NiFi to move data from SQL Server to PostgreSQL, featuring fixes for JDBC driver setup and timestamp type mismatches.</blockquote><p>I recently set up a pipeline to move sales records from SQL Server to PostgreSQL using NiFi and Docker.</p><p>It’s a standard task, but there are a few manual steps and annoying errors that I had to fix. Here is exactly how I did it.</p><h3>Why move the data?</h3><p>Basically, you don’t want to run heavy analytics on your main SQL Server while people are trying to use it. Moving the data to a separate Postgres database keeps things fast for everyone.</p><h3>The Setup</h3><p>I ran everything in Docker so I didn’t have to install stuff on my actual computer:</p><ul><li>SQL Server: Where the data starts.</li><li>Postgres: Where the data ends up.</li><li>NiFi: The tool that moves the data.</li></ul><h3>Step 1: Getting the Drivers Ready</h3><p>NiFi is a Java app and doesn’t know how to talk to these databases by default. You have to manually give it the JDBC driver files (the .jar files).</p><p>Download the drivers here:</p><ul><li>SQL Server: <a href="https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server">https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server</a></li><li>Postgres: <a href="https://jdbc.postgresql.org/download/">https://jdbc.postgresql.org/download/</a></li></ul><p>Since everything is in Docker, I used these commands to “push” the drivers into the NiFi container:</p><pre>docker cp C:\drivers\mssql-jdbc-13.2.1.jre11.jar nifi-orchestrator:/opt/nifi/nifi-current/lib/ <br>docker cp C:\drivers\postgresql-42.7.9.jar nifi-orchestrator:/opt/nifi/nifi-current/lib/</pre><p>Note: You have to restart the NiFi container after this or it won’t see the drivers.</p><h3>Step 2: Setting up the NiFi Flow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*S5HtF1wzusGIOsfm.png" /></figure><p>I used three main boxes (processors) to get this done:</p><ul><li>GenerateTableFetch: This checks SQL Server for new rows. I set the Maximum-value Column to id. This is important because it tells NiFi: “Only grab rows with an ID higher than the last one we moved.” No duplicates.</li><li>ExecuteSQL: This actually pulls the data.</li><li>PutDatabaseRecord: This sends the data into the Postgres table (stg_sales).</li></ul><h3>Step 3: Fixing the Timestamp Error</h3><p>This was the only real problem I hit. Postgres is very picky about dates. By default, NiFi sends dates as plain text, which makes Postgres crash with a character varying error.</p><p>The Fix: Go to the ExecuteSQL properties and set Use Avro Logical Types to true. This makes sure the date stays a “date” so Postgres accepts it.</p><h3>Step 4: How to Reset for Testing</h3><p>If you want to test the flow again with the same data, NiFi won’t move it because it “remembers” the last ID.</p><ul><li>Stop the processor.</li><li>Right-click → View State.</li><li>Click Clear State.</li></ul><p>Also, don’t leave the Run Schedule at 0 sec. Set it to 10 sec so it doesn’t max out your CPU.</p><h3>Conclusion</h3><p>Once everything was green, I checked DBeaver and the data was all there. It’s a simple setup once you get the drivers and the timestamp setting right.</p><p><em>Originally published at </em><a href="https://dev.to/kelson_v_f7c45489ea4931ea/moving-data-from-sql-server-to-postgres-with-nifi-1oid"><em>http://dev.to</em></a><em> on January 26, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5357cf7cba8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>