Messages and limitations of the Azure Cosmos DB connector

Message code list of AZUREDOCUMENTDB category

The following message codes correspond to errors that occur in Azure Cosmos DB Connector.

 

AZUREDOCUMENTDB0000E

This message code is output when an undefined error occurs.

Cause

Solution

An undefined error occurred.

Check the error message or the help of the operation in which the error has occurred.

Corresponding error

  • None

 

AZUREDOCUMENTDB0001E

This message code is output when connection to Azure Cosmos DB fails.

Cause

Solution

The cause differs according to each error message.

Check whether the cause/solution of the error is described in "Exception messages" below.

Corresponding error

  • com.microsoft.azure.documentdb.DocumentClientException

 

AZUREDOCUMENTDB0002E

This message code is output when the specified database doesn't exist.

Cause

Solution

The specified database doesn't exist in the destination.

Check Database of the connection resource specified in Destination.

Corresponding error

  • com.appresso.ds.dp.modules.adapter.azure.documentdb.DatabaseNotFoundException

 

AZUREDOCUMENTDB0003E

This message code is output when the specified collection doesn't exist.

Cause

Solution

The specified collection doesn't exist in the connected database.

Check Database and Collection of the connection resource specified in Destination.

Corresponding error

  • com.appresso.ds.dp.modules.adapter.azure.documentdb.CollectionNotFoundException

 

Exception messages of AZUREDOCUMENTDB category

Exception name

Cause

Solution

CollectionNotFoundException

Collection [<collection>] is not found.

The collection specified in Collection isn't found.

Check the collection specified in Collection.

com.microsoft.azure.documentdb.DocumentClientException

The cause differs according to each error message.

Check the contents of the error message.

DatabaseNotFoundException

Database [<database>] is not found.

The database specified in Destination isn't found.

Check Database of the connection resource specified in Destination.

InvalidPropertyConfigurationException

Item name of schema is duplicate.

<Schema definition/Item name> is duplicate.

Specify item names of <Schema definition/Item name> so as not to duplicate them.

InvalidPropertyConfigurationException

Set the type of id item of schema to String.

The type of id item of <Schema definition/Item name> is other than String.

Set the type of id item of <Schema definition/Item name> to String.

InvalidPropertyConfigurationException

<Property name> is not specified.

<Property name> isn't specified.

Specify <property name>.

ResourceNotFoundException

Resource definition could not be found. Name: []

Destination isn't specified.

Specify Destination.

ResourceNotFoundException

Resource definition could not be found. Name: [<connection resource name>]

The resource definition specified in Destination isn't found.

Check the connection resource specified in Destination.

 

Limitations of AZUREDOCUMENTDB category

 

= Remarks =

This connector uses DocumentDB API of Azure Cosmos DB. For more details on API specifications, refer to the following page:

  • "Azure Cosmos DB: DocumentDB REST API Reference" (https://docs.microsoft.com/en-us/rest/api/documentdb/)

Unlimited collection

In the case of accessing an unlimited collection by using this connector and other methods (such as Data Explorer in the Azure portal) together, limitations are as follows.

Each operation of this connector operates on the following premises:

  • Scope of ID uniqueness: ID is unique in the collection.

  • Partition key: The field storing a partition key exists in the document.

Operations aren't supported if you perform any of the following actions by the methods other than this connector.

  • Create documents of the same ID in the multiple partitions

  • Create a document without a partition key

Supported types

Correspondence of the JSON types of Azure Cosmos DB supported by this connector and the internal data types (schema types) is as follows.

Azure Cosmos DB data type name

Support

Schema type name

Remarks

string

Yes

String

 

number

Yes

BigDecimal

 

true/false

Yes

boolean

 

null

Yes

-

Treated as null regardless of the schema type.

object

No

-

 

array

No

-

 

  • Yes: Supported.

  • No: Not supported.

Precision of number type

Number type in Azure Cosmos DB is IEEE754 double precision.

  • If the number that exceeds IEEE754 double precision is written to Azure Cosmos DB as BigDecimal type, it will be rounded off. (It won't be an error)

  • To avoid rounding off, set the schema type as String type when writing the document.

    • However, as it's saved as string type in Azure Cosmos DB, SQL for number will no longer be able to be used.

Special item names

"_rid", "_ts", "_self", "_etag", "_attachments", etc. are the items generated by Azure Cosmos DB for a document. You can't write arbitrary values for these items.

As names of items generated by Azure Cosmos DB start with an underscore (_), it's recommended to set item names for schema such that there is no underscore at the start of the names.

= Remarks =

For more details on items generated by Azure Cosmos DB system, refer to the following pages:

  • "System vs. user defined resources" - (https://docs.microsoft.com/en-us/azure/cosmos-db/documentdb-resources#system-vs-user-defined-resources)

  • "Documents" - (https://docs.microsoft.com/en-us/rest/api/documentdb/documents)

Consistency

In Azure Cosmos DB Connector, among the 5 types of consistency ("Strong", "Bounded-Staleness", "Session", "Consistent Prefix", "Eventual"), "Session" is used.

= Remarks =

For more details on consistency of Azure Cosmos DB, refer to the following page:

  • "Tunable data consistency levels in Azure Cosmos DB" - (https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels)