SSIS tutorial: How to connect MariaDB to PostgreSQL

Introduction

PostgreSql DestinationIn our previous post, we explored how to read and write PostgreSQL data using the ZappySys PostgreSQL Source and Destination connectors for SSIS. In this article, you will learn how to connect MariaDB to PostgreSQL using ZappySys SSIS PowerPack and transfer data between both systems.

We will demonstrate a practical ETL pattern using ZappySys ODBC/JDBC connectivity to extract data from MariaDB and load it into PostgreSQL within SSIS.

Prerequisites

Before you begin, make sure you have the following:

  • First, you will need to have SSIS installed
  • Secondly, make sure to have SSDT
  • Thirdly, access credentials for both MariaDB and PostgreSQL
  • Finally, do not forget to install ZappySys SSIS PowerPack and ZappySys ODBC PowerPack

Steps

Configure MariaDB Connection Using ODBC (JDBC Bridge)

Since MariaDB connectivity is handled via JDBC, we will use the ZappySys JDBC Bridge Driver to expose it as an ODBC data source.

  1. Visit the official MariaDB website.
  2. Download the latest MariaDB JDBC driver.
  3. Save the .jar file locally, for example: D:\Zappysys\drivers\mariadb-java-client-3.5.7.jar
  4. Download and install ZappySys ODBC PowerPack if not already installed.
  5. Open ODBC Data Sources (64-bit).

    Open ODBC Data Sources

  6. Create a User data source (User DSN) based on ZappySys JDBC Bridge Driver:

    Create a User data source

  7. Configure the JDBC Connection. Fill in the connection details
    • Connection String  jdbc:mariadb://{host-name}:{port}/{database-name}
    • JDBC Driver File D:\Zappysys\drivers\mariadb-java-client-3.5.7.jar
    • Username root
    • Password ********
    • Connection Parameters[]
  8. Click Test Connection. If configured correctly, you should see a success message.

    Zappysys JDBC – MariaDB

  9. You can also use the Preview tab to select the table and execute SQL queries. For advanced SQL examples, refer to the JDBC Bridge documentation.

    Zappysys JDBC – MariaDB preview result

Connect MariaDB to SSIS

  1. Open Visual Studio.
  2. Create a New Project.
  3. Select Integration Services Project.
  4. Provide a project name and location, then click OK.
  5. Drag and drop a Data Flow Task from the SSIS Toolbox onto the Control Flow surface.

    Drag and drop Data flow.

  6. Double-click the task to open the Data Flow Designer.
  7. Drag and drop an ODBC Source component into the Data Flow.

    Drag and drop the ODBC source.

  8. Double-click the component to configure it.
  9. Click New… to create a new ODBC Connection Manager.

    Creating an ODBC Connection Manager in SSIS

  10. Select the MariaDB ODBC DSN you created earlier.
  11. Click Test Connection and click OK to save the configuration.

    Creating an ODBC Connection Manager in SSIS from JDBC

  12. Choose Data Access Mode: Table name or SQL command.
  13. Select the desired table or enter a custom query.
  14. Click Preview to validate the data, and click OK to save the configuration.

    Preview an ODBC Connection Manager in SSIS from JDBC

Configure PostgreSQL Destination

  1. In the Connection Manager pane, click New Connection.
  2. Select ZS-POSTGRESQL.
  3. Configure the connection:
    • Host
    • Username
    • Password
    • Port
    • Database name
  4. Use the other tabs for more configuration if needed
  5. Click Test Connection and Click OK.

    PostgreSQL connection configuration

  6. Drag and drop the PostgreSQL Destination component.

    Drag and drop the PostgreSQL destination.

  7. Connect it to the ODBC Source and double-click to configure it.
  8. Select the PostgreSQL connection.

    PostgreSQL Destination – Choose the connection

  9. Go to the Properties tab and choose the target table.

    PostgreSQL Destination – Choose the target table

  10. Go to the Column Mappings tab and map source columns to destination columns.

    PostgreSQL Destination – Map the columns

  11. Click OK to save the configuration.
  12. Run the SSIS package. If everything is configured correctly, the data will be transferred from MariaDB to PostgreSQL.

    PostgreSQL Destination – Final result

Alternative Option — Using Upsert Destination

An alternative destination component is the Upsert Destination; you can replace it with the PostgreSQL destination. You can preview data from the element, select the options to insert or/and update, and more.

  1. Replace the PostgreSQL Destination with the Upsert Destination.
  2. Select your PostgreSQL connection.
  3. Choose the target table.
  4. Choose Insert or/and Update action.n
  5. Map the columns.
  6. Select the primary key column(s).
  7. Configure additional options under the Advanced tab if needed.

    Upsert Destination – PostgreSQL destination table

  8. Run the package to perform the upsert operation.

    Upsert Destination – Final result

Conclusion

With ZappySys SSIS PowerPack and ODBC PowerPack, connecting MariaDB to PostgreSQL becomes straightforward and reliable.

By configuring the ODBC/JDBC bridge for MariaDB and using the native PostgreSQL destination in SSIS, you can build a robust ETL pipeline between the two databases.

Explore the full capabilities of the ZappySys SSIS PowerPack and ZappySys ODBC PowerPack to optimize your data integration tasks.

Need Help?

If you encounter any issues, our support team is here to help:

  • Live Chat — Use the chat widget (bottom-right corner of this page)
  • Emailsupport@zappysys.com
  • Support Center — Support | ZappySys

 

Posted in SSIS PostgreSql Connection, SSIS PostgreSQL Destination.