Skip to content

Commit be47909

Browse files
authored
tidb-cloud: update LOAD DATA INFILE description (#20917) (#20918)
1 parent ba7ca3b commit be47909

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

sql-statements/sql-statement-load-data.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ Starting from TiDB v7.0.0, the `LOAD DATA` SQL statement supports the following
1616
>
1717
> The new parameter `FIELDS DEFINED NULL BY` and support for importing data from S3 and GCS are experimental. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
1818
19+
<CustomContent platform="tidb-cloud">
20+
21+
> **Note:**
22+
>
23+
> For the `LOAD DATA INFILE` statement, TiDB Cloud Dedicated supports `LOAD DATA LOCAL INFILE`, and `LOAD DATA INFILE` from Amazon S3 or Google Cloud Storage, while TiDB Cloud Serverless only supports `LOAD DATA LOCAL INFILE`.
24+
25+
</CustomContent>
26+
1927
## Synopsis
2028

2129
```ebnf+diagram
@@ -144,6 +152,21 @@ LOAD DATA LOCAL INFILE '/mnt/evo970/data-sets/bikeshare-data/2017Q4-capitalbikes
144152

145153
In the above example, `x'2c'` is the hexadecimal representation of the `,` character, and `b'100010'` is the binary representation of the `"` character.
146154

155+
<CustomContent platform="tidb-cloud">
156+
157+
The following example shows how to import data into a TiDB Cloud Dedicated cluster from Amazon S3 using the `LOAD DATA INFILE` statement:
158+
159+
```sql
160+
LOAD DATA INFILE 's3://<your-bucket-name>/your-file.csv?role_arn=arn:aws:iam::<your-account-id>:role/<your-role-name>&external_id=<your-external-id>'
161+
INTO TABLE <your-db-name>.<your-table-name>
162+
FIELDS TERMINATED BY ','
163+
ENCLOSED BY '"'
164+
LINES TERMINATED BY '\n'
165+
IGNORE 1 LINES;
166+
```
167+
168+
</CustomContent>
169+
147170
## MySQL compatibility
148171

149172
The syntax of the `LOAD DATA` statement is compatible with that of MySQL, except for character set options which are parsed but ignored. If you find any syntax compatibility difference, you can [report a bug](https://docs.pingcap.com/tidb/stable/support).

tidb-cloud/limited-sql-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ TiDB Cloud works with almost all workloads that TiDB supports, but there are som
4646
| `ADMIN PLUGINS ENABLE` | Supported | Not supported [^8] |
4747
| `ADMIN PLUGINS DISABLE` | Supported | Not supported [^8] |
4848
| `ALTER INSTANCE RELOAD TLS` | Supported | TiDB Cloud Serverless automatically refreshes the TLS certificate. |
49-
| `LOAD DATA INFILE` | Only supports `LOAD DATA LOCAL INFILE` | Only supports `LOAD DATA LOCAL INFILE` |
49+
| `LOAD DATA INFILE` | Supports `LOAD DATA LOCAL INFILE`, and `LOAD DATA INFILE` from Amazon S3 or Google Cloud Storage | Only supports `LOAD DATA LOCAL INFILE` |
5050
| `CHANGE DRAINER` | Not supported [^7] | Not supported [^7] |
5151
| `CHANGE PUMP` | Not supported [^7] | Not supported [^7] |
5252
| `FLASHBACK CLUSTER` | Supported | Not supported [^3] |

0 commit comments

Comments
 (0)