[Doc]Update External_table.md (#57684)
Signed-off-by: simo <48942089+wangsimo0@users.noreply.github.com>
Signed-off-by: 絵空事スピリット <wanglichen@starrocks.com>
Co-authored-by: 絵空事スピリット <wanglichen@starrocks.com>
(cherry picked from commit ccbac1eb64)
# Conflicts:
# docs/ja/data_source/External_table.md
This commit is contained in:
parent
18deb8466c
commit
56f7cbaa7d
|
|
@ -12,7 +12,7 @@ From v3.1 onwards, we recommend that you use [JDBC catalog](../data_source/catal
|
|||
The external table feature was designed to help with importing data into StarRocks NOT to perform queries against external systems as a normal operation. Although you can query and use functions like JOIN, it is not performant. A more performant solution would be to import the data into StarRocks.
|
||||
:::
|
||||
|
||||
StarRocks supports access to other data sources by using external tables. External tables are created based on data tables that are stored in other data sources. StarRocks only stores the metadata of the data tables. You can use external tables to directly query data in other data sources. StarRocks supports the following data sources: MySQL, StarRocks, Elasticsearch, Apache Hive™, Apache Iceberg, and Apache Hudi. **Currently, you can only write data from another StarRocks cluster into the current StarRocks cluster. You cannot read data from it. For data sources other than StarRocks, you can only read data from these data sources.**
|
||||
StarRocks supports access to other data sources by using external tables. External tables are created based on data tables that are stored in other data sources. StarRocks only stores the metadata of the data tables. You can use external tables to directly query data in other data sources. Currently, except StarRocks external table, all other external tables are deprecated. **You can only write data from another StarRocks cluster into the current StarRocks cluster. You cannot read data from it. For data sources other than StarRocks, you can only read data from these data sources.**
|
||||
|
||||
From 2.5 onwards, StarRocks provides the Data Cache feature, which accelerates hot data queriers on external data sources. For more information, see [Data Cache](data_cache.md).
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ The following limits apply when you use a StarRocks external table:
|
|||
* The syntax of creating an external table is the same as creating a normal table, but the column names and other information in the external table must be the same as the destination table.
|
||||
* The external table synchronizes table metadata from the destination table every 10 seconds. If a DDL operation is performed on the destination table, there may be a delay for data synchronization between the two tables.
|
||||
|
||||
## External table for a JDBC-compatible database
|
||||
## (Deprecated) External table for a JDBC-compatible database
|
||||
|
||||
From v2.3.0, StarRocks provides external tables to query JDBC-compatible databases. This way, you can analyze the data of such databases in a blazing fast manner without the need to import the data into StarRocks. This section describes how to create an external table in StarRocks and query data in JDBC-compatible databases.
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -4,12 +4,13 @@ displayed_sidebar: docs
|
|||
|
||||
# 外部表
|
||||
|
||||
StarRocks 支持以外部表 (External Table) 的形式,接入其他数据源。外部表指的是保存在其他数据源中的数据表,而 StartRocks 只保存表对应的元数据,并直接向外部表所在数据源发起查询。目前 StarRocks 已支持的第三方数据源包括 MySQL、StarRocks、Elasticsearch、Apache Hive™、Apache Iceberg 和 Apache Hudi。**对于 StarRocks 数据源,现阶段只支持 Insert 写入,不支持读取,对于其他数据源,现阶段只支持读取,还不支持写入**。
|
||||
StarRocks 支持以外部表 (External Table) 的形式,接入其他数据源。外部表指的是保存在其他数据源中的数据表,而 StartRocks 只保存表对应的元数据,并直接向外部表所在数据源发起查询。目前,除 StarRocks 外部表外,其他外部表功能已经废弃。**对于 StarRocks 数据源,现阶段只支持 Insert 写入,不支持读取,对于其他数据源,现阶段只支持读取,还不支持写入**。
|
||||
|
||||
> **NOTICE**
|
||||
>
|
||||
> * 从 3.0 版本起,对于查询 Hive、Iceberg、Hudi 数据源的场景,推荐使用 Catalog。参见 [Hive catalog](../data_source/catalog/hive_catalog.md)、[Iceberg catalog](../data_source/catalog/iceberg_catalog.md)、[Hudi catalog](../data_source/catalog/hudi_catalog.md)。
|
||||
> * 从 3.1 版本起,对于查询 MySQL、PostgreSQL 的场景推荐使用 [JDBC catalog](../data_source/catalog/jdbc_catalog.md),对于查询 Elasticsearch 的场景推荐使用 [Elasticsearch catalog](../data_source/catalog/elasticsearch_catalog.md)。
|
||||
> * 从 3.2.9、3.3.1 版本起,对于查询 Oracle 和 SQLServer 的场景推荐使用 [JDBC catalog](../data_source/catalog/jdbc_catalog.md)。
|
||||
|
||||
从 2.5 版本开始,查询外部数据源时支持 Data Cache,提升对热数据的查询性能。参见 [Data Cache](data_cache.md)。
|
||||
|
||||
|
|
@ -90,7 +91,7 @@ insert into external_t select * from other_table;
|
|||
* 创建外表语法和创建普通表一致,但其中的列名等信息请保持同其对应的目标表一致。
|
||||
* 外表会周期性从目标表同步元信息(同步周期为 10 秒),在目标表执行的 DDL 操作可能会延迟一定时间反应在外表上。
|
||||
|
||||
## 更多数据库(JDBC)的外部表
|
||||
## (已弃用) 更多数据库(JDBC)的外部表
|
||||
|
||||
自 2.3.0 版本起,StarRocks 支持通过外部表的方式查询支持 JDBC 的数据库,无需将数据导入至 StarRocks,即可实现对这类数据库的极速分析。本文介绍如何在 StarRocks 创建外部表,查询支持 JDBC 的数据库中的数据。
|
||||
|
||||
|
|
@ -314,7 +315,7 @@ StarRocks 支持对目标表进行谓词下推,把过滤条件推给目标表
|
|||
* 创建 JDBC 外部表时,不支持索引,也不支持通过 PARTITION BY、DISTRIBUTED BY 来指定数据分布规则。
|
||||
* 查询 JDBC 外部表时,不支持下推函数。
|
||||
|
||||
## (Deprecated) Elasticsearch 外部表
|
||||
## (已弃用) Elasticsearch 外部表
|
||||
|
||||
如要查询 Elasticsearch 中的数据,需要在 StarRocks 中创建 Elasticsearch 外部表,并将外部表与待查询的 Elasticsearch 表建立映射。StarRocks 与 Elasticsearch 都是目前流行的分析系统。StarRocks 擅长大规模分布式计算,且支持通过外部表查询 Elasticsearch。Elasticsearch 擅长全文检索。两者结合提供了一个更完善的 OLAP 解决方案。
|
||||
|
||||
|
|
@ -571,7 +572,7 @@ StarRocks 支持对 Elasticsearch 表进行谓词下推,把过滤条件推给
|
|||
* 支持查询使用 HTTP Basic 认证的 Elasticsearch 集群。
|
||||
* 一些通过 StarRocks 的查询会比直接请求 Elasticsearch 会慢很多,比如 count 相关查询。这是因为 Elasticsearch 内部会直接读取满足条件的文档个数相关的元数据,不需要对真实的数据进行过滤操作,使得 count 的速度非常快。
|
||||
|
||||
## (Deprecated) Hive 外部表
|
||||
## (已弃用) Hive 外部表
|
||||
|
||||
使用 Hive 外部表前,确保服务器上已安装 JDK 1.8。
|
||||
|
||||
|
|
@ -799,7 +800,7 @@ Hive 表 (Hive Table) 的 Partition 统计信息以及 Partition 下面的文件
|
|||
|
||||
3. 重启 FE,BE。
|
||||
|
||||
## (Deprecated) Iceberg 外部表
|
||||
## (已弃用) Iceberg 外部表
|
||||
|
||||
如要查询 Iceberg 数据,需要在 StarRocks 中创建 Iceberg 外部表,并将外部表与需要查询的 Iceberg 表建立映射。
|
||||
|
||||
|
|
@ -980,7 +981,7 @@ StarRocks 不支持查询以下类型的数据: TIMESTAMPTZ、STRUCT 和 MAP
|
|||
select count(*) from iceberg_tbl;
|
||||
~~~
|
||||
|
||||
## (Deprecated) Hudi 外部表
|
||||
## (已弃用) Hudi 外部表
|
||||
|
||||
从 2.2.0 版本开始,StarRocks 支持通过外表的方式查询 Hudi 数据湖中的数据,帮助您实现对数据湖的极速分析。本文介绍如何在 StarRock 创建外表,查询 Hudi 中的数据。
|
||||
|
||||
|
|
@ -1098,7 +1099,7 @@ PROPERTIES (
|
|||
SELECT COUNT(*) FROM hudi_tbl;
|
||||
~~~
|
||||
|
||||
## (Deprecated) MySQL 外部表
|
||||
## (已弃用) MySQL 外部表
|
||||
|
||||
星型模型中,数据一般划分为维度表 (dimension table) 和事实表 (fact table)。维度表数据量少,但会涉及 UPDATE 操作。目前 StarRocks 中还不直接支持 UPDATE 操作(可以通过 Unique/Primary 数据模型实现),在一些场景下,可以把维度表存储在 MySQL 中,查询时直接读取维度表。
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue