Table and column naming
When writing table and column names to data warehouses, databases, and cloud storage using Bulk Syncs, Polytomic emulates a naming convention that is common when specifying database schemas: the only valid characters are alphanumeric and underscore characters with consistent casing (lowercase except for Snowflake which employs uppercase as a convention).
The source name is thus converted to match the above rule:
- The source name is lowercased (except when writing to Snowflake where it's uppercased to follow Snowflake convention).
- Separate words in the source name are concatenated with an underscore. For example:
LoginID
,loginID
,Login ID
all becomelogin_id
in your destination. However,loginid
remains unchanged because there are no indicators of there being multiple words. - Multiple underscores are replaced with a single underscore. For example:
custom_salesforce_value__c
becomescustom_salesforce_value_c
. - All non-alphanumeric sequences are replaced with a single underscore. For example:
From field
becomesfrom_field
.
Resolving name collisions
What if two names normalize to the same one? For example, per the above rules, login_id
and login__id
should both normalize to login_id
. In this case, to avoid name collisions Polytomic will append underscores to the colliding name until it becomes unique. Thus in this example, login__id
will become login_id_
.
Updated 9 days ago