The error message you received indicates that the named_struct function is not registered in Athena

0

What could be the reason for this?

  • Please provide more information so we can help you - what were you trying to do, what have you set up, what command did you execute and where, and what is the full error and response info you received?

  • hi am trying to create a table from exernal data which is in the S3 bucket.

    the table was created, so now the error came after i've tried to insert data into the table:

    so with the initial error i sorted that with replacing 'named_struct" with 'row'

    But now am getting another problem - error message: "TYPE_MISMATCH: Insert query has mismatched column types: Table: [varchar, row(timestamp varchar, region varchar, products array(row(name varchar, price integer, payment_method varchar))), row(cashier varchar, manager varchar), array(row(technician varchar, shift_start varchar))], Query: [varchar(6), row(varchar(24), varchar(20), array(row(varchar(7), varchar(13), varchar(5), integer, varchar(7), varchar(11))), row(varchar(9), varchar(5), varchar(10), varchar(5))), array(row(varchar(14), varchar(7), varchar(16), varchar(24)))]. If a data manifest file was generated at 's3://updatedround/Unsaved/2023/04/10/9fd0889f-b0a9-44e8-80cb-d2731a352500-manifest.csv', you may need to manually clean the data from locations specified in the manifest. Athena will not delete data in your account."

asked a year ago954 views
1 Answer
1

This is most likely an error that is output when using a function that is not supported by Athena.
The following documentation is a list of supported functions.
https://docs.aws.amazon.com/athena/latest/ug/functions.html

If you use an unsupported function, write a user-defined function.
https://docs.aws.amazon.com/athena/latest/ug/querying-udf.html

Reference Documents:
https://repost.aws/knowledge-center/athena-syntax-function-not-registered

profile picture
EXPERT
answered a year ago

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