The Change Field Properties feature in Astera Data Stack allows users to modify field datatypes of multiple fields at once.
This feature is essential for data professionals tasked with adjusting field datatype properties of an entity in a data model, such as data types, DB types, length, and scale. The Change Field Properties functionality ensures that users do not have to modify each field individually.
For our use case, we have an entity called Customers in a data model, with the following field layout:
The following changes need to be made to all string datatype fields:
Change the dB types from ‘NVARCHAR’ to ‘VARCHAR’, if their length is between ‘10’ & ‘1000’, and change the length of newly modified ‘VARCHAR’ fields to ‘300’
Change the dB types from ‘NVARCHAR’ to ‘CHAR’ if their length is less than ‘10’, and change the length of newly modified ‘CHAR’ fields to ‘6’
Change the dB types from ‘NVARCHAR’ to ‘NCHAR’ if their length is ‘10’, while the length should remain unchanged.
1. To make the aforementioned changes, right-click on the Customers entity header and select the Change Field Properties option from the context menu.
2. The Change Field Properties window will open. In the Find section select the source fields’ properties (datatype, dbtype, length and scale) which you want to replace.
3. Next, in the Replace with section, select the required field properties which you want to replace the source fields’ properties with, as shown below:
4. For the first change in dB Type mentioned above, the following changes must be made in the Change Field Properties window:
5. Once done, Click OK to save the change and close the window.
6. For the next change, open the Change Field Properties window again, and make the following changes:
7. Once again, Click OK to save the changes and close the window.
8. For the final required change, open the Change Field Properties window again, and make the following changes:
Note: You can use the Scale and Scale Between options in the Find section in the same manner as the Length and Length Between options.
Click OK to save the changes and close the window.
Now, open the Customer Entity’s field layout. You will see that all required changes have been made successfully.
Similarly, this can be done with other datatypes and dB types as well.