COPY Error
0 0
Read Time:3 Minute, 10 Second

During this post we are going to discuss how Snowflake ODBC connector use with Azure Data factory to ingest data into Snowflake hosted on AWS cloud platform. As per the requirement Snowflake Account hosted on AWS cloud and will be used as Target database. A pipeline needs to be develop in ADF which will pull the data from Blob area and sink into Snowflake account. At first glance the requirement seems pretty straightforward and will use the COPY activity to fetch data from source and load into AWS Snowflake. For below scenario, I used both Source and Target on same AWS Snowflake account with two different datasets.

Same LS
Linked Service

Now COPY activity is ready to execute. When start debugging the pipeline surprisingly got the below error.

COPY Error

As per the error we can use only Snowflake hosted on AZURE as sink connector. Our Snowflake account is hosted on AWS cloud platform and ADF does not support in sink. Though you can use the AWS Snowflake account as Source and ADF connects it successfully.

Try to query the Table host on Snowflake AWS cloud and we could able to connect successfully.

Query Snowflake AWS

So now question comes, Do we have any other approach to ingest data into Snowflake (AWS) via Azure Data factory.

Yes, Snowflake ODBC driver Extends Data Solutions to Snowflake on Azure.By configuring the snowflake ODBC driver with ADF we can ingest the data into AWS hosted Snowflake.

Configuring this solution is not straight forward and need to perform the below steps to implement the same in your environment.


1: Install Snowflake ODBC driver on machine:

  • Down load and Install the ODBC driver setup(64 bit) from the downloads available on snowflake console.
  • Open ODBC data sources (64-bit) and create  a new data source.
  • Configure the connection like below.
ODBC setup

Note: Please create this DSN inside the system DSN. I had difficult time while testing the connection with Linked service,(Discuss in upcoming section).

2: Install and configure Azure integration runtime:

  1. Select Integration runtimes on the left pane, and then select +New.

2. On the Integration runtime setup page, select Azure, Self-Hosted, and then select Continue.

3. On the following page, select Self-Hosted to create a Self-Hosted IR, and then select Continue.

4. Enter a name for your IR (Should be the same name as odbc DSN name i.e. SFIR) and select Create.

5. On the Integration runtime setup page, select the link under Option 2to set up manually

IR Runtime Setup
  1. Copy and paste the authentication key. Select Download and install integration runtime.
  2. Download the self-hosted integration runtime on a local Windows machine. Run the installer.
  3. On the Register Integration Runtime (Self-hosted)page, paste the key you        saved earlier, and select Register.
IR Register
After the self-hosted integration runtime is registered successfully, you see the following window.
Integration Runtime setup
Sometimes Status is “Unavailable” and it can be the possibility that IR services are not up.
Services Restart

In next post we will discuss how to configure the ODBC Linked Service , Dataset pointing to the ODBC linked service and the COPY activity. Also we will verify if we are able to connect Snowflake with odbc connector.


Average Rating

5 Star
4 Star
3 Star
2 Star
1 Star

Leave a Reply

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