QueryBySQL

The QueryBySQL activity retrieves the entries that match the filter string or criteria specified in the datagrid. Before using the QueryBySQL activity, you must supply a filter string as an argument. This filter specifies the content of the query, that is, criteria for selecting a subset of rows from the datagrid.

Configuration

The following table describes the fields in the Configuration tab of the QueryBySQL activity:

Field Module Property? Description
Name No Specifies the name to be displayed as the label for the activity in the process.
Description No Optional: Specifies a short description of the QueryBySQL activity.
DataGrid Yes Click to select a datagrid.

Rows are stored to the table with the defined fields of the selected datagrid.

Input

In the Input tab, you can specify the SQL command.

The following table describes the field in the Input tab of the QueryBySQL activity:
Input Item Data Type Description
sql String Specifies a SQL query sentence.
Prefetch No Specifies the units of data to be transferred in a row.
Note: If you set a value in the "prefetch" field when you created a DataGrid connection, then the value you provide here overrides that value.
Snapshot Level No Specifies the snapshot level to be displayed for a row in the process. You can select either global snapshot or local snapshot.
Note: If you set a value in the "Global_Snapshot_Required_for_Iterator" field when you created a DataGrid connection, then the value you provide here overrides that value.

Output

In the Output tab, you can find the operation results.

The following table describes the fields in the Output tab of the QueryBySQL activity:

Output Item Data Type Description
Activity output String Specifies the HasError value, the error, the total count, and the rows that match the SQL query. It specifies the error message, the total count, and select fields of rows if the HasError value is true. It specifies the total count of rows and select fields of the rows if the HasError value is false. The ROW element can have multiple Field elements which contains Name, Type, and Value elements.
Note:

The HasError value is true when one or more results have errors.

The HasError value is false when no error occurs.

Error Output

In the Error Output tab, you can find the error code and error message of the QueryBySQL activity. See Error Codes for more detailed explanation of the errors.

The following table describes the errors in the Error Output tab of the QueryBySQL activity:

Error Schema Element Data Type Description
msg String The plug-in error message.
msgCode String The plug-in error code.
MyMessage String The plug-in error message with specific details, where required.