Want to select data on redshift spectrum which was created at Athena?

Want to select data on redshift spectrum which was created at Athena?

steps to reconstruct:

  1. create redshift cluster
  2. login
  3. 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.
  4. 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.

1 thought on “Want to select data on redshift spectrum which was created at Athena?”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s