StartRocks 连接 Paimon外部表

本文介绍了如何在StartRocks数据库环境中设置Paimon3.2.00.5的外部catalog,包括创建、切换和操作Paimon_hdfscatalog下的databases和tables的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

版本
StartRocksPaimon
3.2.00.5
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)

### 切换catalog
mysql> set catalog paimon_hdfs;
Query OK, 0 rows affected (0.01 sec)

### 查询某个catalog 下的databases
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)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值