Skip to content

Commit 725724b

Browse files
authored
Update connector-azure-database-for-postgresql.md
1 parent 1a1b68d commit 725724b

File tree

1 file changed

+95
-17
lines changed

1 file changed

+95
-17
lines changed

articles/data-factory/connector-azure-database-for-postgresql.md

Lines changed: 95 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,10 @@ The following properties are supported for the Azure Database for PostgreSQL lin
8383
|:--- |:--- |:--- |
8484
| type | The type property must be set to: **AzurePostgreSql**. | Yes |
8585
| version | The version that you specify. The value is `2.0`. | Yes |
86+
| authentication type | Select from basic or service principal authentication | Yes |
8687
| server | Specifies the host name and optionally port on which Azure Database for PostgreSQL is running. | Yes |
8788
| port |The TCP port of the Azure Database for PostgreSQL server. The default value is `5432`. |No |
8889
| database| The name of the Azure Database for PostgreSQL database to connect to. |Yes |
89-
| username| The username to connect with. Not required if using IntegratedSecurity. |Yes |
90-
| password| The password to connect with. Not required if using IntegratedSecurity. Mark this field as **SecureString** to store it securely. Or, you can [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). |Yes |
9190
| sslMode | Controls whether SSL is used, depending on server support. <br/>- **Disable**: SSL is disabled. If the server requires SSL, the connection will fail.<br/>- **Allow**: Prefer non-SSL connections if the server allows them, but allow SSL connections.<br/>- **Prefer**: Prefer SSL connections if the server allows them, but allow connections without SSL.<br/>- **Require**: The connection fails if the server doesn't support SSL.<br/>- **Verify-ca**: The connection fails if the server doesn't support SSL. Also verifies server certificate.<br/>- **Verify-full**: The connection fails if the server doesn't support SSL. Also verifies server certificate with host's name. <br/>Options: Disable (0) / Allow (1) / Prefer (2) **(Default)** / Require (3) / Verify-ca (4) / Verify-full (5) | No |
9291
| connectVia | This property represents the [integration runtime](concepts-integration-runtime.md) to be used to connect to the data store. You can use Azure Integration Runtime or Self-hosted Integration Runtime (if your data store is located in private network). If not specified, it uses the default Azure Integration Runtime.|No|
9392
| ***Additional connection properties:*** | | |
@@ -100,6 +99,13 @@ The following properties are supported for the Azure Database for PostgreSQL lin
10099
| timezone | Gets or sets the session timezone. | No |
101100
| encoding | Gets or sets the .NET encoding that will be used to encode/decode PostgreSQL string data. | No |
102101

102+
### PostgreSQL authentication
103+
104+
| Property | Description | Required |
105+
|:--- |:--- |:--- |
106+
| username | The username to connect with. Not required if using IntegratedSecurity. |Yes |
107+
| password | The password to connect with. Not required if using IntegratedSecurity. Mark this field as **SecureString** to store it securely. Or, you can [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). |Yes |
108+
103109
**Example**:
104110

