awslabs / awslabs/amazon-redshift-utils
v_generate_external_tbl_ddl generates invalid ddl
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
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:
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
Contributor guide
Research direction
Start by inspecting the admin view v_generate_external_tbl_ddl and reproduce the report with external tables that use complex types such as arrays or structs. Compare its generated statements with valid DDL, focusing on missing data types and closing brackets. Done means the view consistently emits executable DDL for the affected cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100