#答案在此
mysql -uhive -p -hnamenode01
use hive;
#SQL语句如下
select
T5.NAME,
T1.TBL_NAME,
T2.PARAM_VALUE
from TBLS T1,
SERDE_PARAMS T2,
SDS T3,
DBS T5
WHERE T3.SERDE_ID=T2.SERDE_ID
AND T3.SD_ID=T1.SD_ID
AND T5.DB_ID=T1.DB_ID
AND T2.PARAM_KEY='field.delim'
AND T5.NAME='default'
AND T1.TBL_NAME='dim_other'
;
下面记录整体操作过程及mysql的变化情况
hive> create table dim_other
> (
> phone_no string,
> name string
> ) row format delimited
> fields terminated by '|'
> stored as textfile;
OK
Time taken: 0.207 seconds
hive> LOAD DATA LOCAL INPATH '/root/dual.txt' OVERWRITE INTO TABLE dim_other;
Loading data to table default.dim_other
Table default.dim_other stats: [numFiles=1, numRows=0, totalSize=22, rawDataSize=0]
OK
Time taken: 0.488 seconds
hive> select * from dim_other;
OK
15838162873 要树立
Time taken: 0.222 seconds, Fetched: 1 row(s)
hive> exit;
[root@cdh1 ~]# mysql -uroot -p123456
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2050
Server version: 5.6.39 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| amon |
| cm |
| hive |
| hue |
| mysql |
| oozie |
| performance_schema |
| rm |
| test |
+--------------------+
10 rows in set (0.00 sec)
mysql> use hive;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_hive |
+---------------------------+
| BUCKETING_COLS |
| CDS |
| COLUMNS_V2 |
| COMPACTION_QUEUE |
| COMPLETED_TXN_COMPONENTS |
| DATABASE_PARAMS |
| DBS |
| DB_PRIVS |
| DELEGATION_TOKENS |
| FUNCS |
| FUNC_RU |
| GLOBAL_PRIVS |
| HIVE_LOCKS |
| IDXS |
| INDEX_PARAMS |
| MASTER_KEYS |
| NEXT_COMPACTION_QUEUE_ID |
| NEXT_LOCK_ID |
| NEXT_TXN_ID |
| NOTIFICATION_LOG |
| NOTIFIC