AWS prescriptive-guidance high security documentation change
Summary
Updated Python version reference from 2.7 to generic Python and corrected function name
Security assessment
Removing reference to Python 2.7 addresses security risks associated with using an outdated, unsupported version with known vulnerabilities.
Diff
diff --git a/prescriptive-guidance/latest/patterns/set-up-language-specific-sorting-for-amazon-redshift-query-results-using-a-scalar-python-udf.md b/prescriptive-guidance/latest/patterns/set-up-language-specific-sorting-for-amazon-redshift-query-results-using-a-scalar-python-udf.md index 3d757bc55..83b2f7753 100644 --- a//prescriptive-guidance/latest/patterns/set-up-language-specific-sorting-for-amazon-redshift-query-results-using-a-scalar-python-udf.md +++ b//prescriptive-guidance/latest/patterns/set-up-language-specific-sorting-for-amazon-redshift-query-results-using-a-scalar-python-udf.md @@ -5 +5 @@ -SummaryPrerequisites and limitationsArchitectureToolsEpicsRelated resourcesAdditional information +SummaryPrerequisites and limitationsToolsEpicsRelated resourcesAdditional information @@ -13 +13 @@ SummaryPrerequisites and limitationsArchitectureToolsEpicsRelated resourcesAddit -This pattern provides steps and sample code for using a scalar Python UDF (user-defined function) to set up case insensitive linguistic sorting for Amazon Redshift query results. It’s necessary to use a scalar Python UDF because Amazon Redshift returns results based on binary UTF-8 ordering and doesn’t support language-specific sorting. A Python UDF is non-SQL processing code that’s based on a Python 2.7 program and runs in a data warehouse. You can run Python UDF code with a SQL statement in a single query. For more information, see the [Introduction to Python UDFs in Amazon Redshift](https://aws.amazon.com/blogs/big-data/introduction-to-python-udfs-in-amazon-redshift/) AWS Big Data Blog post. +This pattern provides steps and sample code for using a scalar Python UDF (user-defined function) to set up case insensitive linguistic sorting for Amazon Redshift query results. It’s necessary to use a scalar Python UDF because Amazon Redshift returns results based on binary UTF-8 ordering and doesn’t support language-specific sorting. A Python UDF is non-SQL processing code that’s based on a Python program and runs in a data warehouse. You can run Python UDF code with a SQL statement in a single query. For more information, see the [Introduction to Python UDFs in Amazon Redshift](https://aws.amazon.com/blogs/big-data/introduction-to-python-udfs-in-amazon-redshift/) AWS Big Data Blog post. @@ -21 +21 @@ The sample data in this pattern is based on the Turkish alphabet for demonstrati - * Amazon Redshift [cluster](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) with a database, schema, and tables + * [Amazon Redshift cluster](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) with a database, schema, and tables @@ -23 +23 @@ The sample data in this pattern is based on the Turkish alphabet for demonstrati - * Amazon Redshift [user](https://docs.aws.amazon.com/redshift/latest/dg/r_Users.html) with CREATE TABLE and CREATE FUNCTION permissions + * [Amazon Redshift user](https://docs.aws.amazon.com/redshift/latest/dg/r_Users.html) with `CREATE TABLE` and `CREATE FUNCTION` permissions @@ -34,11 +33,0 @@ The linguistic sorting used by the queries in this pattern is case insensitive. -## Architecture - -**Technology stack** - - * Amazon Redshift - - * Python UDF - - - - @@ -155 +144 @@ Query the sample data.| To query the sample data by using the Python UDF, run th - SELECT first_name FROM my_table ORDER BY collate_order(first_name); + SELECT first_name FROM my_table ORDER BY collate_sort(first_name);