Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-redshift: allow changing of table column names #24234

Closed
1 of 2 tasks
Rizxcviii opened this issue Feb 20, 2023 · 3 comments · Fixed by #24272
Closed
1 of 2 tasks

aws-redshift: allow changing of table column names #24234

Rizxcviii opened this issue Feb 20, 2023 · 3 comments · Fixed by #24272
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@Rizxcviii
Copy link
Contributor

Rizxcviii commented Feb 20, 2023

Describe the feature

Currently, the construct is based around the name of a table column being fixed, however redshift enables the user to change the name of the table columns, if needed.

Use Case

If we have an existing column name that is not distinctive enough, further columns added in the future might "clash" with the "meaning" behind the original table column.

Proposed Solution

Possibly by implementing an extra id attribute to the existing Column construct. However this would require a possible refactor to the checking conditions that already exist, due to the name attribute being used currently. This is definitely NOT a critical change, and infra developers could currently alleviate this problem by using the AWS console, and reworking their tables from there.
However, if this is implementable by just a simple addition of an id attribute, then this would be a good step in the right direction I believe for the Redshift Construct.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.56.0

Environment details (OS name and version, etc.)

Amazon Linux 2

@Rizxcviii Rizxcviii added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 20, 2023
@github-actions github-actions bot added the @aws-cdk/aws-redshift Related to Amazon Redshift label Feb 20, 2023
@pahud pahud self-assigned this Feb 21, 2023
@pahud pahud added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Feb 21, 2023
@pahud
Copy link
Contributor

pahud commented Feb 21, 2023

Thank you. Is this related to #20495 ?

I am making it as p2 and any PR submission would be appreciated.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 21, 2023
@pahud pahud removed their assignment Feb 21, 2023
@Rizxcviii
Copy link
Contributor Author

Rizxcviii commented Feb 21, 2023

Thank you. Is this related to #20495 ?

I am making it as p2 and any PR submission would be appreciated.

Potentially, if we are able to create a solution that allows ids to be used, then perhaps we can use that to work on the ordering of the columns. My feature request did not have that in mind.

@pahud pahud removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Feb 23, 2023
@mergify mergify bot closed this as completed in #24272 Mar 2, 2023
mergify bot pushed a commit that referenced this issue Mar 2, 2023
…24272)

Adds an `id` attribute to retain tables on changing of the column name. This will essentially fire an `ALTER` statement to rename the column, whilst persisting the id, so columns cannot be dropped.

Closes #24234.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Mar 2, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

homakk pushed a commit to homakk/aws-cdk that referenced this issue Mar 28, 2023
…ws#24272)

Adds an `id` attribute to retain tables on changing of the column name. This will essentially fire an `ALTER` statement to rename the column, whilst persisting the id, so columns cannot be dropped.

Closes aws#24234.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants