awslabs / amazon-redshift-utils

Amazon Redshift Utils contains utilities, scripts and view which are useful in a Redshift environment
Apache License 2.0
2.76k stars 1.25k forks source link

v_generate_external_tbl_ddl generates invalid ddl #717

Open hellekin08 opened 5 months ago

hellekin08 commented 5 months ago

Hi,

we are currently migrating some external tables into a new database and rely on the admin view v_generate_external_tbl_ddl to reconstruct the DDL. However, in some cases it seems that the view generates faulty SQL statements. We do not know when this happens but it might be related to complex data types like arrays / structs.

Here is an example:

image

In each case we found it seems to be that at least the data type & the closing brackets are missing. Help would be appreciated!

kind regards Maik