This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.

Tool Mastery | Auto Field

This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Auto Field Tool on our way to mastering the Alteryx Designer:

The Auto Field Tool: a tool so easy you don’t have to do anything – just put it on your canvas and viola. Automatically optimized data types. If you’re running into data type related issues and errors in your workflows, or just looking to add some speed or reduce the occupied disk space your data is hoarding – look no further than the Preparation Tool Category’s Auto Field Tool, which reads through all the records of an input and sets the field type to the smallest possible size relative to the data contained within the column. Use it to:

Our best guess is that you were performing formula logic on a data type thinking it was a different type than what it's currently captured in the Designer as. Since the Auto Field Tool is pretty good at guessing the most intuitive types to each column in a data set, use it to effortlessly update those types and move on with the rest of your analyses!

If you're more old school, or you just prefer to keep the data type as in, feel free to work around these quick data type changes in your formula with the tostring() and tonumber() conversion functions.

Before writing to database to optimize table size and field types:

Simply add the Auto Field Tool just before you write to your output - it will reduce the size of your table to Alteryx's automatically assigned most efficient data types. Your database administrator will thank you later!

If the Auto Field Tool is just too easy for you - be sure to check out the Select Tool to assign your own data types with more detail! You can master it here.

By now, you should have expert-level proficiency with the Auto Field Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

Stay tuned with our latest posts every #ToolTuesday by following @alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.

I am unsure about the usefulness of Auto field in reusable workflows - where the input data will be refreshed on a regular basis. If we have a select tool after the Auto field, I have noticed that at times the Select tool keep sticking to the length that was passed on to it by Auto field in the first execution. This results in truncation on subsequent runs if the string length of data has increased.