amazon-athena

Athena query fails with boto3 (S3 location invalid)

别等时光非礼了梦想. 提交于 2020-08-24 17:32:09
问题 I'm trying to execute a query in Athena, but it fails. Code: client.start_query_execution(QueryString="CREATE DATABASE IF NOT EXISTS db;", QueryExecutionContext={'Database': 'db'}, ResultConfiguration={ 'OutputLocation': "s3://my-bucket/", 'EncryptionConfiguration': { 'EncryptionOption': 'SSE-S3' } }) But it raises the following exception: botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: The S3 location

Athena query fails with boto3 (S3 location invalid)

流过昼夜 提交于 2020-08-24 17:29:22
问题 I'm trying to execute a query in Athena, but it fails. Code: client.start_query_execution(QueryString="CREATE DATABASE IF NOT EXISTS db;", QueryExecutionContext={'Database': 'db'}, ResultConfiguration={ 'OutputLocation': "s3://my-bucket/", 'EncryptionConfiguration': { 'EncryptionOption': 'SSE-S3' } }) But it raises the following exception: botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: The S3 location

st_contains in athena

主宰稳场 提交于 2020-08-10 19:16:51
问题 the below code should return true but returns false. I tested in google maps and point lies in the polygon. I am not sure what is the issue here. I am running this code in Athena select st_contains (st_polygon( 'POLYGON((54.8163815 24.9474831), (54.9310513 24.8914383), (55.0514856 24.8349286), (55.1170345 24.9527804), (55.1686306 25.0937019), (55.3738202 25.1844963), (55.3676957 25.3050482), (55.2592057 25.3944044), (54.8163815 24.9474831))'),st_point(55.163485,25.092776)) 回答1: Here is the

Tables missing on filesystem in AWS Athena

走远了吗. 提交于 2020-08-08 06:39:05
问题 I've created a table with auto partitioning with this code on Athena. CREATE EXTERNAL TABLE IF NOT EXISTS matchdata.stattable ( `matchResult` string, ... ) PARTITIONED BY ( year int , month int, day int ) ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe' WITH SERDEPROPERTIES ( 'serialization.format' = '1' ) LOCATION 's3://******/data/year=2019/month=8/day=2/' TBLPROPERTIES ('has_encrypted_data'='false'); and I ran MSCK REPAIR TABLE stattable , but got Tables missing on filesystem and

Unable to Create Table in Amazon Athena

吃可爱长大的小学妹 提交于 2020-07-23 10:19:18
问题 I tried creating a table in Athena for my nested json files in s3, but receiving an error: line 1:8: no viable alternative at input 'create external' (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: dcea57c7-b801-41a4-8edb-e42eb1608fea) Table name and fields seem okay, also have attached sample json from my s3 source. Have referred the official documentation of Athena. Also, let me know if and how can I add nested fields from Create Table wizard in

Unable to Create Table in Amazon Athena

久未见 提交于 2020-07-23 10:19:11
问题 I tried creating a table in Athena for my nested json files in s3, but receiving an error: line 1:8: no viable alternative at input 'create external' (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: dcea57c7-b801-41a4-8edb-e42eb1608fea) Table name and fields seem okay, also have attached sample json from my s3 source. Have referred the official documentation of Athena. Also, let me know if and how can I add nested fields from Create Table wizard in

Unable to Create Table in Amazon Athena

痴心易碎 提交于 2020-07-23 10:18:50
问题 I tried creating a table in Athena for my nested json files in s3, but receiving an error: line 1:8: no viable alternative at input 'create external' (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: dcea57c7-b801-41a4-8edb-e42eb1608fea) Table name and fields seem okay, also have attached sample json from my s3 source. Have referred the official documentation of Athena. Also, let me know if and how can I add nested fields from Create Table wizard in