Skip to content

Commit e5f4a57

Browse files
committed
update database docs
1 parent 7095ee8 commit e5f4a57

File tree

5 files changed

+48
-8
lines changed

5 files changed

+48
-8
lines changed

docs/sql-create-database.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ SELECT * FROM table(my_database.my_stream);
2828
Please note User-Defined Functions are global and not bound to a specific database.
2929

3030
## External Database
31-
Starting from [Timeplus Enterprise 2.8](/enterprise-v2.8), you can create an external database to connect to external MySQL databases.
31+
Starting from [Timeplus Enterprise 2.8](/enterprise-v2.8), you can create an external database to connect to external MySQL and Iceberg databases.
32+
33+
### MySQL Database
3234

3335
Syntax:
3436
```sql
3537
CREATE DATABASE mysql_database
3638
SETTINGS
3739
type = 'mysql',
38-
host = 'localhost',
39-
port = 3306,
40+
address = 'localhost:port',
4041
user = 'root',
4142
password = 'password',
4243
database = 'my_database'
@@ -53,6 +54,31 @@ Or query them:
5354
```sql
5455
SELECT * FROM mysql_database.my_stream;
5556
```
57+
58+
### Iceberg Database
59+
60+
Syntax:
61+
```sql
62+
CREATE DATABASE <database_name>
63+
SETTINGS
64+
type='iceberg',
65+
catalog_uri='<catalog_uri>',
66+
catalog_type='rest',
67+
warehouse='<warehouse_path>',
68+
storage_endpoint='<s3_endpoint>',
69+
rest_catalog_sigv4_enabled=<true|false>,
70+
rest_catalog_signing_region='<region>',
71+
rest_catalog_signing_name='<service_name>',
72+
use_environment_credentials=<true|false>,
73+
credential='<username:password>',
74+
catalog_credential='<username:password>',
75+
storage_credential='<username:password>';
76+
```
77+
78+
[Learn more](/iceberg#syntax)
79+
80+
5681
## See also
82+
* [USE](/sql-use) - Use a database
5783
* [SHOW DATABASES](/sql-show-databases) - Show databases
5884
* [DROP DATABASE](/sql-drop-database) - Drop databases

docs/sql-use.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# USE
2+
Starting from [Timeplus Enterprise 2.6](/enterprise-v2.6), you can create a database to organize Timeplus streams, materialized views, or connect to other systems such as MySQL and Iceberg without creating multiple external tables repeating the connection information.
3+
4+
Once the database is created, run `USE my_database` to switch to the database.
5+
6+
```sql
7+
USE my_database;
8+
```
9+
10+
## See also
11+
* [CREATE DATABASE](/sql-create-database) - Create databases
12+
* [SHOW DATABASES](/sql-show-databases) - Show databases
13+
* [DROP DATABASE](/sql-drop-database) - Drop databases

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@docusaurus/module-type-aliases": "3.7.0",
4242
"@docusaurus/tsconfig": "3.7.0",
4343
"@docusaurus/types": "3.7.0",
44-
"@types/react": "^19.1.1",
44+
"@types/react": "^19.1.2",
4545
"typescript": "~5.8.3"
4646
},
4747
"engines": {

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ const sidebars = {
347347
"sql-system-pause",
348348
"sql-system-resume",
349349
"sql-truncate-stream",
350+
"sql-use",
350351
],
351352
},
352353
{

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3989,10 +3989,10 @@
39893989
"@types/scheduler" "*"
39903990
csstype "^3.0.2"
39913991

3992-
"@types/react@^19.1.1":
3993-
version "19.1.1"
3994-
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.1.tgz#f7f2bb4a0a8d22b9ee4b8f6e27f0c78d76eb7f9b"
3995-
integrity sha512-ePapxDL7qrgqSF67s0h9m412d9DbXyC1n59O2st+9rjuuamWsZuD2w55rqY12CbzsZ7uVXb5Nw0gEp9Z8MMutQ==
3992+
"@types/react@^19.1.2":
3993+
version "19.1.2"
3994+
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.2.tgz#11df86f66f188f212c90ecb537327ec68bfd593f"
3995+
integrity sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==
39963996
dependencies:
39973997
csstype "^3.0.2"
39983998

0 commit comments

Comments
 (0)