Microsoft Azure Cosmos DB SQL API Connector > Mappings for Microsoft Azure Cosmos DB SQL API > Microsoft Azure Cosmos DB SQL API target properties
  

Microsoft Azure Cosmos DB SQL API target properties

You can configure a Target transformation to represent a Microsoft Azure Cosmos DB SQL API target.
The following table describes the Microsoft Azure Cosmos DB SQL API target properties that you can configure in a Target transformation:
Property
Description
Connection
Name of the target connection.
You can select an existing connection, create a new connection, or define parameter values for the target connection property.
To overwrite the target connection properties at runtime, select the Allow parameter to be overridden at run time option.
Target Type
Type of target object. Select Single Object or Parameter.
Object
The target object for the task. Select the target object.
You can write data by selecting an existing target object or creating a new target by using the Create New at Runtime option.
Create New at Runtime
Creates a Microsoft Azure Cosmos DB SQL API target at runtime.
To create a target table at runtime, provide the following parameters:
  • - Object Name. Name of the collection to be created in Microsoft Azure Cosmos DB SQL API.
  • Name must not start or end with a space or contain the following characters: \ / # ?
  • - Partition Key. The partition key for the collection.
  • Specify the key in the following format: /ID. Ensure that the partition key field is an existing field from the Source transformation or any previous transformation.
    Partition key must not contain only numbers, spaces, unicode characters, and special characters except underscore.
  • - Collection Throughput. Request units processed per second.
  • Specify the value for Autoscale throughput in multiples of 1000. The minimum value for autoscale throughput is 1000 and maximum value is 1000000.
    Specify the value for Manual throughput in multiples of 100. The minimum value for manual throughput is 400 and maximum value is 1000000.
  • - Collection Throughput Scale. Type of throughput. Select Autoscale or Manual.
  • - Formatting options. Not applicable.
  • - Handle Special Characters. Not applicable.
Parameter
The parameter that holds the value of the object that you want to define at run-time.
Select an existing parameter for the target object or click New Parameter to define a new parameter for the target object.
The Parameter property appears only if you select parameter as the target type.
If you want to overwrite the target object at runtime, select the Allow parameter to be overridden at run time option. When the task runs, the agent uses the parameters from the file that you specify in the advanced session properties.
Format
Mandatory. Microsoft Azure Cosmos DB format options.
Select one of the following formats:
  • - None.1 To write multilevel-hierarchical data in the string format.
  • - Json. To read or write JSON documents that have one level of hierarchy.
Default is None.
When you create a Microsoft Azure Cosmos DB SQL API target at runtime, you cannot use the None option.
Operation
Not applicable. You must configure the target operation in the target advanced properties.
1Doesn't apply to mappings in advanced mode.
The following table describes the advanced properties that you can configure in a Target transformation:
Advanced Property
Description
Throughput1
Request units processed per second. Overrides the throughput that you specify for the collection in Microsoft Azure Cosmos DB SQL API at runtime.
You cannot override the throughput of the database. Before you override the throughput for the collection, ensure that the throughput is set for the collection in Microsoft Azure Cosmos DB SQL API.
Specify the throughput value based on the throughput type:
  • - Autoscale throughput. Specify the value in multiples of 1000. The minimum value is 1000 and maximum value is 1000000.
  • - Manual throughput. Specify the value in multiples of 100. The minimum value for manual throughput is 400 and maximum value is 1000000.
Default is -1.
Automatic Id Generation1
Generate ID for the documents written to the target. Specify any of the following values:
  • - Enabled. Cosmos DB generates IDs for the documents.
  • - Disabled. The source object provides IDs for the documents. Data Integration rejects the rows if a Null value is provided to the ID port in the target or if you do not connect a port to the ID port in the target.
Treat Source Rows As
Operation to perform.
Select one of the following options:
  • - Insert
  • - Update1
  • - Upsert
  • - Delete
You must connect the ID port and Partition Key port to perform update, upsert, or delete operations. Data Integration displays an exception if you do not connect the ID port or the partition key for upsert and update operations, whereas, the delete operation fails.
For upsert and update operations, in addition to the ports you want to update, you must connect all other ports a document contains. The values for the unconnected ports get deleted during upsert and update operations.
Execution Priority1
Prioritizes bulk write requests in Microsoft Azure Cosmos DB SQL API.
Set the priority to low to throttle throughput of low priority requests and allow the execution of only the higher priority requests. Low priority requests are throttled only when there are no other high priority requests.
Default is High.
Is Bulk Write1
Indicates whether to write bulk data. By default, the Secure Agent does not write bulk data.
Forward Rejected Rows1
Determines whether the transformation passes rejected rows to the next transformation or drops rejected rows.
By default, the mapping task forwards rejected rows to the next transformation.
1Doesn't apply to mappings in advanced mode.

Specify a target

You can use an existing target or create a new target to write data to Microsoft Azure Cosmos DB SQL API . If you choose to create a new target, the agent creates the target when it runs the task.
When you use an existing target, you can infer schema from the selected target object or generate schema from the incoming fields.
Consider the following rules and guidelines for an existing target:
When you create a new target, specify the object name, partition key, collection throughput, and collection throughput scale.
Consider the following rules and guidelines when you create a new target: