版本
sr 环境准备
CREATE external CATALOG `paimon_hdfs` PROPERTIES (
"type" = "paimon",
'paimon.catalog.type' = 'filesystem',
"paimon.catalog.warehouse" = "hdfs://hadoop03:9000/paimon/test"
);
mysql> show catalogs;
+-----------------+----------+------------------------------------------------------------------+
| Catalog | Type | Comment |
+-----------------+----------+------------------------------------------------------------------+
| default_catalog | Internal | An internal catalog contains this cluster's self-managed tables. |
| paimon_hdfs | Paimon | NULL |
+-----------------+----------+------------------------------------------------------------------+
2 rows in set (0.01 sec)
mysql> set catalog paimon_hdfs;
Query OK, 0 rows affected (0.01 sec)
mysql> show databases from paimon_hdfs;
+--------------------+
| Database |
+--------------------+
| information_schema |
| tpchdb |
+--------------------+
2 rows in set (1.01 sec)
mysql> use paimon_hdfs.tpchdb;
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_tpchdb |
+------------------+
| abc |
| def |
+------------------+
2 rows in set (0.29 sec)
mysql> select * from abc;
+------+------+
| id | name |
+------+------+
| 1 | b |
| a | k |
| a1 | k |
| b1 | b |
+------+------+
4 rows in set (1.66 sec)