Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HIVE_UNKNOWN_ERROR when running AWS Athena query on Glue table (RDS)

I'm getting an error when running an Athena query against a Glue table created from an RDS database:

HIVE_UNKNOWN_ERROR: Unable to create input format

The tables are created using a crawler. The tables show up correctly in the Glue interface:

Glue interface

However, they do not show up in the Athena interface under the database. It says: "The selected database has no tables"

enter image description here

I do not see this behaviour when using a database created using an S3 file. Maybe this is related to the error. Does anybody have an idea?

like image 983
Wouter de Winter Avatar asked May 14 '18 13:05

Wouter de Winter


People also ask

When using Athena you are charged separately for using the AWS Glue data catalog True or false?

Are there separate charges for AWS Glue? Yes. With AWS Glue, you pay a monthly rate for storing and accessing the metadata stored in the AWS Glue Data Catalog, an hourly rate billed per second for AWS Glue ETL jobs and crawler runtime, and an hourly rate billed per second for each provisioned development endpoint.

Can I use Athena to query RDS?

Configure RDS as Data Source. You configure PostgreSQL RDS instance as the data source for Amazon Athena so that you can query RDS data from the Athena Query Editor. Goto Athena Management console and click on Data sources link. On the next screen, click on the Connect data source button.

Why do I get zero records when I query my Amazon Athena table?

Incorrect LOCATION path If the input LOCATION path is incorrect, then Athena returns zero records.

Does AWS Glue use Athena?

Athena uses the AWS Glue Data Catalog to store and retrieve table metadata for the Amazon S3 data in your Amazon Web Services account. The table metadata lets the Athena query engine know how to find, read, and process the data that you want to query.


1 Answers

I had the same problem. This is the answer that I have got from AWS Support:

I understand that you set up a Glue crawler to crawl our RDS postresql database but the tables are not visible in Athena.

Athena service is designed to query tables that point to S3 as data-source. It cannot read data from non-S3 resources as of today.

So, unfortunately not possible at the moment.

like image 126
sziep Avatar answered Sep 20 '22 00:09

sziep