steps to reconstruct:
- create redshift cluster
- login
- create new external schema called spectrum and reference to the original schema used in Athena: e.g tpch_data. notice XXXXX should be your account number.
- query your data , using the new schema name.
create external schema spectrum
from data catalog
database ‘tpch_data’
iam_role ‘arn:aws:iam::XXXXX:role/mySpectrumRole’
create external database if not exists;
select count(*) from tpch_data.lineitem_parquet; — will not work
select count(*) from spectrum.lineitem_parquet; — will work.
——————————————————————————————————————————
I put a lot of thoughts into these blogs, so I could share the information in a clear and useful way. If you have any comments, thoughts, questions, or you need someone to consult with, feel free to contact me:
1 thought on “Want to select data on redshift spectrum which was created at Athena?”