You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Copy data from Spark using Azure Data Factory or Synapse Analytics
@@ -67,19 +67,67 @@ The following sections provide details about properties that are used to define
67
67
68
68
## Linked service properties
69
69
70
-
The following properties are supported for Spark linked service:
70
+
The Spark connector now supports version 2.0 (Preview). Refer to this [section](#upgrade-the-spark-connector) to upgrade your Spark connector version from version 1.0. For the property details, see the corresponding sections.
71
+
72
+
-[Version 2.0 (Preview)](#version-20-preview)
73
+
-[Version 1.0](#version-10)
74
+
75
+
### Version 2.0 (Preview)
76
+
77
+
The following properties are supported for Spark linked service version 2.0 (Preview):
71
78
72
79
| Property | Description | Required |
73
80
|:--- |:--- |:--- |
74
81
| type | The type property must be set to: **Spark**| Yes |
82
+
| version | The version that you specify. The value is `2.0`. | Yes |
75
83
| host | IP address or host name of the Spark server | Yes |
76
84
| port | The TCP port that the Spark server uses to listen for client connections. If you connect to Azure HDInsights, specify port as 443. | Yes |
77
-
| serverType | The type of Spark server. <br/>Allowed values are: **SharkServer**, **SharkServer2**,**SparkThriftServer**| No |
78
-
| thriftTransportProtocol | The transport protocol to use in the Thrift layer. <br/>Allowed values are: **Binary**, **SASL**,**HTTP**| No |
79
-
| authenticationType | The authentication method used to access the Spark server. <br/>Allowed values are: **Anonymous**, **Username**, **UsernameAndPassword**, **WindowsAzureHDInsightService**| Yes |
85
+
| serverType | The type of Spark server. <br/>The allowed value is:**SparkThriftServer**| No |
86
+
| thriftTransportProtocol | The transport protocol to use in the Thrift layer. <br/>The allowed value is:**HTTP**| No |
87
+
| authenticationType | The authentication method used to access the Spark server. <br/>Allowed values are: **Anonymous**, **UsernameAndPassword**, **WindowsAzureHDInsightService**| Yes |
80
88
| username | The user name that you use to access Spark Server. | No |
81
89
| password | The password corresponding to the user. Mark this field as a SecureString to store it securely, or [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). | No |
82
90
| httpPath | The partial URL corresponding to the Spark server. | No |
91
+
| enableSsl | Specifies whether the connections to the server are encrypted using TLS. The default value is true. | No |
92
+
| connectVia | The [Integration Runtime](concepts-integration-runtime.md) to be used to connect to the data store. Learn more from [Prerequisites](#prerequisites) section. If not specified, it uses the default Azure Integration Runtime. |No |
The following properties are supported for Spark linked service version 1.0:
119
+
120
+
| Property | Description | Required |
121
+
|:--- |:--- |:--- |
122
+
| type | The type property must be set to: **Spark**| Yes |
123
+
| host | IP address or host name of the Spark server | Yes |
124
+
| port | The TCP port that the Spark server uses to listen for client connections. If you connect to Azure HDInsights, specify port as 443. | Yes |
125
+
| serverType | The type of Spark server. <br/>Allowed values are: **SharkServer**, **SharkServer2**, **SparkThriftServer**| No |
126
+
| thriftTransportProtocol | The transport protocol to use in the Thrift layer. <br/>Allowed values are: **Binary**, **SASL**, **HTTP**| No |
127
+
| authenticationType | The authentication method used to access the Spark server. <br/>Allowed values are: **Anonymous**, **Username**, **UsernameAndPassword**, **WindowsAzureHDInsightService**| Yes |
128
+
| username | The user name that you use to access Spark Server.| No |
129
+
| password | The password corresponding to the user. Mark this field as a SecureString to store it securely, or [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md).| No |
130
+
| httpPath | The partial URL corresponding to the Spark server.| No |
83
131
| enableSsl | Specifies whether the connections to the server are encrypted using TLS. The default value is false. | No |
84
132
| trustedCertPath | The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over TLS. This property can only be set when using TLS on self-hosted IR. The default value is the cacerts.pem file installed with the IR. | No |
85
133
| useSystemTrustStore | Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. | No |
@@ -95,13 +143,13 @@ The following properties are supported for Spark linked service:
@@ -183,9 +231,52 @@ To copy data from Spark, set the source type in the copy activity to **SparkSour
183
231
]
184
232
```
185
233
234
+
## Data type mapping for Spark
235
+
236
+
When you copy data from and to Spark, the following interim data type mappings are used within the service. To learn about how the copy activity maps the source schema and data type to the sink, see [Schema and data type mappings](copy-activity-schema-and-type-mapping.md).
237
+
238
+
| Spark data type | Interim service data type (for version 2.0 (Preview)) | Interim service data type (for version 1.0) |
239
+
|:--- |:--- |:--- |
240
+
| BooleanType | Boolean | Boolean |
241
+
| ByteType | Sbyte | Int16 |
242
+
| ShortType | Int16 | Int16 |
243
+
| IntegerType | Int32 | Int32 |
244
+
| LongType | Int64 | Int64 |
245
+
| FloatType | Single | Single |
246
+
| DoubleType | Double | Double |
247
+
| DateType | DateTime | DateTime |
248
+
| TimestampType | DateTimeOffset | DateTime |
249
+
| StringType | String | String |
250
+
| BinaryType | Byte[]| Byte[]|
251
+
| DecimalType | Decimal | Decimal |
252
+
| ArrayType | String | String |
253
+
| StructType | String | String |
254
+
| MapType | String | String |
255
+
| TimestampNTZType | DateTime | DateTime |
256
+
| YearMonthIntervalType | String | Not supported. |
257
+
| DayTimeIntervalType | String | Not supported. |
258
+
186
259
## Lookup activity properties
187
260
188
261
To learn details about the properties, check [Lookup activity](control-flow-lookup-activity.md).
189
262
263
+
## Upgrade the Spark connector
264
+
265
+
1. In **Edit linked service** page, select 2.0 for version and configure the linked service by referring to [Linked service properties version 2.0 (Preview)](#version-20-preview).
266
+
267
+
1. The data type mapping for the Spark linked service version 2.0 (Preview) is different from that for the version 1.0. To learn the latest data type mapping, see [Data type mapping for Spark](#data-type-mapping-for-spark).
268
+
269
+
## Differences between Spark version 2.0 (Preview) and version 1.0
270
+
271
+
The Spark connector version 2.0 (Preview) offers new functionalities and is compatible with most features of version 1.0. The following table shows the feature differences between version 2.0 (Preview) and version 1.0.
272
+
273
+
| Version 2.0 (Preview) | Version 1.0 |
274
+
|:--- |:--- |
275
+
| SharkServer and SharkServer2 are not supported for `serverType`. | Support SharkServer and SharkServer2 for `serverType`. |
276
+
| Binary and SASL are not supported for `thriftTransportProtocl`. | Support Binary and SASL for `thriftTransportProtocl`. |
277
+
| Username authentication type is not supported. | Support Username authentication type. |
278
+
| The default value of `enableSSL` is true. `trustedCertPath`, `useSystemTrustStore`, `allowHostNameCNMismatch` and `allowSelfSignedServerCert` are not supported.| The default value of `enableSSL` is false. Additionally, support `trustedCertPath`, `useSystemTrustStore`, `allowHostNameCNMismatch` and `allowSelfSignedServerCert`. |
279
+
| The following mappings are used from Spark data types to interim service data types used by the service internally.<br><br>TimestampType -> DateTimeOffset <br>YearMonthIntervalType -> String<br>DayTimeIntervalType -> String | The following mappings are used from Spark data types to interim service data types used by the service internally.<br><br>TimestampType -> DateTime<br>Other mappings supported by version 2.0 (Preview) listed left are not supported by version 1.0. |
280
+
190
281
## Related content
191
282
For a list of data stores supported as sources and sinks by the copy activity, see [supported data stores](copy-activity-overview.md#supported-data-stores-and-formats).
0 commit comments