Apache Hive overview
Also available as:
PDF

Escaping db.table references

You need to change queries that use db.table references to prevent Hive from interpreting the entire db.table string as the table name.

For ANSI SQL compliance, Hive 3.x rejects `db.table` in SQL queries. A dot (.) is not allowed in table names. You enclose the database name and the table name in backticks.
  1. Find a table having the problematic table reference.
    math.students
    appears in a CREATE TABLE statement.
  2. Enclose the database name and the table name in backticks.
    
     CREATE TABLE `math`.`students` (name VARCHAR(64), age INT, gpa DECIMAL(3,2));