Skip to content

Commit 6de2f29

Browse files
committed
Update oauth and basic
1 parent 565496c commit 6de2f29

File tree

1 file changed

+77
-2
lines changed

1 file changed

+77
-2
lines changed

articles/data-factory/connector-snowflake.md

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: data-factory
88
ms.subservice: data-movement
99
ms.topic: conceptual
1010
ms.custom: synapse
11-
ms.date: 08/24/2022
11+
ms.date: 10/26/2022
1212
---
1313

1414
# Copy and transform data in Snowflake using Azure Data Factory or Azure Synapse Analytics
@@ -85,12 +85,22 @@ The following sections provide details about properties that define entities spe
8585

8686
## Linked service properties
8787

88-
The following properties are supported for a Snowflake-linked service.
88+
This Snowflake connector supports the following authentication types. See the corresponding sections for details.
89+
90+
91+
92+
- [Basic authentication](#basic-authentication)
93+
- [OAuth2 authentication](#oauth2-authentication)
94+
95+
### Basic authentication
96+
97+
The following properties are supported for a Snowflake linked service when using **Basic** authentication.
8998

9099
| Property | Description | Required |
91100
| :--------------- | :----------------------------------------------------------- | :------- |
92101
| type | The type property must be set to **Snowflake**. | Yes |
93102
| connectionString | Specifies the information needed to connect to the Snowflake instance. You can choose to put password or entire connection string in Azure Key Vault. Refer to the examples below the table, as well as the [Store credentials in Azure Key Vault](store-credentials-in-key-vault.md) article, for more details.<br><br>Some typical settings:<br>- **Account name:** The [full account name](https://docs.snowflake.net/manuals/user-guide/connecting.html#your-snowflake-account-name) of your Snowflake account (including additional segments that identify the region and cloud platform), e.g. xy12345.east-us-2.azure.<br/>- **User name:** The login name of the user for the connection.<br>- **Password:** The password for the user.<br>- **Database:** The default database to use once connected. It should be an existing database for which the specified role has privileges.<br>- **Warehouse:** The virtual warehouse to use once connected. It should be an existing warehouse for which the specified role has privileges.<br>- **Role:** The default access control role to use in the Snowflake session. The specified role should be an existing role that has already been assigned to the specified user. The default role is PUBLIC. | Yes |
103+
| authenticationType  | Set this property to **Basic**. | Yes    |
94104
| connectVia | The [integration runtime](concepts-integration-runtime.md) that is used to connect to the data store. You can use the Azure integration runtime or a self-hosted integration runtime (if your data store is located in a private network). If not specified, it uses the default Azure integration runtime. | No |
95105

96106
**Example:**
@@ -101,6 +111,7 @@ The following properties are supported for a Snowflake-linked service.
101111
"properties": {
102112
"type": "Snowflake",
103113
"typeProperties": {
114+
"authenticationType": "Basic",
104115
"connectionString": "jdbc:snowflake://<accountname>.snowflakecomputing.com/?user=<username>&password=<password>&db=<database>&warehouse=<warehouse>&role=<myRole>"
105116
},
106117
"connectVia": {
@@ -119,6 +130,7 @@ The following properties are supported for a Snowflake-linked service.
119130
"properties": {
120131
"type": "Snowflake",
121132
"typeProperties": {
133+
"authenticationType": "Basic",
122134
"connectionString": "jdbc:snowflake://<accountname>.snowflakecomputing.com/?user=<username>&db=<database>&warehouse=<warehouse>&role=<myRole>",
123135
"password": {
124136
"type": "AzureKeyVaultSecret",
@@ -137,6 +149,69 @@ The following properties are supported for a Snowflake-linked service.
137149
}
138150
```
139151

152+
### OAuth2 authentication
153+
154+
>[!Note]
155+
>Currently, the OAuth2 authentication is not supported in data flow.
156+
157+
The following properties are supported for a Snowflake linked service when using **OAuth2** authenticaition.
158+
159+
| Property         | Description                                                  | Required |
160+
| :--------------- | :----------------------------------------------------------- | :------- |
161+
| type             | The type property must be set to **Snowflake**.              | Yes      |
162+
| connectionString | Specifies the information needed to connect to the Snowflake instance. You can choose to put password or entire connection string in Azure Key Vault. Refer to the examples below the table, as well as the [Store credentials in Azure Key Vault](store-credentials-in-key-vault.md) article, for more details.<br><br>Some typical settings:<br>- **Account name:** The  [full account name](https://docs.snowflake.net/manuals/user-guide/connecting.html#your-snowflake-account-name) of your Snowflake account (including additional segments that identify the region and cloud platform), e.g. xy12345.east-us-2.Azure.<br/>- **User name:** The login name of the user for the connection.<br- **Database:** The default database to use once connected. It should be an existing database for which the specified role has privileges.<br>- **Warehouse:** The virtual warehouse to use once connected. It should be an existing warehouse for which the specified role has privileges.<br>- **Role:** The default access control role to use in the Snowflake session. The specified role should be an existing role that has already been assigned to the specified user. The default role is PUBLIC. | Yes      |
163+
| authenticationType | Set this property to **Oauth**. | Yes      |
164+
| oauthTokenEndpoint        | The Azure AD OAuth token endpoint.
165+
Sample: “https://login.microsoftonline.com/<tenant ID>/discovery/v2.0/keys”  | Yes       |
166+
| clientId  | The application client ID supplied by Azure AD . | Yes      |
167+
| clientSecret  | The client secret corresponds to the client ID.  | Yes      |
168+
| oauthUserName  | The name of the Azure user.  | Yes      |
169+
| oauthPassword   | The password for the Azure user. | Yes      |
170+
| scope   | The OAuth scope.
171+
Sample: “api://<application (client) ID>/session:scope:MYROLE” | Yes      |
172+
173+
**Example:**
174+
175+
```json
176+
{
177+
    "name": "SnowflakeLinkedService",
178+
    "type": "Microsoft.DataFactory/factories/linkedservices",
179+
    "properties": {
180+
        "annotations": [],
181+
        "type": "Snowflake",
182+
        "typeProperties": {
183+
            "connectionString": "jdbc:snowflake://<accountname>.snowflakecomputing.com/?user=<username>&db=<database>&warehouse=<warehouse>&role=<myRole>",
184+
            "authenticationType": "Oauth",
185+
            "oauthTokenEndpoint": "https://login.microsoftonline.com/<tenant ID>/discovery/v2.0/keys",
186+
            "clientId": "<client Id>",
187+
            "clientSecret": {
188+
                "type": "AzureKeyVaultSecret",
189+
                "store": {
190+
                    "referenceName": "<Azure Key Vault linked service name>",
191+
                    "type": "LinkedServiceReference"
192+
                },
193+
                "secretName": "<secret name>",
194+
            },
195+
            "oauthUserName": "<user name>",
196+
            "oauthPassword": {
197+
                "type": "AzureKeyVaultSecret",
198+
                "store": {
199+
                    "referenceName": "<Azure Key Vault linked service name>",
200+
                    "type": "LinkedServiceReference"
201+
                },
202+
                "secretName": "<secret name>",
203+
            },
204+
            "scope": "api://<application (client) ID>/session:scope:MYROLE",
205+
        },
206+
"connectVia": {
207+
"referenceName": "<name of Integration Runtime>",
208+
"type": "IntegrationRuntimeReference"
209+
}
210+
    }
211+
}
212+
213+
```
214+
140215
## Dataset properties
141216

142217
For a full list of sections and properties available for defining datasets, see the [Datasets](concepts-datasets-linked-services.md) article.

0 commit comments

Comments
 (0)