AWS Athena query says table does not exists, but it shows on both athena and glue data catalogs

0

When i ran this query: SELECT * FROM "myTable" WHERE DATE(CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0'))) BETWEEN DATE('2023/08/01') AND DATE('2023/08/01') AND "myTable"."timestamp" BETWEEN 1690911588 AND 1690912488 ORDER BY "timestamp" DESC

Athena returned this error: TABLE_NOT_FOUND: line 1:15: Table 'awsdatacatalog.default.myTable' does not exist This query ran against the "default" database, unless qualified by the query.

I have already double checked that the table exists on both catalogs this was created via aws crawlers, i think this is not a IAM issue since i had a table that used the same IAM role and worked just fine, for now the policy allows to query any table on athena. What could i be missing here?

gefragt vor 9 Monaten2758 Aufrufe
1 Antwort
0
Akzeptierte Antwort

Hi,

Yes, that's right, it doesn't appear to be a permission issue.

Can you make sure that you are running this query in the right database, from the error message it's clear that, this query was run in default database. I understand that myTable does exist but it may not be in default database.

Change the database from left pane dropdown and then run the query in the DB, where this table exists.

Hope you find this helpful.

Comment here if you have additional questions.

Abhishek

profile pictureAWS
EXPERTE
beantwortet vor 9 Monaten
  • hey thanks for repliying after some time i found out that it was a typo, because the crawler automatically replaced "-" with "_"

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen