2 Answers
- Newest
- Most votes
- Most comments
1
Hi,
You can calculate the length of the array in Athena using the CARDINALITY
function [1].
Here's the basic syntax:
SELECT CARDINALITY(json_column_name) AS array_length
FROM your_table_name;
Reference:
[1] https://docs.aws.amazon.com/athena/latest/ug/finding-lengths.html
Thanks,
Atul
answered 6 months ago
Relevant content
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Glad that it helped!