Skip to content
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: 4 additions & 4 deletions tidb-cloud-lake/guides/load-from-local-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There are two methods to load data from local files:
1. **Stage**: Upload the local file to an internal stage, then copy data from the staged file into the table. File upload occurs either through lake-query or using a presigned URL, depending on the `presigned_url_disabled` connection option (default: `false`).
2. **Streaming**: Load the file directly into the table during upload. Use this method when the file is too large to store as a single object in your object storage.

## Tutorial 1 - Load from a Local File
## Tutorial 1: Load from a Local File
Comment thread
coderabbitai[bot] marked this conversation as resolved.

This tutorial uses a CSV file as an example to demonstrate how to import data into {{{ .lake }}} using [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md) from a local source.

Expand Down Expand Up @@ -125,13 +125,13 @@ root@localhost:8000/book_db> SELECT * FROM books;
└───────────────────────────────────────────────────────────────────────┘
```

## Tutorial 2 - Load into Specified Columns
## Tutorial 2: Load into Specified Columns

In [Tutorial 1](#tutorial-1---load-from-a-local-file), you created a table containing three columns that exactly match the data in the sample file. You can also load data into specified columns of a table, so the table does not need to have the same columns as the data to be loaded as long as the specified columns can match. This tutorial shows how to do that.
In [Tutorial 1](#tutorial-1-load-from-a-local-file), you created a table containing three columns that exactly match the data in the sample file. You can also load data into specified columns of a table, so the table does not need to have the same columns as the data to be loaded as long as the specified columns can match. This tutorial shows how to do that.

### Before You Begin

Before you start this tutorial, make sure you have completed [Tutorial 1](#tutorial-1---load-from-a-local-file).
Before you start this tutorial, make sure you have completed [Tutorial 1](#tutorial-1-load-from-a-local-file).

### Step 1. Create Table

Expand Down
6 changes: 3 additions & 3 deletions tidb-cloud-lake/guides/load-from-stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CREATE TABLE books

Follow this tutorial to upload the sample file to the user stage and load data from the staged file into {{{ .lake }}}.

### Step 1: Upload Sample File
### Step 1. Upload Sample File

1. Upload the sample file using [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md):

Expand Down Expand Up @@ -109,7 +109,7 @@ Follow this tutorial to upload the sample file to an internal stage and load dat
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

### Step 2: Upload Sample File
### Step 2. Upload Sample File

1. Upload the sample file using [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md):

Expand Down Expand Up @@ -189,7 +189,7 @@ Follow this tutorial to upload the sample file to an external stage and load dat
my_external_stage|External |'root'@'%'| |
```

### Step 2: Upload Sample File
### Step 2. Upload Sample File

1. Upload the sample file using [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md):

Expand Down
4 changes: 2 additions & 2 deletions tidb-cloud-lake/guides/load-parquet.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Result:

More details about unload data to stage can be found in [COPY INTO location](/tidb-cloud-lake/sql/copy-into-location.md).

### Step 3: Create Target Table
### Step 3. Create Target Table

```sql
CREATE TABLE books
Expand Down Expand Up @@ -100,7 +100,7 @@ Result:
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```

### Step 5 (Option). Using SELECT to Copy Data
### Step 5 (Optional). Using SELECT to Copy Data

For more control, like transforming data while copying, use the SELECT statement. Learn more at [`SELECT from Parquet`](/tidb-cloud-lake/guides/query-parquet-files-in-stage.md)

Expand Down