Skip to end of banner
Go to start of banner

Use Case: Moving Data Using Snowflake Snap Pack

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

In this article

Transfer Data From PostgreSQL to Snowflake

Overview

Transferring data from PostgreSQL to Snowflake is a multi-step process. The process involves multiple steps, from setting up the Snowflake environment to loading data into Snowflake. Apart from the sequential approach, you must ensure that you leverage the right tools and platforms, as details can vary based on versions and configurations.

Problem

In a real business case scenario, transferring data from PostgreSQL to Snowflake is manual. This data transfer is time-consuming if the data volume is high, and there is always the chance of a human error, which could impact customer relations.

The following aspects come into play when you manually move the data between the two databases:

  • Ensure the datatypes are mapped correctly between PostgreSQL and Snowflake.

  • Manage the transformations or adjustments needed for schema differences.

  • Monitor and optimize performance, especially when you are dealing with large datasets.

  • Schedule the transfer based at regular intervals or on a need-case basis.

Solution

Using the Snowflake Snap Pack, you can automate the process of transferring the data from PostgreSQL to Snowflake. This pipeline below covers almost every challenge mentioned above that you might encounter when transferring the data manually.

Download this solution

Understanding the Solution

In the initial phase, the pipeline truncates any pre-existing table in the Snowflake environment to prevent the creation of multiple tables. Subsequently, a specific table is chosen from the PostgreSQL database for data transfer, and this information is stored in distinct variables through the utilization of the Mapper Snap. The data is then deposited into a newly created table in the Snowflake environment. To ensure the accuracy of the data transfer, the transferred data is retrieved from the Snowflake table for validation.

Steps

Step 1: Configure the Snowflake-Execute Snap with the truncate query to delete the Snowflake table if exists.

Step 2: Configure the PostgreSQL-Select Snap with the required table from where you want to transfer data.

Step 3: Configure the fields in the Mapper Snap as follows. On validation, the Mapper displays all the data that must be transferred.

Step 4: Insert the data extracted from PostgreSQL in the table created in Snowflake.

Step 5: Verify if the values have been successfully transferred using the Snowflake-Select Snap. On validation, the Snowflake-Execute Snaps displays all the data that has been transferred.

Downloads

  File Modified
You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.
No files shared here yet.
  • Drag and drop to upload or browse for files
    • No labels