## モジュール 3：TiDB Dedicated へのデータインポート

このモジュールでは、UI を通じて TiDB Cloud Dedicated にサンプルデータをインポートします。使用するサンプルデータは、Capital Bikeshare データライセンス契約の下でリリースされた Capital Bikeshare のシステムデータです。

### 手順 1. インポートパネルを開く

+ 右上角の `...` をクリックします。

  ![80%](https://lab-static.pingcap.com/images/2025/7/24/a1916e0d5c17e5af89e7dab79992a8b9956c0ef3.png)

+ `Import data from Cloud Storage` を選択します。

### 手順 2. データソースを設定

+ Included Schema Files: `Yes`
+ Data Format: `SQL`
+ Folder URI: `s3://tidbcloud-sample-data/data-ingestion/`
+ Bucket Access: `AWS Role ARN`
+ AWS Role ARN: `arn:aws:iam::801626783489:role/import-sample-access`

  ![80%](https://lab-static.pingcap.com/images/2025/7/24/ac300adbcc6bd19f3fff2ea3ab1782d8872a414b.png)

### 手順 4. データをインポート

+ `Connect` > `Start Import` をクリックします。

### 手順 5. インポートされたデータを確認

+ [Terminal 1](ssh://monitor1-ssh#1) に移動して、インポートされたデータを確認します

  ```sql
  USE bikeshare;
  SELECT ride_id, rideable_type, started_at, ended_at FROM `trips` WHERE start_station_name='12th & U St NW' limit 3;
  ```

  ```output
  MySQL [bikeshare]> SELECT ride_id, rideable_type, started_at, ended_at FROM `trips` WHERE start_station_name='12th & U St NW' limit 3;
  +------------------+---------------+---------------------+---------------------+
  | ride_id          | rideable_type | started_at          | ended_at            |
  +------------------+---------------+---------------------+---------------------+
  | 000B23FFC23B5FC8 | classic_bike  | 2020-12-22 12:33:12 | 2020-12-22 12:41:59 |
  | 0023EE3F7FA273AA | docked_bike   | 2020-12-31 11:02:14 | 2020-12-31 12:21:51 |
  | 0025068889EA0F45 | docked_bike   | 2020-11-19 14:45:34 | 2020-11-19 14:51:37 |
  +------------------+---------------+---------------------+---------------------+
  3 rows in set (0.004 sec)
  ```
