Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion TOC-tidb-cloud-lake.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
- Connect
- [Overview](/tidb-cloud-lake/guides/connection-overview.md)
- SQL Clients
- [BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md)
- [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md)
- [DBeaver](/tidb-cloud-lake/guides/connect-using-dbeaver.md)
- Drivers
- [Overview](/tidb-cloud-lake/guides/driver-overview.md)
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/authenticate-with-aws-iam-role.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ After {{{ .lake }}} support shares the trusted principal information for your or

Click `View Role`, and record the role ARN: `arn:aws:iam::987654321987:role/databend-test`

4. Run the following SQL statement in {{{ .lake }}} cloud worksheet or `BendSQL`:
4. Run the following SQL statement in {{{ .lake }}} cloud worksheet or `LakeSQL`:

```sql
CREATE CONNECTION databend_test STORAGE_TYPE = 's3' ROLE_ARN = 'arn:aws:iam::987654321987:role/databend-test' EXTERNAL_ID = 'my-external-id-123';
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/connect-using-node-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ conn.close();
## Resources

- **NPM Package**: [databend-driver](https://www.npmjs.com/package/databend-driver)
- **GitHub Repository**: [databend-driver](https://github.com/databendlabs/bendsql/tree/main/bindings/nodejs)
- **GitHub Repository**: [databend-driver](https://github.com/tidbcloud/lakesql/tree/main/bindings/nodejs)
- **TypeScript Definitions**: Included in package
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/connect-using-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@ with engine.connect() as conn:
## Resources

- **PyPI**: [databend-driver](https://pypi.org/project/databend-driver/) • [databend-sqlalchemy](https://pypi.org/project/databend-sqlalchemy/)
- **GitHub**: [databend-driver](https://github.com/databendlabs/bendsql/tree/main/bindings/python) • [databend-sqlalchemy](https://github.com/databendlabs/databend-sqlalchemy)
- **GitHub**: [databend-driver](https://github.com/tidbcloud/lakesql/tree/main/bindings/python) • [databend-sqlalchemy](https://github.com/databendlabs/databend-sqlalchemy)
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/connect-using-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
## Resources

- **Crates.io**: [databend-driver](https://crates.io/crates/databend-driver)
- **GitHub Repository**: [BendSQL/driver](https://github.com/databendlabs/BendSQL/tree/main/driver)
- **GitHub Repository**: [LakeSQL/driver](https://github.com/tidbcloud/lakesql/tree/main/driver)
- **Rust Documentation**: [docs.rs/databend-driver](https://docs.rs/databend-driver)
4 changes: 2 additions & 2 deletions tidb-cloud-lake/guides/connection-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ summary: TiDB Cloud Lake supports multiple connection methods to suit different

| I want to... | Recommended |
|-------------|-------------|
| Run SQL queries interactively | **BendSQL** (CLI) or **DBeaver** (GUI) |
| Run SQL queries interactively | **LakeSQL** (CLI) or **DBeaver** (GUI) |
| Build an application | Language-specific **Driver** |
| Create dashboards & reports | **BI/Visualization Tools** |

Expand All @@ -29,7 +29,7 @@ summary: TiDB Cloud Lake supports multiple connection methods to suit different

| Tool | Type | Best For |
|------|------|----------|
| [BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md) | CLI | Developers, Scripting, Automation |
| [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md) | CLI | Developers, Scripting, Automation |
| [DBeaver](/tidb-cloud-lake/guides/connect-using-dbeaver.md) | GUI | Data Analysis, Visual Query Building |

## Drivers
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/editions.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The following are feature lists of {{{ .lake }}} among editions:
| Features | Personal | Business | Dedicated |
|----------|----------|----------|-----------|
| The next-generation SQL worksheet for advanced query development, data analysis, and visualization. | ✓ | ✓ | ✓ |
| BendSQL, a command line client for building/testing queries, loading/unloading bulk data, and automating DDL operations. | ✓ | ✓ | ✓ |
| LakeSQL, a command line client for building/testing queries, loading/unloading bulk data, and automating DDL operations. | ✓ | ✓ | ✓ |
| Programmatic interfaces for Rust, Python, Java, Node.js, .js, PHP, and Go. | ✓ | ✓ | ✓ |
| Native support for JDBC. | ✓ | ✓ | ✓ |
| Extensive ecosystem for connecting to ETL, BI, and other third-party vendors and technologies. | ✓ | ✓ | ✓ |
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/load-from-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Select the location of your files to find the recommended loading method:
|-------------|-----------------|-------------|---------------|
| **Staged Data Files** | **COPY INTO** | Fast, efficient loading from internal/external stages or user stage | [Loading from Stage](/tidb-cloud-lake/guides/load-from-stage.md) |
| **Cloud Storage** | **COPY INTO** | Load from Amazon S3, Google Cloud Storage, Microsoft Azure | [Loading from Bucket](/tidb-cloud-lake/guides/load-from-bucket.md) |
| **Local Files** | [**BendSQL**](https://github.com/databendlabs/BendSQL) | Databend's native CLI tool for local file loading | [Loading from Local File](/tidb-cloud-lake/guides/load-from-local-file.md) |
| **Local Files** | [**LakeSQL**](https://github.com/tidbcloud/lakesql) | Databend's native CLI tool for local file loading | [Loading from Local File](/tidb-cloud-lake/guides/load-from-local-file.md) |
| **Remote Files** | **COPY INTO** | Load data from remote HTTP/HTTPS locations | [Loading from Remote File](/tidb-cloud-lake/guides/load-from-remote-file.md) |
14 changes: 7 additions & 7 deletions tidb-cloud-lake/guides/load-from-local-file.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Loading from Local File
summary: Uploading your local data files to a stage or bucket before loading them into {{{ .lake }}} can be unnecessary. Instead, you can use BendSQL, the {{{ .lake }}} native CLI tool, to directly import the data. This simplifies the workflow and can save you storage fees.
summary: Uploading your local data files to a stage or bucket before loading them into {{{ .lake }}} can be unnecessary. Instead, you can use LakeSQL, the {{{ .lake }}} native CLI tool, to directly import the data. This simplifies the workflow and can save you storage fees.
---

# Loading from Local File

Uploading your local data files to a stage or bucket before loading them into {{{ .lake }}} can be unnecessary. Instead, you can use [BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md), the {{{ .lake }}} native CLI tool, to directly import the data. This simplifies the workflow and can save you storage fees.
Uploading your local data files to a stage or bucket before loading them into {{{ .lake }}} can be unnecessary. Instead, you can use [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md), the {{{ .lake }}} native CLI tool, to directly import the data. This simplifies the workflow and can save you storage fees.

Please note that the files must be in a format supported by {{{ .lake }}}, otherwise the data cannot be imported. For more information on the file formats supported by {{{ .lake }}}, see [Input & Output File Formats](/tidb-cloud-lake/sql/input-output-file-formats.md).

Expand All @@ -20,7 +20,7 @@ There are two methods to load data from local files:

## Tutorial 1 - Load from a Local File

This tutorial uses a CSV file as an example to demonstrate how to import data into {{{ .lake }}} using [BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md) from a local source.
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.

### Before You Begin

Expand All @@ -34,7 +34,7 @@ Readings in Database Systems,Michael Stonebraker,2004
### Step 1. Create Database and Table

```shell
bendsql
lakesql
root@localhost:8000/default> CREATE DATABASE book_db;

