Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unsupported Azure Blob storage via import into #15881

Merged
merged 4 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions external-storage-uri.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,8 @@ gcs://external/test.csv?credentials-file=${credentials-file-path}
- `encryption-scope`:服务端的[加密范围 (Encryption Scope)](https://learn.microsoft.com/zh-cn/azure/storage/blobs/encryption-scope-manage?tabs=powershell#upload-a-blob-with-an-encryption-scope)
- `encryption-key`:服务端使用的[加密密钥 (Encryption Key)](https://learn.microsoft.com/zh-cn/azure/storage/blobs/encryption-customer-provided-keys),采用的加密算法为 AES256

以下是用于 TiDB Lightning 和 BR 的 Azure Blob Storage URI 示例,需要指定文件夹路径 `testfolder`:
以下是用于 BR 的 Azure Blob Storage URI 示例,需要指定文件夹路径 `testfolder`:

```shell
azure://external/testfolder?account-name=${account-name}&account-key=${account-key}
```

以下是用于 [`IMPORT INTO`](/sql-statements/sql-statement-import-into.md) 的 Azure Blob Storage URI 示例,需要指定具体的文件名 `test.csv`:

```shell
azure://external/test.csv?account-name=${account-name}&account-key=${account-key}
```
18 changes: 6 additions & 12 deletions sql-statements/sql-statement-import-into.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ summary: TiDB 数据库中 IMPORT INTO 的使用概况。

`IMPORT INTO` 语句使用 TiDB Lightning 的[物理导入模式](/tidb-lightning/tidb-lightning-physical-import-mode.md),用于将 `CSV`、`SQL`、`PARQUET` 等格式的数据导入到 TiDB 的一张空表中。

`IMPORT INTO` 支持导入存储在 Amazon S3、GCS、Azure Blob Storage 和 TiDB 本地的数据文件。
`IMPORT INTO` 支持导入存储在 Amazon S3、GCS 和 TiDB 本地的数据文件。

- 对于存储在 S3、GCSAzure Blob Storage 的数据文件,`IMPORT INTO` 支持通过 [TiDB 分布式执行框架](/tidb-distributed-execution-framework.md)运行。
- 对于存储在 S3 或 GCS 的数据文件,`IMPORT INTO` 支持通过 [TiDB 分布式执行框架](/tidb-distributed-execution-framework.md)运行。

- 当此框架功能开启时(即 [tidb_enable_dist_task](/system-variables.md#tidb_enable_dist_task-从-v710-版本开始引入) 为 `ON`),`IMPORT INTO` 会将一个数据导入任务拆分成多个子任务并分配到各个 TiDB 节点上运行,以提高导入效率。
- 当此框架功能关闭时,`IMPORT INTO` 仅支持在当前用户连接的 TiDB 节点上运行。
Expand Down Expand Up @@ -88,9 +88,9 @@ SET 表达式左侧只能引用 `ColumnNameOrUserVarList` 中没有的列名。

### fileLocation

用于指定数据文件的存储位置,该位置可以是 S3、GCSAzure Blob Storage URI 路径,也可以是 TiDB 本地文件路径。
用于指定数据文件的存储位置,该位置可以是 S3 或 GCS URI 路径,也可以是 TiDB 本地文件路径。

- S3、GCSAzure Blob Storage URI 路径:配置详见[外部存储服务的 URI 格式](/external-storage-uri.md)。
- S3 或 GCS URI 路径:配置详见[外部存储服务的 URI 格式](/external-storage-uri.md)。
- TiDB 本地文件路径:必须为绝对路径,数据文件后缀必须为 `.csv`、`.sql` 或 `.parquet`。确保该路径对应的文件存储在当前用户连接的 TiDB 节点上,且当前连接的用户有 `FILE` 权限。

> **注意:**
Expand Down Expand Up @@ -245,7 +245,7 @@ IMPORT INTO t(id, name, @1) FROM '/path/to/file.csv' WITH skip_rows=1;
IMPORT INTO t FROM '/path/to/file-*.csv'
```

### 从 S3、GCSAzure Blob Storage 导入数据
### 从 S3 或 GCS 导入数据

- 从 S3 导入数据

Expand All @@ -259,13 +259,7 @@ IMPORT INTO t FROM '/path/to/file-*.csv'
IMPORT INTO t FROM 'gs://import/test.csv?credentials-file=${credentials-file-path}';
```

- 从 Azure Blob Storage 导入数据

```sql
IMPORT INTO t FROM 'azure://import/test.csv?credentials-file=${credentials-file-path}';
```

关于 Amazon S3、GCS 和 Azure Blob Storage 的 URI 路径配置,详见[外部存储服务的 URI 格式](/external-storage-uri.md)。
关于 Amazon S3 或 GCS 的 URI 路径配置,详见[外部存储服务的 URI 格式](/external-storage-uri.md)。

### 通过 SetClause 语句计算列值

Expand Down
1 change: 0 additions & 1 deletion tidb-lightning/tidb-lightning-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ TiDB Lightning 支持从以下位置读取:
- 本地
- [Amazon S3](/external-storage-uri.md#amazon-s3-uri-格式)
- [Google GCS](/external-storage-uri.md#gcs-uri-格式)
- [Azure Blob Storage](/external-storage-uri.md#azure-blob-storage-uri-格式)

## TiDB Lightning 整体架构

Expand Down
4 changes: 2 additions & 2 deletions tidb-lightning/tidb-lightning-physical-import-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ summary: 了解 TiDB Lightning 的物理导入模式。

# 物理导入模式简介

物理导入模式 (Physical Import Mode) 是 TiDB Lightning 支持的一种数据导入方式。物理导入模式不经过 SQL 接口,而是直接将数据以键值对的形式插入 TiKV 节点,是一种高效、快速的导入模式。使用物理导入模式时,单个 TiDB Lightning 实例可导入的数据量为 10 TiB,理论上导入的数据量可以随着 TiDB Lightning 实例数量的增加而增加,目前已经有多个用户验证基于[并行导入](/tidb-lightning/tidb-lightning-distributed-import.md)功能可以导入的数据量达 50 TiB。
物理导入模式 (Physical Import Mode) 是 TiDB Lightning 支持的一种数据导入方式。物理导入模式不经过 SQL 接口,而是直接将数据以键值对的形式插入 TiKV 节点,是一种高效、快速的导入模式。使用物理导入模式时,单个 TiDB Lightning 实例可导入的数据量不超过 10 TiB,理论上导入的数据量可以随着 TiDB Lightning 实例数量的增加而增加,目前已经有多个用户验证基于[并行导入](/tidb-lightning/tidb-lightning-distributed-import.md)功能可以导入的数据量达 50 TiB。

使用前请务必自行阅读[必要条件及限制](/tidb-lightning/tidb-lightning-physical-import-mode.md#必要条件及限制)。

Expand Down Expand Up @@ -80,7 +80,7 @@ backend = "local"

- 在导入数据的过程中,请勿在目标表进行 DDL 和 DML 操作,否则会导致导入失败或数据不一致。导入期间也不建议进行读操作,因为读取的数据可能不一致。请在导入操作完成后再进行读写操作。

- 单个 TiDB Lightning 进程导入单表不应超过 10 TB。使用并行导入时,TiDB Lightning 实例不应超过 10 个。
- 单个 TiDB Lightning 进程导入单表不应超过 10 TiB。使用并行导入时,TiDB Lightning 实例不应超过 10 个。

### 与其他组件一同使用的注意事项

Expand Down