Delete Document

Operation Name

Delete Document

Function Overview

Deletes data stored in collection.

Properties

For information about using 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 setting
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    Enables to edit the global resource settings in the "Edit resource list".
 
Collection name Required Available Enter or select the targeted collection name.
Query selector Required Available Enter a query selector to issue to the database.
  • Enter a query selector of remove command.
  • If only {} is entered, all documents will be deleted.
Property action
Item name Description Remarks
Update collection name list Shows the collection name list that exists in the destination specified in [Destination].
  • If [Destination] is selected, it is enabled.
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.

Loading Schema in Mapper

Schema is loaded automatically.
For details, refer to "Edit schema".

PSP usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
delete_count Stores the number of deleted data.
  • Default value is null.
  • Value is not stored in PSP.
message_category Stores the category of message code corresponding to the occurred error.
  • Default value is null.
message_code Stores the code of message code corresponding to the occurred error.
  • Default value is null.
message_level Stores the severity of message code corresponding to the occurred error.
  • Default value is null.
error_type Stores the error type of occurred error.
  • Default value is null.
  • Error is represented in the format depicted below.
    Example: “java.io.FileNotFoundException”
  • The value may vary depending on the DataSpider Servista version.
error_message Stores the error message of occurred error.
  • Default value is null.
  • The value may vary depending on the DataSpider Servista version.
error_trace Stores the trace information of occurred error.
  • Default value is null.
  • The value may vary depending on the DataSpider Servista version or the client application used.

Main Exceptions

Exception name Cause Solution
ResourceNotFoundException
Enter the destination.
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource is not defined. Name:[<Global resource name>]
Resource definition selected in [Destination] is not found. Check the global resource specified in [Destination].
MongoTimeOutException
'Authentication failed.'
There is something wrong with the user name or the password of the global resource specified in [Destination], or the user does not have permission. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException
Enter collection name.
[Collection name] is not specified. Specify [Collection name].
com.mongodb.util.JSONParseException There is something wrong with [Query selector]. Check the syntax of [Query selector].