I have setup the ADF Link Service and Staging area to copy to SnowFlake Datawarehouse with Azure Data Factory. However, the actual copy activity returns the following error:
ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [22000] Cannot perform CREATE STAGE. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.,Source=Microsoft.DataTransfer.Runtime.GenericOdbcConnectors,''Type=System.Data.Odbc.OdbcException,Message=ERROR [22000] Cannot perform CREATE STAGE. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.,Source=SnowflakeODBC_sb64.dll,'
The Sink settings are as followings
The dataset properties are as follows:
Any thoughts?
Cannot perform CREATE STAGE. This session does not have a current database. Call 'USE DATABASE' or use a qualified name.
This error often indicates that the database name is incorrect, that the database has not yet been established, or that the user does not have access to the database.
To resolve this, follow below steps:
use databasename
query.
And it is working fine for me: