[10.206.0.90:27009] impala_test> create table t1 (id int, name string);
Query: create table t1 (id int, name string)
+-------------------------+
| summary |
+-------------------------+
| Table has been created. |
+-------------------------+
查看库中的表
[10.206.0.90:27009] impala_test> show tables;
Query: show tables
+------+
| name |
+------+
| t1 |
+------+
查看hive表结构
[10.206.0.90:27009] impala_test> show create table t1;
Query: show create table t1
+------------------------------------------------------------------------+
| result |
+------------------------------------------------------------------------+
| CREATE TABLE impala_test.t1 ( |
| id INT, |
| name STRING |
| ) |
| STORED AS TEXTFILE |
| LOCATION 'hdfs://HDFS78000002/usr/hive/warehouse/impala_test.db/t1' |
| TBLPROPERTIES ('OBJCAPABILITIES'='EXTREAD,EXTWRITE', 'accessType'='8') |
+------------------------------------------------------------------------+
插入数据
[10.206.0.90:27009] impala_test> insert into t1 values(1,'a');
查询hive表
[10.206.0.90:27009] impala_test> select * from t1;
Query: select * from t1
Query submitted at: 2023-11-28 19:26:06 (Coordinator: http://10.206.0.90:27004)
Query progress can be monitored at: http://10.206.0.90:27004/query_plan?query_id=ff47e59f75f2c718:81190e4900000000
+----+------+
| id | name |
+----+------+
| 1 | a |
+----+------+