Skip to content

Commit b65bd01

Browse files
authored
[opt](unity) add more example (#3111)
## Versions - [x] dev - [x] 4.x - [x] 3.x - [ ] 2.1 ## Languages - [x] Chinese - [x] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built
1 parent c6e1588 commit b65bd01

6 files changed

Lines changed: 180 additions & 0 deletions

File tree

docs/lakehouse/best-practices/doris-unity-catalog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ Click the user avatar in the top right corner, go to the `Settings` page, and se
7373
### Creating a Catalog
7474

7575
```sql
76+
-- Use oath2 credential and vended credentials
77+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
78+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
79+
"type" = "iceberg",
80+
"warehouse" = "my-unity-catalog",
81+
"iceberg.catalog.type" = "rest",
82+
"iceberg.rest.security.type" = "oauth2",
83+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
84+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
85+
"iceberg.rest.oauth2.scope" = "all-apis",
86+
"iceberg.rest.vended-credentials-enabled" = "true"
87+
);
88+
89+
-- Use PAT and vended credentials
7690
CREATE CATALOG dbx_unity_catalog PROPERTIES (
7791
"uri" = "https://<dbc-account>.cloud.databricks.com/api/2.1/unity-catalog/iceberg-rest/",
7892
"type" = "iceberg",
@@ -82,6 +96,22 @@ CREATE CATALOG dbx_unity_catalog PROPERTIES (
8296
"iceberg.rest.oauth2.token" = "<token>",
8397
"iceberg.rest.vended-credentials-enabled" = "true"
8498
);
99+
100+
-- Use oath2 credential and static ak/sk for accessing aws s3
101+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
102+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
103+
"type" = "iceberg",
104+
"warehouse" = "my-unity-catalog",
105+
"iceberg.catalog.type" = "rest",
106+
"iceberg.rest.security.type" = "oauth2",
107+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
108+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
109+
"iceberg.rest.oauth2.scope" = "all-apis",
110+
"s3.endpoint" = "https://s3.<region>.amazonaws.com",
111+
"s3.access_key" = "<ak>",
112+
"s3.secret_key" = "<sk>",
113+
"s3.region" = "<region>"
114+
);
85115
```
86116

87117
### Accessing the Catalog

i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/best-practices/doris-unity-catalog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ INSERT INTO `my-unity-catalog`.default.iceberg_table VALUES(1, "jack");
7373
### 创建 Catalog
7474

7575
```sql
76+
-- Use oath2 credential and vended credentials
77+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
78+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
79+
"type" = "iceberg",
80+
"warehouse" = "my-unity-catalog",
81+
"iceberg.catalog.type" = "rest",
82+
"iceberg.rest.security.type" = "oauth2",
83+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
84+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
85+
"iceberg.rest.oauth2.scope" = "all-apis",
86+
"iceberg.rest.vended-credentials-enabled" = "true"
87+
);
88+
89+
-- Use PAT and vended credentials
7690
CREATE CATALOG dbx_unity_catalog PROPERTIES (
7791
"uri" = "https://<dbc-account>.cloud.databricks.com/api/2.1/unity-catalog/iceberg-rest/",
7892
"type" = "iceberg",
@@ -82,6 +96,22 @@ CREATE CATALOG dbx_unity_catalog PROPERTIES (
8296
"iceberg.rest.oauth2.token" = "<token>",
8397
"iceberg.rest.vended-credentials-enabled" = "true"
8498
);
99+
100+
-- Use oath2 credential and static ak/sk for accessing aws s3
101+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
102+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
103+
"type" = "iceberg",
104+
"warehouse" = "my-unity-catalog",
105+
"iceberg.catalog.type" = "rest",
106+
"iceberg.rest.security.type" = "oauth2",
107+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
108+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
109+
"iceberg.rest.oauth2.scope" = "all-apis",
110+
"s3.endpoint" = "https://s3.<region>.amazonaws.com",
111+
"s3.access_key" = "<ak>",
112+
"s3.secret_key" = "<sk>",
113+
"s3.region" = "<region>"
114+
);
85115
```
86116

87117
### 访问 Catalog

i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/best-practices/doris-unity-catalog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ INSERT INTO `my-unity-catalog`.default.iceberg_table VALUES(1, "jack");
7373
### 创建 Catalog
7474

7575
```sql
76+
-- Use oath2 credential and vended credentials
77+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
78+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
79+
"type" = "iceberg",
80+
"warehouse" = "my-unity-catalog",
81+
"iceberg.catalog.type" = "rest",
82+
"iceberg.rest.security.type" = "oauth2",
83+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
84+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
85+
"iceberg.rest.oauth2.scope" = "all-apis",
86+
"iceberg.rest.vended-credentials-enabled" = "true"
87+
);
88+
89+
-- Use PAT and vended credentials
7690
CREATE CATALOG dbx_unity_catalog PROPERTIES (
7791
"uri" = "https://<dbc-account>.cloud.databricks.com/api/2.1/unity-catalog/iceberg-rest/",
7892
"type" = "iceberg",
@@ -82,6 +96,22 @@ CREATE CATALOG dbx_unity_catalog PROPERTIES (
8296
"iceberg.rest.oauth2.token" = "<token>",
8397
"iceberg.rest.vended-credentials-enabled" = "true"
8498
);
99+
100+
-- Use oath2 credential and static ak/sk for accessing aws s3
101+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
102+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
103+
"type" = "iceberg",
104+
"warehouse" = "my-unity-catalog",
105+
"iceberg.catalog.type" = "rest",
106+
"iceberg.rest.security.type" = "oauth2",
107+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
108+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
109+
"iceberg.rest.oauth2.scope" = "all-apis",
110+
"s3.endpoint" = "https://s3.<region>.amazonaws.com",
111+
"s3.access_key" = "<ak>",
112+
"s3.secret_key" = "<sk>",
113+
"s3.region" = "<region>"
114+
);
85115
```
86116

87117
### 访问 Catalog

i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/lakehouse/best-practices/doris-unity-catalog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ INSERT INTO `my-unity-catalog`.default.iceberg_table VALUES(1, "jack");
7373
### 创建 Catalog
7474

7575
```sql
76+
-- Use oath2 credential and vended credentials
77+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
78+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
79+
"type" = "iceberg",
80+
"warehouse" = "my-unity-catalog",
81+
"iceberg.catalog.type" = "rest",
82+
"iceberg.rest.security.type" = "oauth2",
83+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
84+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
85+
"iceberg.rest.oauth2.scope" = "all-apis",
86+
"iceberg.rest.vended-credentials-enabled" = "true"
87+
);
88+
89+
-- Use PAT and vended credentials
7690
CREATE CATALOG dbx_unity_catalog PROPERTIES (
7791
"uri" = "https://<dbc-account>.cloud.databricks.com/api/2.1/unity-catalog/iceberg-rest/",
7892
"type" = "iceberg",
@@ -82,6 +96,22 @@ CREATE CATALOG dbx_unity_catalog PROPERTIES (
8296
"iceberg.rest.oauth2.token" = "<token>",
8397
"iceberg.rest.vended-credentials-enabled" = "true"
8498
);
99+
100+
-- Use oath2 credential and static ak/sk for accessing aws s3
101+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
102+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
103+
"type" = "iceberg",
104+
"warehouse" = "my-unity-catalog",
105+
"iceberg.catalog.type" = "rest",
106+
"iceberg.rest.security.type" = "oauth2",
107+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
108+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
109+
"iceberg.rest.oauth2.scope" = "all-apis",
110+
"s3.endpoint" = "https://s3.<region>.amazonaws.com",
111+
"s3.access_key" = "<ak>",
112+
"s3.secret_key" = "<sk>",
113+
"s3.region" = "<region>"
114+
);
85115
```
86116

87117
### 访问 Catalog

versioned_docs/version-3.x/lakehouse/best-practices/doris-unity-catalog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ Click the user avatar in the top right corner, go to the `Settings` page, and se
7373
### Creating a Catalog
7474

7575
```sql
76+
-- Use oath2 credential and vended credentials
77+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
78+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
79+
"type" = "iceberg",
80+
"warehouse" = "my-unity-catalog",
81+
"iceberg.catalog.type" = "rest",
82+
"iceberg.rest.security.type" = "oauth2",
83+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
84+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
85+
"iceberg.rest.oauth2.scope" = "all-apis",
86+
"iceberg.rest.vended-credentials-enabled" = "true"
87+
);
88+
89+
-- Use PAT and vended credentials
7690
CREATE CATALOG dbx_unity_catalog PROPERTIES (
7791
"uri" = "https://<dbc-account>.cloud.databricks.com/api/2.1/unity-catalog/iceberg-rest/",
7892
"type" = "iceberg",
@@ -82,6 +96,22 @@ CREATE CATALOG dbx_unity_catalog PROPERTIES (
8296
"iceberg.rest.oauth2.token" = "<token>",
8397
"iceberg.rest.vended-credentials-enabled" = "true"
8498
);
99+
100+
-- Use oath2 credential and static ak/sk for accessing aws s3
101+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
102+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
103+
"type" = "iceberg",
104+
"warehouse" = "my-unity-catalog",
105+
"iceberg.catalog.type" = "rest",
106+
"iceberg.rest.security.type" = "oauth2",
107+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
108+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
109+
"iceberg.rest.oauth2.scope" = "all-apis",
110+
"s3.endpoint" = "https://s3.<region>.amazonaws.com",
111+
"s3.access_key" = "<ak>",
112+
"s3.secret_key" = "<sk>",
113+
"s3.region" = "<region>"
114+
);
85115
```
86116

87117
### Accessing the Catalog

versioned_docs/version-4.x/lakehouse/best-practices/doris-unity-catalog.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ Click the user avatar in the top right corner, go to the `Settings` page, and se
7373
### Creating a Catalog
7474

7575
```sql
76+
-- Use oath2 credential and vended credentials
77+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
78+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
79+
"type" = "iceberg",
80+
"warehouse" = "my-unity-catalog",
81+
"iceberg.catalog.type" = "rest",
82+
"iceberg.rest.security.type" = "oauth2",
83+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
84+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
85+
"iceberg.rest.oauth2.scope" = "all-apis",
86+
"iceberg.rest.vended-credentials-enabled" = "true"
87+
);
88+
89+
-- Use PAT and vended credentials
7690
CREATE CATALOG dbx_unity_catalog PROPERTIES (
7791
"uri" = "https://<dbc-account>.cloud.databricks.com/api/2.1/unity-catalog/iceberg-rest/",
7892
"type" = "iceberg",
@@ -82,6 +96,22 @@ CREATE CATALOG dbx_unity_catalog PROPERTIES (
8296
"iceberg.rest.oauth2.token" = "<token>",
8397
"iceberg.rest.vended-credentials-enabled" = "true"
8498
);
99+
100+
-- Use oath2 credential and static ak/sk for accessing aws s3
101+
CREATE CATALOG dbx_unity_catalog PROPERTIES (
102+
"uri" = "https://dbc-xx.cloud.databricks.com:443/api/2.1/unity-catalog/iceberg-rest/",
103+
"type" = "iceberg",
104+
"warehouse" = "my-unity-catalog",
105+
"iceberg.catalog.type" = "rest",
106+
"iceberg.rest.security.type" = "oauth2",
107+
"iceberg.rest.oauth2.credential" = "clientid:clientsecret",
108+
"iceberg.rest.oauth2.server-uri" = "https://dbc-xx.cloud.databricks.com:443/oidc/v1/token",
109+
"iceberg.rest.oauth2.scope" = "all-apis",
110+
"s3.endpoint" = "https://s3.<region>.amazonaws.com",
111+
"s3.access_key" = "<ak>",
112+
"s3.secret_key" = "<sk>",
113+
"s3.region" = "<region>"
114+
);
85115
```
86116

87117
### Accessing the Catalog

0 commit comments

Comments
 (0)