Name Sanitization
On This Page
To provide a consistent user experience across the Destinations, Hevo uses a Name Sanitization system. This system applies to the names of the tables and columns created in the Hevo ecosystem and encourages the use of a simple, consistent, and readable vocabulary when naming the tables and columns. To achieve this, Hevo removes all non-alphanumeric characters and spaces in a table or column name and replaces them with an underscore.
When are Names Sanitized?
Names are sanitized while mapping a Source Event Type to a table in the Destination using Auto Mapping, or when you try to create a table manually using the Hevo UI. In the latter case, Hevo validates the table name you provide before actually creating the table with that name in the Destination. If the validation fails, a message is displayed on the Hevo UI.
If Name Sanitization is not needed, you can disable it while configuring the Destination. In the case of Amazon Redshift, however, even if this feature is disabled but Auto Mapping is enabled, force sanitization comes into effect.
Name Sanitization in Amazon Redshift
When you select the Sanitize Table or Column Names setting, it is applied based on the Auto Mapping setting as follows:
-
With Auto Mapping enabled: As part of sanitizing the names, Hevo:
-
converts the table name to lowercase,
-
replaces each non-alphanumeric (special) character with an underscore, and
-
removes the trailing underscores
For example, the Source Event Type, Table$namE_05_ is converted to table_name_05, replacing the special character
$
with an underscore and removing the trailing underscore. The same conventions apply to column names. -
-
With manually created tables:
Hevo converts the table name to lowercase and does not sanitize it. For example, if you create a table with the name Table$namE_05_, it is converted to table$name_05_. The same conventions apply to column names.
Even when a Redshift Destination is configured with Name Sanitization disabled, Hevo converts the tables and columns names to lowercase. This is because Amazon Redshift does not allow tables and columns names in uppercase by default. Read Amazon Redshift Developer Guide to know more about naming database objects.
Name Sanitization in Google BigQuery
When you select the Sanitize Table or Column Names setting, it is applied based on the Auto Mapping setting as follows:
-
With Auto Mapping enabled: As part of sanitizing the names, Hevo:
-
converts the table name to lowercase,
-
replaces each non-alphanumeric (special) character with an underscore, and
-
removes the trailing underscores.
For example, the Source Event Type, Table$namE_05_ is converted to table_name_05, replacing the special character
$
with an underscore and removing the trailing underscore. The same conventions apply to column names. -
-
With manually created tables:
According to the Google BigQuery reference guide for naming tables, it is not possible to create a table name with special characters. Hevo prompts with an error message if a table name with special characters such as, Table$n@mE_05_, is provided manually on the Hevo UI. However, you can name your tables with uppercase characters and trailing underscores. The same conventions apply to column names.
Name Sanitization in Database Destinations
The following conventions are applicable for database Destinations such as MySQL, PostgreSQL, MS SQL Server, and Amazon Aurora MySQL.
-
With Auto Mapping enabled: As part of sanitizing the names, Hevo:
-
converts the table name to lowercase,
-
replaces each non-alphanumeric (special) character with an underscore, and
-
removes the trailing underscores.
For example, the Source Event Type, Table$namE_05_ is converted to table_name_05, replacing the special character ‘$’ with an underscore and removing the trailing underscore. The same conventions apply to column names.
-
-
With manually created tables:
Hevo converts the table name to lowercase. For example, if you create a table with the name Table$namE_05_, it is converted to table$name_05_. The same conventions apply to column names.
What Happens to Field Separators and Delimiters?
If a period (.) is used as a field separator and Name Sanitization is enabled, then, post-sanitization, the period is replaced by an underscore and the name is read as two words by Hevo. For example, first.list is changed to first_list and is read as two words, first and list by Hevo. This is an important consideration for deciding the table name compression strategy.
If Name Sanitization is disabled, first.list is read as one word since the compression strategy does not recognize the period (.) as a separator.
The same conventions apply to other field separators and delimiters.
Revision History
Refer to the following table for the list of key updates made to this page:
Date | Release | Description of Change |
---|---|---|
Dec-19-2022 | 2.04 | Removed section, Name Sanitization in Snowflake as table and column names are not sanitized for Snowflake Destinations now. |