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.
First, drag and drop the Input Data Tool, and select the CustWithoutDate text file from the configuration tab.
If you look at the text file’s metadata, all the columns are of string type, and the size is 254.
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.
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.
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.
For further verification, we unchecked the Income and Sales columns.
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).