Skip to content

Commit ed474dd

Browse files
committed
update doc
1 parent d3e61aa commit ed474dd

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

site/content/in-dev/unreleased/generic-table.md

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ There are two ways to work with Polaris Generic Tables today:
6666
### Create a Generic Table
6767

6868
To create a generic table, you need to provide the corresponding fields as described in [What is a Generic Table](#what-is-a-generic-table).
69-
Following is the REST API for creating a generic Table:
7069

71-
```shell
72-
POST /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables
73-
```
70+
The REST API for creating a generic Table is `POST /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables`, and the
71+
request body looks like the following:
72+
7473
```json
7574
{
7675
"name": "<table_name>",
@@ -84,31 +83,26 @@ POST /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables
8483
```
8584

8685
Here is an example to create a generic table with name `delta_table` and format as `delta` under a namespace `delta_ns`
87-
for catalog `delta_catalog`:
86+
for catalog `delta_catalog` using curl:
8887

8988
```shell
90-
POST /polaris/v1/delta_catalog/namespaces/delta_ns/generic-tables
91-
```
92-
```json
93-
{
94-
"name": "delta_table",
95-
"format": "delta",
96-
"base-location": "s3://<my-bucket>/path/to/table",
97-
"doc": "delta table example",
98-
"properties": {
99-
"key1": "value1"
100-
}
101-
}
89+
curl -X POST http://localhost:8181/api/catalog/polaris/v1/delta_catalog/namespaces/delta_ns/generic-tables \
90+
-H "Content-Type: application/json" \
91+
-d '{
92+
"name": "delta_table",
93+
"format": "delta",
94+
"base-location": "s3://<my-bucket>/path/to/table",
95+
"doc": "delta table example",
96+
"properties": {
97+
"key1": "value1"
98+
}
99+
}'
102100
```
103101

104102
### Load a Generic Table
105-
The REST API for load a generic table is the following:
106-
107-
```shell
108-
GET /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{generic-table}
109-
```
103+
The REST endpoint for load a generic table is `GET /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{generic-table}`.
110104

111-
Here is an example to load the table `delta_table`:
105+
Here is an example to load the table `delta_table` using curl:
112106
```shell
113107
GET /polaris/v1/delta_catalog/namespaces/delta_ns/generic-tables/{generic-table}
114108
```

0 commit comments

Comments
 (0)