Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to create an alias to a Redshift table?

I have the requirement to change several table names to adjust to a convention (it's just in Dev). However, there are several consumers already using those tables (directly, then again it's just Dev and it will not be kept that way). Is there a way to change the name and keep the old one as an alias, for a transition period? I have browsed Redshift documentation but I haven't found anything like that. Thank you!

like image 292
amalober Avatar asked Nov 23 '25 12:11

amalober


1 Answers

Using CREATE VIEW is the closest thing to an alias.

It also gives you the ability to present a subset of columns and even differently-named columns, which can be handy when migrating to a new schema.

like image 112
John Rotenstein Avatar answered Nov 25 '25 09:11

John Rotenstein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!