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 (coverages).

  • dBASEThe table type will be dBASE tables.
  • INFO (coverages)The table type will be INFO tables (coverages).
  • File geodatabaseThe table type will be file geodatabase tables.
  • ExcelThe table type will be Microsoft Excel tables.
  • Delimited text fileThe table type will be delimited text files. This includes .csv files.
  • SQLiteThe table type will be SQLite tables.
  • Enterprise geodatabaseThe table type will be enterprise geodatabase tables.
  • OLE DBThe table type will be OLE DB connection tables.
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. Keep this parameter checked to enable iterating through multiple file geodatabase tables or SQLite tables in the input workspace.
  • 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