Iterate Tables (ModelBuilder)

Summary

Iterates over tables in a workspace.

Learn how Iterate Tables works in ModelBuilder

Usage

  • This tool is only available from ModelBuilder for use in models. The tool is not available from the Geoprocessing pane or from Python.

  • The first table identified by the tool is used as a template for the output Table parameter. The tool reads information from this table, including the fields and the full path to the table. This allows for the selection of fields in the parameters of subsequent tools when initially setting up the model workflow. When the model is first run, the tool will use the information from the first table, and on subsequent runs, each table is individually read and the information is sent to the next tool.

  • The tool has two outputs, Table and Name, that can be used as inline variables (for example, %Name%) in other tools.

  • The tool works with many tabular file formats, including Excel files, and comma-delimited text files (.csv and .txt).

Parameters

LabelExplanationData Type
Workspace

A workspace containing the tables to iterate.

Workspace
Wildcard
(Optional)

A combination of * and characters that help to limit the results. The asterisk is the same as specifying ALL. If no wildcard is specified, all inputs will be returned. You can use this parameter to restrict iteration over input names starting with a certain character or word (for example, A* or Ari* or Land* and so on).

String
Table Type
(Optional)

Specifies the table type for folder workspaces (shapefiles and coverages).

  • dBASE (shapefiles)The table type will be dBASE tables (shapefiles).
  • INFO (coverages)The table type will be INFO tables (coverages).
String
Recursive
(Optional)

Specifies whether subfolders in the main folder will be iterated recursively.

  • Checked—All subfolders in the main folder will be iterated recursively.
  • Unchecked—Subfolders in the main folder will not be iterated recursively. Only the main folder will be used.
Boolean

Derived Output

LabelExplanationData Type
Table

The full path to the table.

Table
Name

The name of the table.

String

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics