Data Type Customization
Important Notice: Migration of Documentation Website
Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:
Official Snowflake Snowconvert Documentation
For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].
Thank you for your understanding.
Data Type Conversion during a database migration process is something that many users need to personalize and set up precision values more accurately. For this reason, SnowConvert enables the Data Type Customization to specify rules of data type transformation considering data type origin and column name.
Supported Data Types
The following data types are supported
NUMBER
Structure of JSON
SnowConvert receives a JSON file with the following structure.
{
"types" : {
},
"columns": [
{
"nameExpression" : "",
"targetType" : ""
}
]
}The object types defines the origin data type and the data type the target should be. Also, you might define a general rule that converts the origin data type with or without precision.
For Example:
The object columns is an array, and each object of the array defines the name or the regex expression of the columns to change the type.
When using regular expressions customization, the migration could be affected if the regex isn't correct.
Customization Priority
There might be rules of customization that apply to the same object; however, only one will be chosen. SnowConvert will consider the following considerations to prioritize which rule to follow.
The first rule in columns is located from top to bottom.
The rule defined in type considering the precision.
The general rule is defined for Data Type.
The rule is defined in SnowConvert.
Example
Let's say we have the following input code.
Input Code
And the following renaming information
Customization File (.JSON)
This would be the output code with and without customization data types.
Snowflake output code
Notice how all NUMBER types are migrated to the types specified in json file.
Last updated
