Why Did My Schema Data Type Change From INTEGER to NVARCHAR?
Question
My column's data originally appeared in the destination as an INTEGER data type. However, when the API began to return values that included alphabetical characters, the schema data was updated from an INTEGER to NVARCHER data type. Why did the data type change, and will it convert back to NVARCHAR?
Environment
All destinations
Answer
Fivetran has a defined subtype-supertype relationship among the data types. The NVARCHAR data type is similar to STRING, one of the largest data types in our hierarchy. See Microsoft's NVARCHAR documentation for more information on the comparison.
When data is assigned a higher data type, we will not revert to a lower one. Since STRING is a higher data type than INTEGER, data initially appearing as an INTEGER data type but now appearing as an NVARCHAR data type will not revert to INTEGER.
However, you can correct the data type by dropping and re-syncing the applicable table.