HIVE_CURSOR_ERROR exception in Amazon Athena is no longer a problem with Bobcares by your side.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team is ready to help customers with HIVE_CURSOR_ERROR exception in Amazon Athena.
How to resolve HIVE_CURSOR_ERROR exception in Amazon Athena
The HIVE_CURSOR_ERROR exception often pops up while attempting to run queries on the Amazon Athena table. Our Support Engineers believe that one of the following conditions may be the reason behind the exception:
- Corrupt, invalid, or incorrectly compressed data objects in the table location.
- Invalid records in the table data.
HIVE_CURSOR_ERROR exceptions are also seen when there is an issue with any one of the following objects:
Our Support Engineers recommend ensuring that all new objects in the Amazon Simple Storage Service table location are valid and not corrupt. We can do this by downloading the objects and inspecting them with the appropriate tool. For instance, decompressing the GZIP-compressed objects to ensure the compression is valid.
In case the table is partitioned, it is also a good idea to check if we can query individual partitions. Furthermore, invalid objects may be present in the new partitions in the tables, resulting in the exception.
About Specific HIVE_CURSOR_ERROR exceptions in Amazon Athena
-
-
HIVE_CURSOR_ERROR: Row is not a valid JSON Object
This error occurs when a row in the table is an invalid JSON record. We can resolve it by recreating the table with the property
'ignore.malformed.json' = 'true'
. After that, we have to query the new table in order to narrow down the invalid records with this command:
SELECT "$path" FROM example_table WHERE example_column = NULL
-
HIVE_CURSOR_ERROR: Corrupted uncompressed block
This error occurs if the table contains data compressed using LZO format. We can avoid the error by using a different compression format.
-
HIVE_CURSOR_ERROR: Can not read value at 0 in block 0 in file
We get this error if there are invalid Parquet objects on the S3 path. Our Support Techs recommend checking Parquet objects for DECIMAL data types.
-
HIVE_CURSOR_ERROR: org.apache.hadoop.io.ArrayWritable cannot be cast to org.apache.hadoop.io.Text
This error occurs when we use an incorrect SerDe during table definition. We can resolve this error by checking the source data and verifying the correct SerDe is in use.
-
[Looking for a solution to another query? We are just a click away.]
Conclusion
To conclude, our skilled Support Engineers at Bobcares demonstrated how to resolve HIVE_CURSOR_ERROR exception in Amazon Athena.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments