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 file name to clipboardExpand all lines: articles/data-factory/connector-cassandra.md
+36-12Lines changed: 36 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: jianleishen
6
6
ms.subservice: data-movement
7
7
ms.custom: synapse
8
8
ms.topic: conceptual
9
-
ms.date: 02/28/2025
9
+
ms.date: 03/07/2025
10
10
ms.author: jianleishen
11
11
---
12
12
# Copy data from Cassandra using Azure Data Factory or Synapse Analytics
@@ -30,7 +30,7 @@ For a list of data stores that are supported as sources/sinks, see the [Supporte
30
30
31
31
Specifically, this Cassandra connector supports:
32
32
33
-
- Cassandra **versions 3.x.x and 4.x.x** for version 2.0.
33
+
- Cassandra **versions 3.x.x and 4.x.x** for version 2.0 (Preview).
34
34
- Cassandra **versions 2.x and 3.x** for version 1.0.
35
35
- Copying data using **Basic** or **Anonymous** authentication.
36
36
@@ -81,7 +81,7 @@ The following properties are supported for Cassandra linked service:
81
81
| Property | Description | Required |
82
82
|:--- |:--- |:--- |
83
83
| type |The type property must be set to: **Cassandra**|Yes |
84
-
| version | The version that you specify. The value is `2.0`. | Yes for version 2.0, not supported for version 1.0. |
84
+
| version | The version that you specify. The value is `2.0`. | Yes for version 2.0 (Preview), not supported for version 1.0. |
85
85
| host |One or more IP addresses or host names of Cassandra servers.<br/>Specify a comma-separated list of IP addresses or host names to connect to all servers concurrently. |Yes |
86
86
| port |The TCP port that the Cassandra server uses to listen for client connections. |No (default is 9042) |
87
87
| authenticationType | Type of authentication used to connect to the Cassandra database.<br/>Allowed values are: **Basic**, and **Anonymous**. |Yes |
@@ -233,20 +233,23 @@ If you use version 1.0 to copy data from Cassandra, set the source type in the c
233
233
234
234
When copying data from Cassandra, the following mappings are used from Cassandra data types to interim data types used internally within the service. See [Schema and data type mappings](copy-activity-schema-and-type-mapping.md) to learn about how copy activity maps the source schema and data type to the sink.
235
235
236
-
| Cassandra data type | Interim service data type (for version 2.0) | Interim service data type (for version 1.0) |
236
+
| Cassandra data type | Interim service data type (for version 2.0 (Preview)) | Interim service data type (for version 1.0) |
237
237
|:--- |:--- |:--- |
238
238
| ASCII |String |String |
239
239
| BIGINT |Int64 |Int64 |
240
240
| BLOB |Byte[]|Byte[]|
241
241
| BOOLEAN |Boolean |Boolean |
242
+
| DATE | DateTime | DateTime |
242
243
| DECIMAL |Decimal |Decimal |
243
244
| DOUBLE |Double |Double |
244
245
| FLOAT |Single |Single |
245
246
| INET |String |String |
246
247
| INT |Int32 |Int32 |
248
+
| SMALLINT | Short | Int16 |
247
249
| TEXT |String |String |
248
250
| TIMESTAMP |DateTime |DateTime |
249
251
| TIMEUUID |Guid |Guid |
252
+
| TINYINT | SByte | Int16 |
250
253
| UUID |Guid |Guid |
251
254
| VARCHAR |String |String |
252
255
| VARINT |Decimal |Decimal |
@@ -259,6 +262,26 @@ When copying data from Cassandra, the following mappings are used from Cassandra
259
262
> The length of Binary Column and String Column lengths cannot be greater than 4000.
260
263
>
261
264
265
+
## Work with collections when using version 2.0 (Preview)
266
+
267
+
When using version 2.0 (Preview) to copy data from your Cassandra database, no virtual tables for collection types are created. You can copy a source table to the sink in its original type in JSON format.
268
+
269
+
### Example
270
+
271
+
For example, the following "ExampleTable" is a Cassandra database table that contains an integer primary key column named "pk_int", a text column named value, a list column, a map column, and a set column (named "StringSet").
The data can be directly read from a source table, and the column values are preserved in their original types in JSON format, as illustrated in the following table:
## Work with collections using virtual table when using version 1.0
263
286
264
287
The service uses a built-in ODBC driver to connect to and copy data from your Cassandra database. For collection types including map, set and list, the driver renormalizes the data into corresponding virtual tables. Specifically, if a table contains any collection columns, the driver generates the following virtual tables:
@@ -324,25 +347,26 @@ The following tables show the virtual tables that renormalize the data from the
324
347
325
348
To learn details about the properties, check [Lookup activity](control-flow-lookup-activity.md).
326
349
327
-
## Differences between Cassandra version 2.0 and version 1.0
350
+
## Differences between Cassandra version 2.0 (Preview) and version 1.0
328
351
329
-
The Cassandra connector version 2.0 offers new functionalities and is compatible with most features of version 1.0. The table below shows the feature differences between version 2.0 and version 1.0.
352
+
The Cassandra connector version 2.0 (Preview) offers new functionalities and is compatible with most features of version 1.0. The table below shows the feature differences between version 2.0 (Preview) and version 1.0.
330
353
331
-
|version 2.0 | version 1.0 |
354
+
|Version 2.0 (Preview) | Version 1.0 |
332
355
| --- | --- |
333
356
| Support CQL query. | Support SQL-92 query or CQL query. |
334
-
| Support specifying `keyspace` and `tableName` separately in Cassandra dataset. | Support editing `keyspace` when you select enter manually table name in Cassandra dataset. |
335
-
| There is no virtual tables for collection types. | For collection types (map, set, list, etc.), refer to [Work with Cassandra collection types using virtual table when using version 1.0](#work-with-collections-using-virtual-table-when-using-version-10) section. |
357
+
| Support specifying `keyspace` and `tableName` separately in dataset. | Support editing `keyspace` when you select enter manually table name in dataset. |
358
+
| No virtual tables are created for collection types. For more information, see [Work with collections when using version 2.0 (Preview)](#work-with-collections-when-using-version-20-preview). | Virtual tables are created for collection types. For more information, see [Work with Cassandra collection types using virtual table when using version 1.0](#work-with-collections-using-virtual-table-when-using-version-10). |
359
+
| The following mappings are used from Cassandra data types to interim service data type. <br><br> SMALLINT -> Short <br> TINYINT -> SByte | The following mappings are used from Cassandra data types to interim service data type. <br><br> SMALLINT -> Int16 <br> TINYINT -> Int16 |
336
360
337
361
## Upgrade the Cassandra connector
338
362
339
363
Here are steps that help you upgrade the Cassandra connector:
340
364
341
-
1. In **Edit linked service** page, select **2.0 (Preview)** under **Version** and configure the linked service by referring to [Linked service properties](#linked-service-properties).
365
+
1. In **Edit linked service** page, select version 2.0 (Preview) and configure the linked service by referring to [Linked service properties](#linked-service-properties).
342
366
343
-
2.If you use `query` in the copy activity source for version 2.0, see [Cassandra as source](#cassandra-as-source).
367
+
2.In version 2.0 (Preview), the `query` in the copy activity source supports only CQL query, not SQL-92 query. For more information, see [Cassandra as source](#cassandra-as-source).
344
368
345
-
3. The data type mapping for version 2.0 is different from that for version 1.0. To learn the latest data type mapping, see [Data type mapping for Cassandra](#data-type-mapping-for-cassandra).
369
+
3. The data type mapping for version 2.0 (Preview) is different from that for version 1.0. To learn the latest data type mapping, see [Data type mapping for Cassandra](#data-type-mapping-for-cassandra).
346
370
347
371
## Related content
348
372
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