The Exit If Data Exist command checks extracted data against previously extracted data and exits a specified container command if it already exists. The Exit If Data Exist command must be added after the capture commands that extract the data that should be checked.
Below screenshot shows the simplest example where the Exit If Data Exist command can be used.
The behavior of the Exit If Data Exist command is very similar to the Remove Duplicate command, but the Exit If Data Exist command uses a list of SHA-256 hashes to determine if data has previously been extracted, while the Remove Duplicate command checks an existing full set of previously extracted data.
The list of SHA-256 hashes used by Exit If Data Exist commands is never deleted automatically but can be deleted manually on the Internal Data Configuration screen.
When an Exit If Data Exist command detects that data has already been extracted, it will exit a specified parent command. By default, an Exit If Data Exist command exits the current list entry of the nearest parent list command or the nearest parent command that exports data to a separate data table.
If the target data is displayed by descending order, then you can use an Exit If Data Exist command to extract only new data by exiting the Agent command when existing data is detected. For example, if the target data is ordered by newest date to oldest date and the Exit If Data Exist command detects that a specific date has already been extracted, then you know that all data after that date has already been extracted and you can exit the agent.
Command Description: A custom description for the command.The default value is Empty.
Command Transformation Script: A script used to change command properties at run time. The default value is disabled.
Disabled: This property set to True allows the user to disable the command. A disabled command will be ignored. The default value is set to False.
ID: This property indicates the internal unique ID of the command and is always auto- generated e.g. 58c8e4ac-e4c0-48f7-a63d-77064945380b.
Increase Data Count: This property indicates the data count every time this command is processed. The default value is set to False. Set it to TRUE if you want to get the count of the number of times a specific command is executed to get the data. The data count value is increased during data extraction, so it is used to measure agent progress and basis this increased data count, the agent decides the success criteria.
Name: This property specifies the name of the command.
Notify On Critical Error: A notification email is sent at the end of an agent run if the command encounters a critical error, and the agent has been configured to notify on critical errors. Critical errors include page load errors and missing required web selections. The default value is set to False.
Debug BreakPoint: Debugging will break at this command if the breakpoint is set. The default value is set to False.
Debug Disabled: A disabled command will be ignored during debugging. The default value is set to False.
Debug Error Option: This property specifies what action to take when an error occurs in the debugger. The default value is set to Notify which indicates that when an error occurs at debugging time , then it will be notified. If we want to ignore the error at debug time, then we need to set this property value as Ignore.
Exit If Data Exist
Allow Recreate Table: Allows the table to be recreated automatically if required.
Capture Commands: Checks the data extracted by the specified capture commands to see if that data has already been extracted.
Check Method: This property specifies the Search Method for Duplicate.
- New Data: Only data extracted in the current agent run is searched.
- Old Data: Only data extracted in the previous agent run is searched.
- Old and New Data: Data extracted in the current agent run and all previous agent runs are searched. This is the default value.
Database Reference: This property specifies the Database Reference. The default value is set to Empty. This will reflect the value which is specified in “Database Connection Name”.
- Database Connection ID: This property specifies the Unique Database Connection ID.
- Database Connection Name: This property specifies the Database Connection Name.
Database Table Name: This property specifies the database table name.
Database Type: The value under the ‘Internal Database’ text area get set according to what specific Database Type value is selected. The default internal database is an SQLite file database, but you can change it to either a SQL Server or MySQL database. Changing the internal database from SQLite to SQL Server or MySQL can increase the performance of agents significantly.
Exit Container: The command to action on.
- Default: Exits from Parent List Entry.
- Agent: Exits from Agent.
- Parent Command: Exit from Parent Command
- Parent List Command: Exit from Parent List Command.
- Parent List Entry: Exit from Parent List Entry.
- Parent Pagination Command: Exit from Parent Pagination Command.
- Specific Command: Exit from a specific command which is specified in a Specific command property value.
- Specific command: A specific command to action on.
Export Enabled: A command with Export Enabled set to false will not save any data to data output. The default value is set to True which indicates that any data will be saved to a data output.