'Getting Spectrum Scan Error code 15007 on select query on redshift external table
I have created a external table in redshift spectrum.Upon running the select * from table_name, i am getting following error
SQL Error [XX000]: ERROR: Spectrum Scan Error
Detail:
-----------------------------------------------
error: Spectrum Scan Error
code: 15007
context: Forbidden: HTTP response error code: 403 Message: AccessDenied Access Denied
Please let me know what can be issue. I am able to do aws s3 ls and aws s3 cp command on same s3 location.
Solution 1:[1]
In my case at least, the fix for this exact error was to allow the Redshift IAM role to decrypt using the KMS key on the S3 bucket.
Solution 2:[2]
Spectrum scan error you get when there is discrepancy in source columns data type and destination column data types, for that you have to change data types according to Redshift's standard data type format.
For checking errors you can refer this query-
Select * from SVL_S3LOG where query = 'Query_id needs to be placed here'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Curly |
Solution 2 | Ashutosh Sharma |