Skip to content

Commit 381adda

Browse files
committed
Update 92-attach-table.md
1 parent 78e9eef commit 381adda

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/en/sql-reference/10-sql-commands/00-ddl/01-table/92-attach-table.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ import EEFeature from '@site/src/components/EEFeature';
1313

1414
Attaches an existing table to another one. The command moves the data and schema of a table from one database to another, but without actually copying the data. Instead, it creates a link that points to the original table data for accessing the data.
1515

16-
Attach Table enables you to seamlessly connect a table in the cloud service platform to an existing table deployed in a private deployment environment without the need to physically move the data. This is particularly useful when you want to migrate data from a private deployment of Databend to [Databend Cloud](https://www.databend.com) while minimizing the data transfer overhead.
16+
- Attach Table enables you to seamlessly connect a table in the cloud service platform to an existing table deployed in a private deployment environment without the need to physically move the data. This is particularly useful when you want to migrate data from a private deployment of Databend to [Databend Cloud](https://www.databend.com) while minimizing the data transfer overhead.
1717

18-
The attached table operates in READ_ONLY mode. In this mode, changes in the source table are instantly reflected in the attached table. However, the attached table is exclusively for querying purposes and does not support updates. This means INSERT, UPDATE, and DELETE operations are not allowed on the attached table; only SELECT queries can be executed.
18+
- The attached table operates in READ_ONLY mode. In this mode, changes in the source table are instantly reflected in the attached table. However, the attached table is exclusively for querying purposes and does not support updates. This means INSERT, UPDATE, and DELETE operations are not allowed on the attached table; only SELECT queries can be executed.
1919

2020
## Syntax
2121

2222
```sql
23-
ATTACH TABLE <target_table_name> '<source_table_data_URI>'
23+
ATTACH TABLE <target_table_name> [ ( <column_list> ) ] '<source_table_data_URI>'
2424
CONNECTION = ( <connection_parameters> )
2525
```
26+
- `<column_list>`: An optional list of columns to include from the source table, allowing users to specify only the necessary columns instead of loading all available data. If not specified, all columns from the source table will be included.
2627

2728
- `<source_table_data_URI>` represents the path to the source table's data. For S3-like object storage, the format is `s3://<bucket-name>/<database_ID>/<table_ID>`, for example, _s3://databend-toronto/1/23351/_, which represents the exact path to the table folder within the bucket.
2829

0 commit comments

Comments
 (0)