awslabs / awslabs/amazon-redshift-utils
Issues with v_generate_tbl_ddl.sql
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hello everyone,
Thank you in advance for your help.
This script is incredibly useful and I've used it many times. However, I encountered a problem and I still couldn't understand how to solve it as the query is quite complex.
I made a data model for the DDL of my entire Redshift DW and most of the tables have a correct ddl. But for some of them I have the current ddl (table creation and comments) but also the older instructions. Instead of having a single table creation with comments, I have the current query as well as the oldest table update.
**Is there any chance that the problem lies in the fact that the sql script is retrieving the entire history of DDL's instead of just the most recent one? Maybe the timestamp range which is chosen...**
Hope you guys can help me. I am not yet an expert on Redshift.
Contributor guide
Research direction
Read v_generate_tbl_ddl.sql first, focusing on how it selects DDL history and applies its timestamp range. Reproduce the duplicate current and older statements against the affected Redshift tables; done means each table yields only its latest CREATE TABLE statement and comments.
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
- 25/100