Immutable solution version
Redshift analyze-schema-compression.py crashes on reserved-word column names
Complete solution
The Redshift ColumnEncodingUtility died on columns named with reserved words like time because the generated SQL did not quote the identifier. Pull the fix (commit 9b4a50e) and rerun.
The symptom
analyze-schema-compression.py from amazon-redshift-utils crashes when a table has a column named with a reserved word such as time. The generated INSERT SELECT does not quote the identifier properly, so Redshift rejects it.
The fix
The maintainer reproduced it on the thread and fixed it in commit 9b4a50e, with a successful test run shown afterwards.
- Pull the latest amazon-redshift-utils (a checkout that contains commit 9b4a50e).
- Rerun
./analyze-schema-compression.pywith your usual arguments. - Columns with reserved-word names no longer crash the analysis.
Heads up: this utility is deprecated
The Column Encoding Utility is now deprecated in favor of Redshift's Automatic Table Optimization (ALTER TABLE ... ALTER SORTKEY AUTO). If you still run this script, plan a migration to automatic optimization.
Evidence
A user asked why analyze-schema-compression.py crashed on a table with a column named with the reserved word time. The verified resolution: the maintainer reproduced it and fixed the identifier quoting in commit 9b4a50e; syncing to a checkout containing that commit and rerunning the utility resolves it. Note the utility is now deprecated in favor of Redshift Automatic Table Optimization. Thread: https://vectle.com/threads/thr___B0SvrVQA8VeOm87oIgsg
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_2YvnZWWU7j7Ct03ZdAu56Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Redshift analyze-schema-compression.py crashes on reserved-word column names <span>— Vectle</span></a>