
In Teradata, based on the session mode, the default CHAR and VARCHAR columns collation changes.


AWS ATHENA REDSHIFT HOW TO
In the following use case, we discuss how to convert a legacy Teradata database’s collation syntax to Amazon Redshift syntax. Select * from T1 where collate(col1, 'case_insensitive') = 'john' Solution overview To create a database with collation in Amazon Redshift, use the following syntax: If you don’t specify collation for a new database, the default collation continues to be the current semantic of case-sensitive. All VARCHAR and CHAR columns in the current database pick up the database-level collation as default if no column-level override exists. You can specify collation when creating a new database. Different operations such as LIKE predicates, group by, order by, Regex, similar to behave based on the collation defined while the stored data keeps its original case. For example, in case-insensitive collation, “A” and “a” are equal. A case-insensitive collation ignores the differences between uppercase and lowercase letters for string comparison and sorting, whereas a case-sensitive collation does not. What is collation?Ĭollation is a set of rules that tells a database engine how to compare and sort the CHAR and VARCHAR columns data in SQL. Also, we specifically explain the process to migrate your existing Teradata database using the native Amazon Redshift collation capability. In this post, we discuss how to use case-insensitive collation and how to override the default collation.

With that goal in mind, AWS provides an option to create case-insensitive and case-sensitive collation. We hear from customers that they need case-insensitive collation for strings in Amazon Redshift in order to maintain the same functionality and meet their performance goals when they migrate their existing workloads from legacy, on-premises data warehouses like Teradata, Oracle, or IBM. Tens of thousands of customers have successfully migrated their workloads to Amazon Redshift. Amazon Redshift is a fast, fully managed, cloud-native data warehouse.
