Skip to content

Commit 6a2694f

Browse files
Merge pull request #247522 from Rodrigossz/main
Update analytical-store-introduction.md
2 parents 32ac1c8 + 356581e commit 6a2694f

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

articles/cosmos-db/analytical-store-introduction.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -310,21 +310,21 @@ Unlike the well-defined schema representation, the full fidelity method allows v
310310

311311
##### Datatypes map for full fidelity schema
312312

313-
Here's a map of all the property data types and their representations in the analytical store in full fidelity schema representation:
313+
Here's a map of MongoDB data types and their representations in the analytical store in full fidelity schema representation. The map below isn't valid for NoSQL API accounts.
314314

315315
|Original data type |Suffix |Example |
316316
|---------|---------|---------|
317317
| Double | ".float64" | 24.99|
318318
| Array | ".array" | ["a", "b"]|
319-
|Binary | ".binary" |0|
320-
|Boolean | ".bool" |True|
321-
|Int32 | ".int32" |123|
322-
|Int64 | ".int64" |255486129307|
323-
|NULL | ".NULL" | NULL|
324-
|String| ".string" | "ABC"|
325-
|Timestamp | ".timestamp" | Timestamp(0, 0)|
326-
|ObjectId |".objectId" | ObjectId("5f3f7b59330ec25c132623a2")|
327-
|Document |".object" | {"a": "a"}|
319+
| Binary | ".binary" |0|
320+
| Boolean | ".bool" |True|
321+
| Int32 | ".int32" |123|
322+
| Int64 | ".int64" |255486129307|
323+
| NULL | ".NULL" | NULL|
324+
| String| ".string" | "ABC"|
325+
| Timestamp | ".timestamp" | Timestamp(0, 0)|
326+
| ObjectId |".objectId" | ObjectId("5f3f7b59330ec25c132623a2")|
327+
| Document |".object" | {"a": "a"}|
328328

329329
* Expect different behavior in regard to explicit `NULL` values:
330330
* Spark pools in Azure Synapse will read these values as `0` (zero).
@@ -334,6 +334,10 @@ Here's a map of all the property data types and their representations in the ana
334334
* Spark pools in Azure Synapse will represent these columns as `undefined`.
335335
* SQL serverless pools in Azure Synapse will represent these columns as `NULL`.
336336

337+
* Expect different behavior in regard to `timestamp` values:
338+
* Spark pools in Azure Synapse will read these values as `TimestampType`, `DateType`, or `Float`. It depends on the range and how the timestamp was generated.
339+
* SQL Serverless pools in Azure Synapse will read these values as `DATETIME2`. Data will be truncated if the timestamp is beyond the DATETIME2 range in Synapse SQL Serverless supported data types. That's because MongoDB range is bigger than SQL range.
340+
337341
##### Using full fidelity schema with Spark
338342

339343
Spark will manage each datatype as a column when loading into a `DataFrame`. Let's assume a collection with the documents below.
@@ -479,9 +483,10 @@ FROM OPENROWSET('CosmosDB',
479483
480484
It's possible to use full fidelity Schema for API for NoSQL accounts, instead of the default option, by setting the schema type when enabling Synapse Link on an Azure Cosmos DB account for the first time. Here are the considerations about changing the default schema representation type:
481485

482-
* Currently, if you enable Synapse Link in your NoSQL API account using the Azure Portal, it will be enabled as well-defined schema.
486+
* Currently, if you enable Synapse Link in your NoSQL API account using the Azure portal, it will be enabled as well-defined schema.
483487
* Currently, if you want to use full fidelity schema with NoSQL or Gremlin API accounts, you have to set it at account level in the same CLI or PowerShell command that will enable Synapse Link at account level.
484488
* Currently Azure Cosmos DB for MongoDB isn't compatible with this possibility of changing the schema representation. All MongoDB accounts have full fidelity schema representation type.
489+
* Full Fidelity schema data types map mentioned above isn't valid for NoSQL API accounts, that use JSON datatypes. As an example, `float` and `integer` values are represented as `num` in analytical store.
485490
* It's not possible to reset the schema representation type, from well-defined to full fidelity or vice-versa.
486491
* Currently, containers schemas in analytical store are defined when the container is created, even if Synapse Link has not been enabled in the database account.
487492
* Containers or graphs created before Synapse Link was enabled with full fidelity schema at account level will have well-defined schema.
@@ -572,7 +577,7 @@ Synapse Link, and analytical store by consequence, has different compatibility l
572577

573578
### Backup policies
574579

575-
There are two possible backup polices and to understand how to use them, the following details about Azure Cosmos DB backups are very important:
580+
There are two possible backup policies and to understand how to use them, the following details about Azure Cosmos DB backups are very important:
576581

577582
* The original container is restored without analytical store in both backup modes.
578583
* Azure Cosmos DB doesn't support containers overwrite from a restore.

0 commit comments

Comments
 (0)