Alteryx Auto Field

The Alteryx Auto Field tool is useful to change the data type and size of selected columns. The Alteryx Auto Field automatically alters each string column’s data type and sets the size to the smallest possible size based on the column data. Generally, we use the Select tool to change the column type and size manually. However, we can use this Auto Field to automates the process. To demonstrate this Alteryx Auto Field, we used the CustWithoutDate.text.

Alteryx Auto Field Example 1

First, drag and drop the Input Data Tool, and select the CustWithoutDate text file from the configuration tab.

Alteryx Auto Field Example 2

If you look at the text file’s metadata, all the columns are of string type, and the size is 254.

Auto Field Example 3

Alteryx Auto Field Tool Example

Please go to the Preparation tab to drag the Auto Field tool to the canvas. Then connect the Input tool to this Auto Field.

auto Field Example 4

Within the Auto Field Configuration tab, you can see all the input columns. Please select the string columns to change the filed types automatically. Here, we selected all the columns and hit the Run button.

Alteryx Auto Field Example 5

If you look at the Metadata, EmpID converted to Byte, Income to an integer, and Sales to Double. Even the size of each column decreases to an appropriate size that can accommodate the data.

Alteryx Auto Field Example 6

For further verification, we unchecked the Income and Sales columns.

Alteryx Auto Field Example 7

As you can see, Alteryx Auto Field changed the data type and the size of all the columns except these two columns (Sales and Income).

Alteryx Auto Field Example 8