Resizing String Columns in the Destination
When, for an Event, the length of an incoming string value in a Source Event Type field is larger than the size of the mapped column in the Destination, Hevo marks the Event as Failed. For Hevo to be able to load the Event in the Destination table, the field needs to be resized.
This can be done very easily with a single click from the Schema Mapper tab.
In the Schema Mapper tab, under options for the Event Type, click on Resize String Fields.
Once this is done, Hevo resizes the required fields in the Destination table. The operation might take some time depending on the number of rows in the affected column(s). Success and failure notifications for the operation are sent to Slack channels (if enabled) and the Activity Log.
How It Works
Hevo compares the length of the longest value encountered for a particular field with the length of the mapped Destination table column. If the latter is found to be shorter, Hevo resizes the column. While selecting the size of the column, Hevo uses the next larger number that is a power of 2. For example, if the maximum length seen till now is 150, then the Destination column is resized to 256.
The existing data is kept intact while resizing the column.
Once the resizing operation is complete, the changes in the Destination table column size reflect in Schema Mapper and failed Events are replayed.
Notes
-
This option is currently available only for Redshift and Snowflake Destination.
-
This option is available only for
varchar
columns. -
If one of the columns to be resized is a key, then the resize operation fails.