root@localhost:8000/default> USE book_db;
Expand All @@ -58,7 +58,7 @@ CREATE TABLE books (
Send loading data request with the following command:

```shell
bendsql --query='INSERT INTO book_db.books from @_databend_load file_format=(type=csv)' --data=@books.csv
lakesql --query='INSERT INTO book_db.books from @_databend_load file_format=(type=csv)' --data=@books.csv
```

- The `@_databend_load` is a placeholder representing local file data.
Expand Down Expand Up @@ -96,7 +96,7 @@ try (FileInputStream fileInputStream = new FileInputStream(new File("book.csv"))

> **Note:**
>
> Be sure that you are able to connect to the backend object storage for {{{ .lake }}} from local BendSQL directly.
> Be sure that you are able to connect to the backend object storage for {{{ .lake }}} from local LakeSQL directly.
> If not, you need to specify the `--set presigned_url_disabled=1` option to disable the presigned url feature.

### Step 3. Verify Loaded Data
Expand Down Expand Up @@ -147,7 +147,7 @@ CREATE TABLE bookcomments (
Send loading data request with the following command:

```shell
bendsql --query='INSERT INTO book_db.bookcomments(title,author,date) file_format=(type=csv)' --data=@books.csv
lakesql --query='INSERT INTO book_db.bookcomments(title,author,date) file_format=(type=csv)' --data=@books.csv
```

Notice that the `query` part above specifies the columns (title, author, and date) to match the loaded data.
Expand Down
10 changes: 5 additions & 5 deletions tidb-cloud-lake/guides/load-from-stage.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Loading from Stage
summary: "{{{ .lake }}} enables you to easily import data from files uploaded to either the user stage or an internal/external stage. To do so, you can first upload the files to a stage using BendSQL, and then employ the COPY INTO command to load the data from the staged file. Please note that the files must be in a format supported by {{{ .lake }}}, otherwise the data cannot be imported. For more information on the file formats supported by {{{ .lake }}}, see Input & Output File Formats."
summary: "{{{ .lake }}} enables you to easily import data from files uploaded to either the user stage or an internal/external stage. To do so, you can first upload the files to a stage using LakeSQL, and then employ the COPY INTO command to load the data from the staged file. Please note that the files must be in a format supported by {{{ .lake }}}, otherwise the data cannot be imported. For more information on the file formats supported by {{{ .lake }}}, see Input & Output File Formats."
---

# Loading from Stage

{{{ .lake }}} enables you to easily import data from files uploaded to either the user stage or an internal/external stage. To do so, you can first upload the files to a stage using [BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md), and then employ the [COPY INTO](/tidb-cloud-lake/sql/copy-into-table.md) command to load the data from the staged file. Please note that the files must be in a format supported by {{{ .lake }}}, otherwise the data cannot be imported. For more information on the file formats supported by {{{ .lake }}}, see [Input & Output File Formats](/tidb-cloud-lake/sql/input-output-file-formats.md).
{{{ .lake }}} enables you to easily import data from files uploaded to either the user stage or an internal/external stage. To do so, you can first upload the files to a stage using [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md), and then employ the [COPY INTO](/tidb-cloud-lake/sql/copy-into-table.md) command to load the data from the staged file. Please note that the files must be in a format supported by {{{ .lake }}}, otherwise the data cannot be imported. For more information on the file formats supported by {{{ .lake }}}, see [Input & Output File Formats](/tidb-cloud-lake/sql/input-output-file-formats.md).

![image](/media/tidb-cloud-lake/load-data-from-stage.png)

Expand Down Expand Up @@ -40,7 +40,7 @@ Follow this tutorial to upload the sample file to the user stage and load data f

### Step 1: Upload Sample File

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

```sql
root@localhost:8000/default> PUT fs:///Users/eric/Documents/books.parquet @~
Expand Down Expand Up @@ -107,7 +107,7 @@ my_internal_stage|Internal | 0|'root'@'%'| |

### Step 2: Upload Sample File

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

```sql
root@localhost:8000/default> CREATE STAGE my_internal_stage;
Expand Down Expand Up @@ -187,7 +187,7 @@ my_external_stage|External | |'root'@'%'| |

### Step 2: Upload Sample File

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

```sql
root@localhost:8000/default> PUT fs:///Users/eric/Documents/books.parquet @my_external_stage
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/mindsdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ CREATE TABLE pollution_measurement(
PM25 double
);

COPY INTO pollution_measurement FROM 'https://repo.databend.com/AirPolutionSeoul/Measurement_summary.csv' file_format=(type='CSV' skip_header=1);
COPY INTO pollution_measurement FROM 'https://repo.tidbcloud.com/AirPolutionSeoul/Measurement_summary.csv' file_format=(type='CSV' skip_header=1);
```

### Step 2. Connect MindsDB to {{{ .lake }}}
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/stage-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ summary: A stage is a virtual location where data files reside. Files in a stage

In {{{ .lake }}}, a stage is a virtual location where data files reside. Files in a stage can be queried directly or loaded into a table. Alternatively, you can unload data from a table into a stage as a file. The beauty of using a stage is that you can access it for data loading and unloading as conveniently as you would with folders on your computer. Just as when you put a file in a folder, you don't necessarily need to know its exact location on your hard disk. When accessing a file in a stage, you only need to specify the stage name and the file name, such as `@mystage/mydatafile.csv`, rather than specifying its location in the bucket of your object storage. Similar to folders on your computer, you can create as many stages as you need in {{{ .lake }}}. However, it's important to note that a stage cannot contain another stage. Each stage operates independently and does not encompass other stages.

Utilizing a stage for loading data also improves the efficiency of uploading, managing, and filtering your data files. With [BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md), you can easily upload or download files to or from a stage using a single command. When loading data into {{{ .lake }}}, you can directly specify a stage in the COPY INTO command, allowing the command to read and even filter data files from that stage. Similarly, when exporting data from {{{ .lake }}}, you can dump your data files into a stage.
Utilizing a stage for loading data also improves the efficiency of uploading, managing, and filtering your data files. With [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md), you can easily upload or download files to or from a stage using a single command. When loading data into {{{ .lake }}}, you can directly specify a stage in the COPY INTO command, allowing the command to read and even filter data files from that stage. Similarly, when exporting data from {{{ .lake }}}, you can dump your data files into a stage.

## Stage Types

Expand Down
8 changes: 4 additions & 4 deletions tidb-cloud-lake/guides/upload-to-stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ summary: "{{{ .lake }}} recommends two file upload methods for stages PRESIGN an

The PRESIGN method generates a time-limited URL with a signature, which clients can use to securely initiate file uploads. This URL grants temporary access to the designated stage, allowing clients to directly transfer data without relying on {{{ .lake }}} servers for the entire process, enhancing both security and efficiency.

If you're using [BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md) to manage files in a stage, you can use the PUT command for uploading files and the GET command for downloading files.
If you're using [LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md) to manage files in a stage, you can use the PUT command for uploading files and the GET command for downloading files.

- The GET command currently can only download all files in a stage, not individual ones.
- These commands are exclusive to BendSQL and the GET command will not function when {{{ .lake }}} uses the file system as the storage backend.
- These commands are exclusive to LakeSQL and the GET command will not function when {{{ .lake }}} uses the file system as the storage backend.

## Uploading with Presigned URL

Expand Down Expand Up @@ -159,7 +159,7 @@ Result:

### Uploading with PUT Command

The following examples demonstrate how to use BendSQL to upload a sample file ([books.parquet](https://datafuse-1253727613.cos.ap-hongkong.myqcloud.com/data/books.parquet)) to the user stage, an internal stage, and an external stage with the PUT command.
The following examples demonstrate how to use LakeSQL to upload a sample file ([books.parquet](https://datafuse-1253727613.cos.ap-hongkong.myqcloud.com/data/books.parquet)) to the user stage, an internal stage, and an external stage with the PUT command.

<SimpleTab groupId="PUT">

Expand Down Expand Up @@ -302,7 +302,7 @@ Result:

### Downloading with GET Command

The following examples demonstrate how to use BendSQL to download a sample file ([books.parquet](https://datafuse-1253727613.cos.ap-hongkong.myqcloud.com/data/books.parquet)) from the user stage, an internal stage, and an external stage with the GET command.
The following examples demonstrate how to use LakeSQL to download a sample file ([books.parquet](https://datafuse-1253727613.cos.ap-hongkong.myqcloud.com/data/books.parquet)) from the user stage, an internal stage, and an external stage with the GET command.

<SimpleTab groupId="GET">

Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/guides/warehouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Connecting to a warehouse provides the compute resources required to run queries

| Client | Type | Best For | Key Features |
| ------------------------------------------ | --------------- | ----------------------------- | ----------------------------------------------------- |
| **[BendSQL](/tidb-cloud-lake/guides/connect-using-bendsql.md)** | Command Line | Developers, Scripts | Native CLI, Rich formatting, Multiple install options |
| **[LakeSQL](/tidb-cloud-lake/guides/connect-using-lakesql.md)** | Command Line | Developers, Scripts | Native CLI, Rich formatting, Multiple install options |
| **[DBeaver](/tidb-cloud-lake/guides/connect-using-dbeaver.md)** | GUI Application | Data Analysis, Visual Queries | Built-in driver, Cross-platform, Query builder |

#### Developer Drivers
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/sql/alter-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ ALTER USER user1 WITH UNSET NETWORK POLICY;
2. Verify the default role of user "user1" using the [SHOW ROLES](/tidb-cloud-lake/sql/show-roles.md) command:

```sql title='Connect as user "user1":'
eric@Erics-iMac ~ % bendsql --user user1 --password abc123
eric@Erics-iMac ~ % lakesql --user user1 --password abc123
show roles;
┌───────────────────────────────────────────────────────┐
│ name │ inherited_roles │ is_current │ is_default │
Expand Down
6 changes: 3 additions & 3 deletions tidb-cloud-lake/sql/apache-icebergtm-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ Once the TPC-H tables are loaded, you can query the data in {{{ .lake }}}:
datafuselabs/databend
```

2. Connect to {{{ .lake }}} using BendSQL first, and then create an Iceberg catalog:
2. Connect to {{{ .lake }}} using LakeSQL first, and then create an Iceberg catalog:

```bash
bendsql
lakesql
```

```bash
Welcome to BendSQL 0.24.1-f1f7de0(2024-12-04T12:31:18.526234000Z).
Welcome to LakeSQL 0.24.1-f1f7de0(2024-12-04T12:31:18.526234000Z).
Connecting to localhost:8000 as user root.
Connected to Databend Query v1.2.725-8d073f6b7a(rust-1.88.0-nightly-2025-04-21T11:49:03.577976082Z)
Loaded 1436 auto complete keywords from server.
Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud-lake/sql/create-temp-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Creates a temporary table that is automatically dropped at the end of the sessio
- A temporary table with the same name as a normal table takes precedence, hiding the normal table until dropped. See [Example-2](#example-2).
- No privileges are required to create or operate on a temporary table.
- {{{ .lake }}} supports creating temporary tables with the [Fuse Engine](/tidb-cloud-lake/sql/table-engines.md).
- To create temporary tables using BendSQL, ensure you are using the latest version of BendSQL.
- To create temporary tables using LakeSQL, ensure you are using the latest version of LakeSQL.

## Syntax

Expand Down
Loading
Loading