105111
```json
@@ -138,19 +144,92 @@ The following properties are supported for the Azure Database for PostgreSQL lin
138144
"database": "<database name>",
139145
"sslMode": 2,
140146
"username": "<user name>",
141-
"password": { 
142-
"type": "AzureKeyVaultSecret", 
143-
"store": { 
144-
"referenceName": "<Azure Key Vault linked service name>", 
145-
"type": "LinkedServiceReference" 
146-
}, 
147-
"secretName": "<secretName>" 
147+
"password": {
148+
"type": "AzureKeyVaultSecret",
149+
"store": {
150+
"referenceName": "<Azure Key Vault linked service name>",
151+
"type": "LinkedServiceReference"
152+
},
153+
"secretName": "<secretName>"
148154
}
149155
}
150156
}
151157
}
158+
```
159+
160+
### Service principal authentication
161+
162+
| Property | Description | Required |
163+
|:--- |:--- |:--- |
164+
| service principal name | The display name of the service principal |Yes |
165+
| tenant | The tenant which the Azure Database for PostgreSQL server is located |Yes |
166+
| service principal id | Application ID of service principal |Yes |
167+
| service principal credential type | Select if service principal certificate or service principal key is desired authentication method<br/>- **ServicePrincipalCert**: Set to service principal certificate for service principal certifiate.<br/>- **ServicePrincipalKey**: Set to service principal key for service principal key authentication. | Yes |
168+
| service principal key | Client secret value. Used when service principal key is selected |Yes |
169+
| azure cloud type | Select the azure cloud type of your Azure Database for PostgreSQL server |Yes |
170+
| service principal certificate | Service principal certificate file |Yes |
171+
| service principal cert password | Service principal certificate password if required |No |
172+
173+
**Example**:
174+
175+
**Service principal key**
176+
```json
177+
{
178+
"name": "AzurePostgreSqlLinkedService",
179+
"type": "Microsoft.DataFactory/factories/linkedservices",
180+
"properties": {
181+
"annotations": [],
182+
"type": "AzurePostgreSql",
183+
"version": "2.0",
184+
"typeProperties": {
185+
"server": "<server name>",
186+
"port": 5432,
187+
"database": "<database name>",
188+
"sslMode": 2,
189+
"username": "<service principal name>",
190+
"authenticationType": "<authentication type>",
191+
"tenant": "<tenant>",
192+
"servicePrincipalId": "<service principal ID>",
193+
"azureCloudType": "<azure cloud type>",
194+
"servicePrincipalCredentialType": "<service principal type>",
195+
"servicePrincipalKey": "<service principal key>"
196+
}
197+
}
198+
}
199+
```
200+
201+
**Example**:
202+
203+
**Service principal certificate**
204+
```json
205+
{
206+
"name": "AzurePostgreSqlLinkedService",
207+
"type": "Microsoft.DataFactory/factories/linkedservices",
208+
"properties": {
209+
"annotations": [],
210+
"type": "AzurePostgreSql",
211+
"version": "2.0",
212+
"typeProperties": {
213+
"server": "<server name>",
214+
"port": 5432,
215+
"database": "<database name>",
216+
"sslMode": 2,
217+
"username": "<service principal name>",
218+
"authenticationType": "<authentication type>",
219+
"tenant": "<tenant>",
220+
"servicePrincipalId": "<service principal ID>",
221+
"azureCloudType": "<azure cloud type>",
222+
"servicePrincipalCredentialType": "<service principal type>",
223+
"servicePrincipalEmbeddedCert": "<service principal certificate>",
224+
"servicePrincipalEmbeddedCertPassword": "<service principal embedded certificate password>"
225+
}
226+
}
227+
}
152228
```
153229

230+
231+
232+
154233
### Version 1.0
155234

156235
The following properties are supported for the Azure Database for PostgreSQL linked service when you apply version 1.0:
@@ -196,13 +275,13 @@ A typical connection string is `host=<server>.postgres.database.azure.com;databa
196275
"version": "1.0",
197276
"typeProperties": {
198277
"connectionString": "host=<server>.postgres.database.azure.com;database=<database>;port=<port>;uid=<username>;",
199-
"password": { 
200-
"type": "AzureKeyVaultSecret", 
201-
"store": { 
202-
"referenceName": "<Azure Key Vault linked service name>", 
203-
"type": "LinkedServiceReference" 
204-
}, 
205-
"secretName": "<secretName>" 
278+
"password": {
279+
"type": "AzureKeyVaultSecret",
280+
"store": {
281+
"referenceName": "<Azure Key Vault linked service name>",
282+
"type": "LinkedServiceReference"
283+
},
284+
"secretName": "<secretName>"
206285
}
207286
}
208287
}
@@ -460,7 +539,6 @@ IncomingStream sink(allowSchemaDrift: true,
460539

461540
For more information about the properties, see [Lookup activity](control-flow-lookup-activity.md).
462541

463-
464542
## Upgrade the Azure Database for PostgreSQL connector
465543

466544
In **Edit linked service** page, select **2.0** under **Version** and configure the linked service by referring to [Linked service properties version 2.0](#version-20).

0 commit comments

Comments
 (0)