user9074332
user9074332

Reputation: 2636

Impala External Table Location/URI

I am troubleshooting an application issue on an External (unmanaged) Table that was created using the CREATE TABLE X LIKE PARQUET syntax via Cloudera Impala. I am trying to determine the Location of the files comprising the partitions of the External table but having difficulty determining how to do this, or finding documentation describing this.

If I do a:

   show create table T1;

I see the hive-managed location such as:

    LOCATION 'hdfs://nameservice1/user/hive/warehouse/databaseName'

If I do a:

    describe formatted T1;

I see that the table is in fact external but it doesnt give any insight on the unmanaged Location.

    | Table Type:   | EXTERNAL_TABLE
    | Location:     | hdfs://nameservice1/user/hive/warehouse/databaseName/T1

Question: How do I determine the Location/URI/Parent Directory of the actual external files that comprise this External Table?

Upvotes: 1

Views: 3331

Answers (1)

Jhon Mario Lotero
Jhon Mario Lotero

Reputation: 325

When you create a external table with impala or hive and you want know the location you must put the HDFS location, for example :

CREATE EXTERNAL TABLE my_db.table_name (column string ) LOCATION 'hdfs_path'

The probably location o theses files if dont provite this, is under user directory that execute the comand create table.

For more detail you can see this link:

https://www.cloudera.com/documentation/enterprise/5-8-x/topics/impala_create_table.html

I hope to help!

Upvotes: 2

Related Questions