Home / Hive / Query compilation
Hive: SemanticException [Error 10001]: Table not found
org.apache.hadoop.hive.ql.parse.SemanticExceptionFAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'orders'The query references a table that the metastore does not know in the current database. Usually the database prefix is missing, the session uses another database, or the table was created in a different catalog or metastore.
Common causes
- The table lives in another database and the name is not qualified.How to confirm: SELECT current_database(); then SHOW TABLES IN <db> LIKE '<name>'.
- The client points to a different metastore than the one where the table was created.How to confirm: Compare hive.metastore.uris on both clients.
How to fix it
Qualify the table as database.table, or run USE database first.
Where the message comes from
ErrorMsg.javainapache/hiveatrel/release-4.2.1- Message checked in Hive 4.2.1 (error code 10001)
Message template in the source: Table not found