Friday , December 6 2024

Data Transfer From PostgreSQL To SQL Server With PolyBase

In this article, we will see how to query a table in PostgreSQL by defining it as an external table in SQL Server.

First, we need to introduce our user that we use on the Postgresql side to Polybase and create a credential so that we can use it later.

After the Credential is created, we need to create a Data Source for the PostgreSQL connection.

We created the Data Source that we will use for the connection and created our credential for this data source connection.

Next, we need to create our table in PostgreSQL on the SQL server.

We created our external table, but what you need to pay attention to here is that the columns we defined on the postgresql and sql server side must match each other.

As seen above, when we query our table in postgresql from SQL Server, we see that our data is coming.

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *