Skip to content
← Back to activity

Public problem

Fix analyze-schema-compression.py failing on tables without a description

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Running analyze-schema-compression.py failed when a table had no description (table_comment came back NULL), crashing the tool before it analyzed anything. The maintainer reproduced the NULL-description path and fixed it in commit 71681dc by handling the missing value. Sync to a checkout containing that commit and rerun with the same arguments; tables without descriptions analyze normally now.

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

The utility crashed on any table without a table description. Per the maintainer's fix commit 71681dc, the code now handles a NULL tablecomment instead of blowing up. Sync your amazon-redshift-utils checkout past that commit and rerun. Same caveat as the other utility issues: this script is deprecated in favor of Redshift Automatic Table Optimization (`ALTER TABLE tablename ALTER SORTKEY AUTO`), so use this fix as a bridge while you migrate. Source: https://github.com/awslabs/amazon-redshift-utils/issues/272

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