Questions tagged [amazon-athena]
Amazon Athena is a service for running SQL queries against data stored on Amazon S3. Amazon Athena is part of Amazon Web Services (AWS).
amazon-athena
3,597
questions
0
votes
0
answers
24
views
EMR Serverless SparkSession builder error: ClassNotFoundException issues
I am trying to create a job in EMR Studio to run in an EMR Serverless application. It's a relatively basic script to use PySpark to read some Athena tables, do some joins, create an output dataframe ...
0
votes
0
answers
40
views
SQL for hierarchical cumulative sum, but with cumulative sum of child node modified before used to calculate parent's cumsum
entityId
parentId
percentContribution
emission
emission_locationbased
emission_marketbased
cumsum_locationbased
cumsum_marketbased
E1
60
30
60
70
E2
E1
80
20
30
40
E3
E2
80
10
20
10
20
This is ...
0
votes
0
answers
18
views
Athena query with IN operator not returning results
I deployed a CloudWatch metrics connector in my AWS account to pull CloudWatch metrics using Amazon Athena.
I am running a query with IN operator like below:
SELECT * from metric_samples where ...
0
votes
0
answers
21
views
AWS Athena with Iceberg: convert timestamp string with timezone into a timestamp column
I have the following string:
2024-02-28T14:26:51.292534-03:00
I want to convert it to a timestamp column without losing any data. I tried different solutions such as the following, but none worked:
...
0
votes
0
answers
24
views
Delta table column mapping support in Athena/Glue
I'm confused by AWS documentation regarding compatibility with delta tables.
We need to delete a column that is the "column mapping" feature supported in delta-lake 1.2.0 and we do it ...
0
votes
1
answer
49
views
How to test Amazon Athena queries
I have a rather complicated Athena query, which I would like to test on a local machine without connecting to Athena. I specified some mock data for testing purposes, and I was hoping that I could use ...
0
votes
1
answer
50
views
How to efficiently store and query data with key-value pair in AWS S3 and Athena?
I have a dataset stored in AWS S3 and query using AWS Athena. The data is currently structured in two columns in S3 as follows:
Dataset
Customer_ID | Products_csv
C1 | P1, P2, P3
C2 |...
0
votes
2
answers
29
views
Compute a new column to increment/decrement by 1 per row, in respect to a certain row set with a condition
I would like to increment/decrement by 1 per row, when the starting point (0) is set by a condition in a specific row.
Example
Consider the following my_table:
WITH my_table AS (
SELECT *
FROM ...
0
votes
1
answer
32
views
Error while fetching data from mongo to QuickSight using Athena (COLUMN_NOT_FOUND Error)
We use Amazon QuickSight to analyze data from MongoDB.
The custom query in our dataset works perfect:
SELECT _id, label, structure, createdAt, deleted
FROM docdb.label_db.labels
We have added a ...
0
votes
1
answer
44
views
AWS Athena Error: Modifying Hive table rows is only supported for transactional tables
I am not able to perform delete operation on row in AWS Athena tables. It is throwing below error as:
NOT_SUPPORTED: Modifying Hive table rows is only supported for transactional tables
This query ran ...
-1
votes
0
answers
24
views
AWS Lamda event getting triggered multiple times
I am implementing a solution where whenever a new file is placed in S3 I am triggering an event in my lambda function which inserts the data further to AWS Athena.
But the issue is event is getting ...
1
vote
1
answer
37
views
Athena try_cast is not returning null
I have below query
SELECT * from table WHERE TRY_CAST(date as varchar) is null
as per my understanding ,TRY_CAST return null if it is not able to cast, it should return those rows having date column ...
0
votes
0
answers
19
views
AWS crawler creating Null values for partion columns
I am having some country level partitioned data in s3 and crawler is crawling the this root folder and creating a table. No Null value is there for country code. But when looked in the Athena, there ...
0
votes
1
answer
33
views
Athena extract value from nested json with dynamic key
I have following json
{"GrossORNet":"Net","Term":"Monthly","Tier":{"All":{"1":{"Max":"100000","Min":&...
0
votes
1
answer
29
views
How to update the set of values of an enum partition in Athena
Parquet files are stored in AWS S3 with prefixes like /fruit=.../year=.../month=.../day=.../.
Their data are queried via AWS Athena, with a table in which fruit is typed as an enum:
'projection.fruit....