When you import your data in Trifacta, the application infers the data type of the columns based on the values in the column. As you build out the recipe, Trifacta will continue to re-infer the column data types as transformations affect the column, allowing you to continuously identify outliers and mismatches in your data as you build the recipe.
In certain cases, the data inference may not have enough examples to assign the desired type and you might need to change the column’s data type using the 'Change Data Type' option in the Transformer.
However, if additional recipe steps are added after setting the data type, the tool's re-inference may become counterproductive.
Lock/Unlock Column Data Type
A new feature has been introduced to Lock or Unlock the data type of a column, allowing you to set it once and iterate on the recipe without constantly resetting the data types. This feature allows users to lock a column's data type, which prevents the column’s data type from being re-inferred after subsequent transformations.
Unlocking reverses the Lock on a column's data type.
Starting in release v9.2, the column data type is locked by default when you change the column data type.
How to Lock a Column's Data Type
A column’s data type can be set and locked at various points within a recipe or within the dataset object.
a) In the Transformer, search for 'Change Column Type' transform
In the Transform Builder, you can check the box to 'Lock the column type...' which initiates a lock on the specified columns, indicated by a lock icon.
You can lock multiple column data types at once using the ‘Lock column type’ recipe task. All the newly added Change Column Type Transform steps will default to locked.
b) Change Column Data Type from the column header also automatically initiates a lock
How to Unlock a Column's Data Type
a) In the Transformer, search for 'Unlock column type' transform
In the Transform Builder, specify the column name to be unlocked. This reverses the effects of locking and removes the lock icon from against the column data type.
b) In the column data type dropdown, select the option 'Automatically Update'
This unlocks the column data type and adds a relevant step in the recipe
More Info
To learn more about locking and unlocking Column data types, read this detailed documentation article