Infinite
Infinite

Reputation: 764

Unable to select data from AWS Athena table

I have created a table in Athena using below SQL

CREATE EXTERNAL TABLE IF NOT EXISTS xyzschema.my_table (
  `col1` string,
  `col2` string
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
  'serialization.format' = ',',
  'field.delim' = ','
) LOCATION 's3://temp/my_table_data/'
TBLPROPERTIES ('has_encrypted_data'='false'); 

Post creation of table when I try to query from the table

select 'col1' from "my_table"

I am getting the following error , not really sure what permission is missing

Your query has the following error(s):

Insufficient permissions to execute the query. Principal does not have any privilege on specified resource

If I run the following

select * from "gleif_data_master_csv"

I get the below error

SYNTAX_ERROR: line 1:8: SELECT * not allowed in queries without FROM clause

Any suggestions/ideas why this is breaking ?

Upvotes: 0

Views: 3328

Answers (1)

Theo
Theo

Reputation: 132972

Insufficient permissions to execute the query. Principal does not have any privilege on specified resource

This is a Lake Formation permissions error – the table you are querying is part of a catalog managed by Lake Formation. Look in that service for what permissions your user ("principal" in AWS speak) is allowed to do.

Upvotes: 3

Related Questions