Auto Field | Alteryx Tools Explained

by Harry Osborne

The Auto Field tool bypasses a potentially tedious task and automates the process of resizing fields to their smallest possible length and size, relative to the data presently found within that field/column.

This can help with resizing multiple fields at once (particularly in large, computationally heavy datasets), streamlining your data and speeding up workflows.

For example, if you have these fields pictured:

A screenshot of the metadata, including field size and type

There are two fields (State and City) that are both strings and of a significant size, even though they probably contain strings smaller than 254 characters. To reduce the size of these fields, simply use the Auto Field tool (the configuration is very simple, just involved selecting the correct fields), and they will be resized. In this example, the tool reduced the fields' sizes in the output to 20 and 57 characters respectively:

Resized fields (note that Population was not affected, being a Double)

This tool can also modify fields that are originally strings and turn them to numeric fields. For example, importing CSV files into Alteryx nearly always means you will end up with V_String data types; Auto Field will look through these fields, and change the data type to the most appropriate numeric (bytes for single digits, doubles for decimals etc.).

Whilst this tool can definitely improve the performance of larger datasets, there is a downside as well. If you have a particularly lengthly workflow, or many instances of Auto Field, this tool can potentially slow down your workflow's running speed, something which could have knock-on effects on scheduled refreshes (on Alteryx Server, for example), or just even in the daily running/troubleshooting of local workflows. As such, this tool should be reserved for cases where these factors won't be a prevailing issue, or can be managed given the potential benefits gained.

It is also worth considering at what point you use this tool: for example, if you make changes to any individual cells/fields downstream (e.g. changing string inputs/lengths through Formula tools), the Auto Field tool might impact their functionality downstream - another point worth considering.