Skip to content

Commit 08f1222

Browse files
authored
Update iceberg-catalog.md (#1673)
1 parent 2f00a9e commit 08f1222

File tree

1 file changed

+26
-30
lines changed

1 file changed

+26
-30
lines changed

docs/en/guides/51-access-data-lake/02-iceberg/iceberg-catalog.md

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,26 @@ Defines and establishes a new catalog in the Databend query engine.
4444

4545
```sql
4646
CREATE CATALOG <catalog_name>
47-
TYPE = <catalog_type>
48-
CONNECTION = (
49-
METASTORE_ADDRESS = '<hive_metastore_address>'
50-
URL = '<data_storage_path>'
51-
<connection_parameter> = '<connection_parameter_value>'
52-
<connection_parameter> = '<connection_parameter_value>'
47+
TYPE=ICEBERG
48+
CONNECTION=(
49+
TYPE='<connection_type>'
50+
ADDRESS='<address>'
51+
WAREHOUSE='<warehouse_location>'
52+
"<connection_parameter>"='<connection_parameter_value>'
53+
"<connection_parameter>"='<connection_parameter_value>'
5354
...
54-
)
55+
);
5556
```
5657

57-
| Parameter | Required? | Description |
58-
|-----------------------|-----------|---------------------------------------------------------------------------------------------------------------------------|
59-
| TYPE | Yes | Type of the catalog: 'HIVE' for Hive catalog or 'ICEBERG' for Iceberg catalog. |
60-
| METASTORE_ADDRESS | No | Hive Metastore address. Required for Hive catalog only.|
61-
| URL | Yes | Location of the external storage linked to this catalog. This could be a bucket or a folder within a bucket. For example, 's3://databend-toronto/'. |
62-
| connection_parameter | Yes | Connection parameters to establish connections with external storage. The required parameters vary based on the specific storage service and authentication methods. Refer to [Connection Parameters](/sql/sql-reference/connect-parameters) for detailed information. |
58+
| Parameter | Required? | Description |
59+
|------------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
60+
| `<catalog_name>` | Yes | The name of the catalog you want to create. |
61+
| `TYPE` | Yes | Specifies the catalog type. For Iceberg, set to `ICEBERG`. |
62+
| `CONNECTION` | Yes | The connection parameters for the Iceberg catalog. |
63+
| `TYPE` (inside `CONNECTION`) | Yes | The connection type. For Iceberg, it is typically set to `rest` for REST-based connection. |
64+
| `ADDRESS` | Yes | The address or URL of the Iceberg service (e.g., `http://127.0.0.1:8181`). |
65+
| `WAREHOUSE` | Yes | The location of the Iceberg warehouse, usually an S3 bucket or compatible object storage system. |
66+
| `<connection_parameter>` | Yes | Connection parameters to establish connections with external storage. The required parameters vary based on the specific storage service and authentication methods. Refer to [Connection Parameters](/sql/sql-reference/connect-parameters) for detailed information. If you're using Amazon S3 or S3-compatible storage systems, make sure to prefix the parameters with `s3.` (e.g., `s3.region`, `s3.endpoint`). |
6367

6468
:::note
6569
To read data from HDFS, you need to set the following environment variables before starting Databend. These environment variables ensure that Databend can access the necessary Java and Hadoop dependencies to interact with HDFS effectively. Make sure to replace "/path/to/java" and "/path/to/hadoop" with the actual paths to your Java and Hadoop installations, and adjust the CLASSPATH to include all the required Hadoop JAR files.
@@ -103,24 +107,16 @@ USE CATALOG <catalog_name>
103107

104108
## Usage Examples
105109

106-
This example demonstrates the creation of a catalog configured to interact with an Iceberg data storage located in MinIO at 's3://databend/iceberg/'.
110+
This example shows how to create an Iceberg catalog using a REST-based connection, specifying the service address, warehouse location (S3), and optional parameters like AWS region and custom endpoint:
107111

108112
```sql
109-
CREATE CATALOG iceberg_ctl
110-
TYPE = ICEBERG
111-
CONNECTION = (
112-
URL = 's3://databend/iceberg/'
113-
AWS_KEY_ID = 'minioadmin'
114-
AWS_SECRET_KEY = 'minioadmin'
115-
ENDPOINT_URL = 'http://127.0.0.1:9000'
116-
REGION = 'us-east-2'
113+
CREATE CATALOG ctl
114+
TYPE=ICEBERG
115+
CONNECTION=(
116+
TYPE='rest'
117+
ADDRESS='http://127.0.0.1:8181'
118+
WAREHOUSE='s3://iceberg-tpch'
119+
"s3.region"='us-east-1'
120+
"s3.endpoint"='http://127.0.0.1:9000'
117121
);
118-
119-
SHOW CREATE CATALOG iceberg_ctl;
120-
121-
┌─────────────┬─────────┬────────────────────────────────────────────────────────────────────────────────────────┐
122-
│ Catalog │ Type │ Option │
123-
├─────────────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────┤
124-
│ iceberg_ctl │ iceberg │ STORAGE PARAMS s3 | bucket=databend, root=/iceberg/, endpoint=http://127.0.0.1:9000
125-
└─────────────┴─────────┴────────────────────────────────────────────────────────────────────────────────────────┘
126122
```

0 commit comments

Comments
 (0)