Last updated
Last updated
Names identify database objects, including tables and columns, as well as users and passwords. The terms name and identifier can be used interchangeably. There are two types of identifiers, standard identifiers and quoted or delimited identifiers. Identifiers must consist of only UTF-8 printable characters. ASCII letters in standard and delimited identifiers are case-insensitive and are folded to lowercase in the database. ().
Standard SQL identifiers adhere to a set of rules and must:
Begin with an ASCII single-byte alphabetic character or underscore character, or a UTF-8 multibyte character two to four bytes long.
Subsequent characters can be ASCII single-byte alphanumeric characters, underscores, or dollar signs, or UTF-8 multibyte characters two to four bytes long.
Be between 1 and 127 bytes in length, not including quotation marks for delimited identifiers.
Contain no quotation marks and no spaces.
Not be a reserved SQL keyword. ()
This syntax is fully supported by Snowflake.
In Redshift, there is support for using some special characters as part of the name of the identifier. These could be used in any part of an identifier. For this reason, to emulate this behavior, replace these unsupported special characters with a new value valid in Snowflake.
The # character is replaced by a _H_.
For this scenario, please keep in mind that "LATERAL" and "INCREMENT" are reserved words in Snowflake, while "LOCAL" is not a reserved word.
Delimited identifiers (also known as quoted identifiers) begin and end with double quotation marks ("). If you use a delimited identifier, you must use the double quotation marks for every reference to that object. The identifier can contain any standard UTF-8 printable characters other than the double quotation mark itself. Therefore, you can create column or table names that include otherwise illegal characters, such as spaces or the percent symbol. ().
In Redshift, identifiers can be enclosed in quotes and are . However, in Snowflake, they are . For this reason, to emulate this behavior, we are removing the quotes from all identifiers that are enclosed in quotes, are not reserved keywords in Snowflake, and contain alphanumeric characters. in Snowflake will always be enclosed in double quotes and defined in lowercase.
This change could impact the desired behavior if the flag is set to true in your configuration. Future updates will allow users to define the desired transformation for these identifiers.
In Redshift, function names can be enclosed in quotes and are . However, in Snowflake, functions may cause issues if they are in quotes and written in lowercase. For this reason, in Snowflake, any function name enclosed in quotes will always be transformed to uppercase and the quotation marks will be removed.
To work around this limitation, Snowflake provides the session parameter, which causes Snowflake to treat lowercase letters in double-quoted identifiers as uppercase when creating and finding objects.
().
1
20
2
21
3
22
1
20
2
21
3
22
2024-11-21 22:08:53.000000
2024-11-21 22:08:53.000 +0000
Names and identifiers translation for Redshift