<GENERATED-DATA> - Intergraph I-Data Integrator - Help - Hexagon

Smart Isometrics I-Data Integrator Help

Language
English
Product
Intergraph I-Data Integrator
Search by Category
Help
I-Data Integrator Version
8.0(2019)

Defines new recordsets that are to be derived from any External and Isogen recordsets, as well as from any previously defined generated recordsets.

The <GENERATED-DATA> section can contain any number of <DEFINE-RECORDSET>, <EXECUTE-SCRIPT>, and <EXECUTE-SQL> tags. Each <DEFINE-RECORDSET> tag contains a SQL statement that defines the contents of the new recordset, each <EXECUTE-SCRIPT> tag contains a definition of a VBScript file to execute, and each <EXECUTE-SQL> tag contains a SQL statement to be run in the intermediate database. This section is processed after the EXTERNAL-DATA section.

  • The <DEFINE-RECORDSET>, <EXECUTE-SCRIPT>, and <EXECUTE-SQL> tags are executed in the order in which they appear in the <GENERATED-DATA> section.

  • By default, the software outputs all <GENERATED-DATA> recordsets. You can use the <OUTPUT-CONTROLS> section to modify this behavior.

<DEFINE-RECORDSET>

<DEFINE-RECORDSET NAME='NEW-MATERIALS"
SQL="SELECT MATERIALS."
FROM [MATERIALS];"/>

Each <DEFINE-RECORDSET> tag contains two attributes.

  • NAME defines the name for the new generated recordset.

  • SQL defines the SQL statement that is executed to populate the generated recordset. The SQL statement can reference any Isogen recordset, any external recordset, or any previously declared generated recordset. In the example above, a new recordset called NEW-MATERIALS is being defined by selecting everything from the Isogen-generated recordset called MATERIALS.

  • For information about the basic principles of SQL syntax, see Appendix: Basic SQL Syntax.

  • Your SQL statement from the XML configuration file is stored in an Access query in the temporary database.

  • Typically, you can have a series of <GENERATE-RECORDSET> tags that reference previously generated recordsets to gradually build up the required output over several queries.

<EXECUTE-SCRIPT>

<EXECUTE-SCRIPT SCRIPT-FILE='path to a script' SCRIPT='script to execute'
PARAMETERS='script parameters' />

Each <EXECUTE-SCRIPT> tag contains three attributes to define a script that is executed against the current dataset. Two of the attributes are mandatory, and one is optional.

  • SCRIPT-FILE specifies the path to the text file containing script(s), such as 'c:\scripts\script1.vbs'. This attribute is mandatory.

  • SCRIPT specifies the script within the file to execute. This must correspond to the name of a public function in the text file. This attribute is mandatory.

  • PARAMETERS specifies the comma-separated list of parameters to be passed to the script. This list must correspond to the argument list of the script being executed. This attribute is optional.

<EXECUTE-SQL>

Each <EXECUTE-SQL> tag contains a mandatory sub-tag called <SQL>, which holds a SQL action statement to be run directly in the temporary database. Any valid SQL action statement can be put in the <SQL> tag. Although only linked or original tables can be affected, other generated recordsets can be referred to within the tag. This allows table creation and editing and appending data to existing tables.

It also can have two attributes, NAME and ON-ERROR. Setting ON-ERROR to CONTINUE, allows the software to continue with its Generate step, even if the SQL action fails.