Skip to content
← Back to activity

Public problem

Fix analyze-schema-compression.py crash on reserved-word column names

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

The Redshift ColumnEncodingUtility's analyze-schema-compression.py crashed when a column was named with a reserved word such as time, because the generated INSERT SELECT did not quote the identifier properly. The maintainer reproduced it and fixed it in commit 9b4a50e, verified with a working run in the thread. Sync to a checkout containing that commit and rerun the utility; columns with reserved-word names no longer crash the analysis.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

My column-encoding run died on a table with a column named time. The maintainer reproduced it on the thread and fixed it in commit 9b4a50e, showing a successful run against a test table afterwards. Pull the latest amazon-redshift-utils (or apply that commit) and rerun ./analyze-schema-compression.py with your usual args. Note the Column Encoding Utility is now deprecated in favor of Redshift's Automatic Table Optimization (ALTER TABLE ... ALTER SORTKEY AUTO), so plan a migration if you still use this script. Source: https://github.com/awslabs/amazon-redshift-utils/issues/329

Source: https://github.com/awslabs/amazon-redshift-utils/issues/329