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
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,14 +239,17 @@ When copying data from Cassandra, the following mappings are used from Cassandra
239
239
| BIGINT |Int64 |Int64 |
240
240
| BLOB |Byte[]|Byte[]|
241
241
| BOOLEAN |Boolean |Boolean |
242
+
| DATE | IDate | 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 |
@@ -261,7 +264,23 @@ When copying data from Cassandra, the following mappings are used from Cassandra
261
264
262
265
## Work with collections using original type when using version 2.0
263
266
264
-
For collection types including map, set and list, the data are represented in Json format. There are no virtual tables for collection types, and instead copying a source table to sink in its original type.
267
+
There are no virtual tables for collection types, you can copy a source table to sink in its original type.
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").
No need to create any virtual tables. You can directly read data from a source table and treat complex type column values as its original type, as shown in the following table:
## Work with collections using virtual table when using version 1.0
267
286
@@ -336,7 +355,8 @@ The Cassandra connector version 2.0 offers new functionalities and is compatible
336
355
| --- | --- |
337
356
| Support CQL query. | Support SQL-92 query or CQL query. |
338
357
| Support specifying `keyspace` and `tableName` separately in dataset. | Support editing `keyspace` when you select enter manually table name in dataset. |
339
-
| For collection types (map, set, list, etc.), there are no virtual tables for collection types. You can copy a source table to sink in its original type, refer to [Work with collections using original type when using version 2.0](#work-with-collections-using-original-type-when-using-version-20) section. | 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. |
358
+
| There are no virtual tables for collection types, refer to [Work with collections using original type when using version 2.0](#work-with-collections-using-original-type-when-using-version-20) section. | For collection types, 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. |
359
+
| The following mappings are used from Cassandra data types to interim service data type. <br><br> DATE -> IDate <br> SMALLINT -> Short <br> TINYINT -> SByte | The following mappings are used from Cassandra data types to interim service data type. <br><br> DATE -> DateTime <br> SMALLINT -> Int16 <br> TINYINT -> Int16 |
340
360
341
361
## Upgrade the Cassandra connector
342
362
@@ -346,5 +366,7 @@ Here are steps that help you upgrade the Cassandra connector:
346
366
347
367
2. If you use `query` in the copy activity source for version 2.0, see [Cassandra as source](#cassandra-as-source).
348
368
369
+
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).
370
+
349
371
## Related content
350
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