Alteryx Auto Field

The Alteryx Auto Field tool helps change selected columns’ data type and size. The Alteryx Auto Field automatically alters each string column’s data type and sets the size to the smallest possible 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 automate the process. To demonstrate this Alteryx Auto Field, we used the CustWithoutDate.text.

Text File 1

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

Drag the Input Data Field 2

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

View text File Metadata 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

You can see all the input columns within the Alteryx Auto Field Configuration tab. 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 is converted to Byte, Income to an integer, and Sales to Double. As a result, 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.

uncheck few columns 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