Compare Table Model

Operation Name

Compare Table Model

Function Overview

Compare input table model type data with expected CSV file based on specified conditions.

Data Model

Table model type.

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.  
Input data Required Not available Select a component on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Expected CSV file path Required Available Enter the CSV file path to use as expected value for conditions.

You can click [Browse] button to launch file chooser and find the file.
Value condition Required Not available Select a value condition.
Refer to Value Conditions for more details.
  • For columns where conditions are defined in [Value conditions for specific columns], the conditions will be applied instead of [Value condition].
Column list Required - Specify columns.

Each column can be operated with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the selected column upwards by one row.
  • [Down]:
    Move the selected column downwards by one row.
  • [Delete]:
    Delete the column.
  • Column names set in [Column list] will be displayed in Mapper schema.
Column list/Column name Required Available Enter the column name.

The first row of the file specified in [Expected CSV file path] can be set as column names using [Update column list] property action.
 
Property actions
Item name Description Remarks
Preview Start previewer to view the contents of the file specified in [Expected CSV file path].
  • Disabled when the specified file does not exist or variables are set in [Expected CSV file path].
  • The contents will be displayed with the encoding specified in [Encoding].
  • File contents cannot be edited.
  • The maximum file size that can be displayed in the previewer is 1MB. When the file size exceeds 1MB, the file is displayed up to 1 MB from the beginning of the file.
Update column list Set the first row of the file specified in [Expected CSV file path] as column names.
  • Disabled when the specified file does not exist or variables are set in [Expected CSV file path].
Read column names from first row of file Select the file in file chooser to set the first row of that file as column names.  
Read settings
Item name Required/Optional Use of variables Description Remarks
Encoding Required Available Select or enter the encoding of the file to be read.

When you enter encoding, specify one of the encodings supported in Java SE Runtime Environment 8.
For more details, refer to “Supported Encodings” (http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html).
Do not get first row as value Optional Not available Select whether or not to handle the first row of the specified file as data.
  • [Checked]:
    Do not handle as data.
  • [Not checked]: (default)
    Handle as data.
 
Comparison detail settings
Item name Required/Optional Use of variables Description Remarks
Row condition Required Not available Select a row condition.
Value conditions for specific columns Optional - Select conditions specifying columns.

Each column can be operated with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the selected column upwards by one row.
  • [Down]:
    Move the selected column downwards by one row.
  • [Delete]:
    Delete the column.
 
Value conditions for specific columns/Column name Required Not available Select a column name to apply the condition.
  • The column names set in [Column list] are displayed.
  • When adding or deleting items in [Column list] after configuring this property item, reconfigure this item.
Value conditions for specific columns/Data type Required Not available Select a data type.
Value conditions for specific columns/Value condition Required Not available Select a value condition.
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

The number of columns varies depending on the [Column list] settings.
Refer to “Schema of table model type” for more details.

Output schema

None.

Loading schema in Mapper

Schema is loaded automatically.
Refer to “Edit Schema” for more details.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
message_category When an error occurs, the corresponding message code's category is stored.
  • Default value is null.
message_code When an error occurs, the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, the corresponding message code's severity is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type will 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, the error's trace information is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification Limits

Major Exceptions

Exception name Cause Solution
InvalidPropertyConfigurationException
File path is not entered.
[Expected CSV file path] is not specified. Specify [Expected CSV file path].
FileIsDirectoryException The path entered in [Expected CSV file path] is directory. Enter a file path in [Expected CSV file path].
java.io.FileNotFoundException The file specified in [Expected CSV file path] does not exist. Check [Expected CSV file path].
java.lang.IndexOutOfBoundsException The number of columns of the input table model type data differs from that of [Expected CSV file path]. Make the number of columns of the input table model type data and that of [Expected CSV file path] same.
AssertionException An input value does not match the expected value. Check the error message.