Athena : TYPE_NOT_FOUND: Unknown type: row

0

Getting this while i am querying document db using lambda function using Athena for specific tables only

TYPE_NOT_FOUND: Unknown type: row This query ran against the "sample" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: dea0b10d-2a4c-4ffb-a343-a6306690d183

Satya
asked 10 days ago70 views
1 Answer
4

The error message "TYPE_NOT_FOUND: Unknown type: row" indicates that Athena, the query engine, is encountering a data type named "row" in your query that it doesn't recognize. This problem commonly arises when the query references a data type not supported by Athena or not properly defined in your data catalog.

To resolve this issue, follow these steps:

Check Data Types Compatibility: Examine your table schema in Amazon DocumentDB to ensure that all data types used in your query are compatible with Athena. DocumentDB supports a specific set of data types, and you should verify that any usage of the "row" data type is appropriately defined. Review Query: Analyze the query you're executing against Athena to identify any references to the "row" data type. Confirm that the query is structured correctly and that all data types used are valid and supported by Athena. Data Catalog Configuration: Ensure that your data catalog, such as AWS Glue, accurately reflects the schema of your DocumentDB tables. If the "row" data type is present in your schema, make sure it's defined correctly in the data catalog. Consider Data Conversion: If the "row" data type is causing issues, consider converting it to a supported data type recognized by Athena. This might involve adjusting your table schema or modifying your query to use compatible data types. **Test with Subset Data: **Test your query with a smaller subset of your data to isolate any specific rows or columns that may be causing the issue. By narrowing down the scope of your query, you can identify the problematic data and troubleshoot more effectively. **Seek AWS Support: ** If you're unable to resolve the issue, reach out to AWS customer support for further assistance. Provide them with the error message and query ID (dea0b10d-2a4c-4ffb-a343-a6306690d183) for detailed investigation and support.

answered 10 days ago
  • Thanks for the replay. we not found any suspicious datatypes like "row" ,but found these datatypes - varchar, bigint, int, boolean, struct, array

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions