Naming Conventions for Source Data Entities
Hevo uses a standard set of naming rules for Source schemas, tables, and columns to ensure that they are consistent and compatible across different Destinations. These rules help avoid issues caused by unsupported characters, inconsistent casing, or invalid naming formats, and make it easier to identify and locate the data entities created by Pipelines in your Destination.
Hevo applies the naming rules in the following order:
-
All accent marks, such as acute or grave accents, are removed from characters.
-
Any character that is not a letter (A-Z, a-z), a digit (0-9), or an underscore (_) is replaced with an underscore. Spaces are also replaced with underscores.
-
Strings containing a mix of letters and numbers are split at the point where letters change case or at the transition between letters and digits. Multiple words are joined using underscores. Consecutive uppercase letters are treated as part of the same word.
-
If there are multiple underscores in a row, they are reduced to a single underscore.
-
All uppercase letters are converted to lowercase.
-
If a name starts with a number, an underscore is prepended to avoid starting the name with a digit.
-
For table names, any underscore at the beginning of the name is removed if it is immediately followed by a letter.
Note: Schemas, tables, and columns are named according to these defined rules and then converted as needed based on the Destination’s specific naming conventions. For example, in Snowflake, a table name converted to lowercase will be changed to uppercase due to Snowflake’s default behavior.
The following table lists a few examples of how Hevo applies naming rules to your schema, table, and column names:
| Original Name | Converted Name | Explanation |
|---|---|---|
| Montréal report | montreal_report | Accent marks are removed. |
| first name | first_name | Space is converted to underscore. |
| total$amount | total_amount | Special character $ is replaced with an underscore. |
| data@location | data_location | Special character @ is replaced with an underscore. |
| userName | user_name | Mixed-case letters are split with an underscore at the transition from lowercase to uppercase. |
| user123 | user_123 | Alphanumeric string is split with an underscore at the transition from letters to numbers. |
| user__data | user_data | Multiple underscores are reduced to a single underscore. |
| PRODUCT | product | Uppercase letters are converted to lowercase. |
| 123id | _123id | Name starting with a number is prepended with an underscore. |
| _productTable | productTable | The leading underscore in table names is removed. |