Delete Document

Operation Name

Delete Document

Function Overview

Delete documents stored in Microsoft Azure Cosmos DB collection.

Properties

For details on use of variables, refer to "Variables".
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
  • [Add]:
    Add a new global resource.
  • [Edit list]:
    Global resource settings can be edited in “Edit resource list” screen.
 
Collection Required Available Select or enter a collection name to be read.  
Delete conditions Required Available Enter conditions to identify the document to be deleted.
  • Enter the where clause of SQL. For example, when targeting documents where the age of person is 21 from the person collection, enter “person.age = 21”.
Property actions
Item name Description Remarks
Update collection list Get collections from the specified destination and set them in [Collection].  
Test execution Test execute the SQL statement with the specified delete conditions.
  • Disabled when [Destination], [Collection], or [Delete conditions] is not specified.
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input schema

None.

Output schema

None.

Mass Data Processing

Mass data processing is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
count The number of documents deleted is stored.
  • Default value is null.
message_category When an error occurs, category of the corresponding message code is stored.
  • Default value is null.
message_code When an error occurs, code of the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, severity of the corresponding message code is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type would be in the following format.
    Example: “java.io.FileNotFoundException”
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the error message is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, trace information of the error is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification Limits

For details on specification limits common to the operations, refer to ”Microsoft Azure Cosmos DB Adapter Limitations”.

Major Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name: []
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition is not found. Name: [<global resource name>]
The resource definition specified in [Destination] is not found. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<property name> is not specified.
[<property name>] is not specified. Specify [<property name>].
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] is not found. Check [Database] of the global resource specified in [Destination].
CollectionNotFoundException
Collection [<collection>] is not found.
The collection specified in [Collection] is not found. Check the collection specified in [Collection].

Notes