Working with incomplete derived data

ModelBuilder is engineered with intelligence to know how tools will change data before the tool is executed. This behavior is necessary to be able to continue building a workflow after including some tool that alters data. The best illustration of this behavior involves using the Add Field and Calculate Field tools, as illustrated below. If a new field is added using the Add Field tool, the output variable of the Add Field tool will be updated to contain the new field. When the Calculate Field tool is opened, it will see the new field, even though the Add Field tool has not yet been executed. This is necessary to allow the other parameters of the Calculate Field tool to be specified, and the model workflow continued without first executing the Add Field tool.

Example of what is not an incomplete derived data

While ModelBuilder has the ability to read what changes most tools will make to data before the tool is executed, there are some tools where ModelBuilder cannot see the derived data or values the tool will create. In these cases, the derived output data cannot be updated to include those changes before execution. Such data is considered incomplete derived data.

Using incomplete derived data

When some process creates incomplete derived data, but it is necessary to use this derived data as input to another process, there are two possible options to work around this limitation:

  1. Type in a value—If the specific changes missing in the incomplete derived data are known, values can be manually entered into a parameter in the tool dialog box.
  2. Run a process—In ModelBuilder, the process that creates incomplete derived data can be run individually. After the process has been executed, the derived data will complete.

Type in a value

The Create Table tool adds the field Field1 to the new table, but this new field will not appear in the list of fields that can be deleted using the Delete Field tool; the Create Table tool creates incomplete derived data. Ultimately, Field1 must be deleted from the table, but it is not included in the automatically generated list of fields that can be deleted from the table.

Steps:
  1. Since Field1 is known to exist in the table after the Create Table tool is executed, add Field1 manually to the list of fields to be deleted using the Add Field button in the Delete Field tool dialog box.
    Type in a value
  2. After adding Field1 to the list of fields to delete, a warning will be raised that Field1 does not exist. This warning can be ignored, since by the time the Delete Field tool is executed, Field1 will exist.
    Delete field warning
  3. Not all tool dialog boxes allow fields or values to be manually added; some may allow fields or values to be typed in but will return an error instead of a warning (errors cannot be ignored, and the tool will not be able to execute). If the Type in a value process does not work, use the Run a process method.

Run a process

Steps:
  1. In ModelBuilder, you can run individual processes by selecting the tool, right-clicking, and clicking Run.
  2. Once a process is run, the derived data elements are always updated to contain the results of the process. When all the tools prior to the Delete Field tool are run, the list of fields that can be deleted from the new table will be updated with all fields, including Field1.
    Run a process

Some tools that create incomplete derived data

The Import From Interchange File tool reads an interchange file (.e00 file) containing the coverage data. This tool cannot determine any of the output dataset field names, their attributes, or the geometry type until the tool is executed. Many of the other tools in the Conversion toolbox will also create incomplete derived data.

All script tools will output incomplete derived data, unless the script tool has been programmed with a Tool Validator class to update the definition of the derived data variable. To learn more, see Customizing script tool behavior.

The Split tool, which creates new feature classes in a workspace, does not know the number or names of feature classes that will be created until the tool executes; this is considered incomplete derived data.

The Create Table tool, which automatically adds certain fields depending on the type of table output (geodatabase, .dbf, or INFO), does not know the names of the fields the tool will add until the tool executes; this is considered incomplete derived data.

10/29/2012