Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
API description for OpenHouse Tables API
Base URLs:
License: Apache 2.0
Code samples
PUT /v0/databases/{databaseId}/tables/{tableId}/iceberg/v2/snapshots
Puts Iceberg snapshots to Table
Body parameter
{
"baseTableVersion": "Base table version to apply the change to",
"jsonSnapshots": [
"string"
],
"createUpdateTableRequestBody": {
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"},{\"id\":3,\"required\":true,\"name\":\"timestampColumn\",\"type\":\"timestamp\"}]}",
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": "\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]",
"tableProperties": {
"key": "value"
},
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"stageCreate": false,
"baseTableVersion": "string",
"tableType": "PRIMARY_TABLE"
}
}
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
tableId | path | string | true | Table ID |
body | body | IcebergSnapshotsRequestBody | true | none |
Example responses
200 Response
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Iceberg snapshot PUT: UPDATED | GetTableResponseBody |
201 | Created | Iceberg snapshot PUT: CREATED | GetTableResponseBody |
400 | Bad Request | Iceberg snapshot PUT: BAD_REQUEST | GetTableResponseBody |
409 | Conflict | Iceberg snapshot PUT: CONFLICT | GetTableResponseBody |
Code samples
GET /v1/databases/{databaseId}/tables/{tableId}
Returns a Table resource identified by tableId in the database identified by databaseId.
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
tableId | path | string | true | Table ID |
Example responses
200 Response
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Table GET: OK | GetTableResponseBody |
401 | Unauthorized | Table GET: UNAUTHORIZED | GetTableResponseBody |
403 | Forbidden | Table GET: FORBIDDEN | GetTableResponseBody |
404 | Not Found | Table GET: NOT_FOUND | GetTableResponseBody |
Code samples
PUT /v1/databases/{databaseId}/tables/{tableId}
Updates or creates a Table and returns the Table resources. If the table does not exist, it will be created. If the table exists, it will be updated.
Body parameter
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"},{\"id\":3,\"required\":true,\"name\":\"timestampColumn\",\"type\":\"timestamp\"}]}",
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": "\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]",
"tableProperties": {
"key": "value"
},
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"stageCreate": false,
"baseTableVersion": "string",
"tableType": "PRIMARY_TABLE"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
tableId | path | string | true | Table ID |
body | body | CreateUpdateTableRequestBody | true | none |
Example responses
200 Response
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Table PUT: UPDATED | GetTableResponseBody |
201 | Created | Table PUT: CREATED | GetTableResponseBody |
400 | Bad Request | Table PUT: BAD_REQUEST | GetTableResponseBody |
401 | Unauthorized | Table PUT: UNAUTHORIZED | GetTableResponseBody |
403 | Forbidden | Table PUT: FORBIDDEN | GetTableResponseBody |
404 | Not Found | Table PUT: DB_NOT_FOUND | GetTableResponseBody |
Code samples
DELETE /v1/databases/{databaseId}/tables/{tableId}
Deletes a table resource
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
tableId | path | string | true | Table ID |
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Table DELETE: NO_CONTENT | None |
400 | Bad Request | Table DELETE: BAD_REQUEST | None |
401 | Unauthorized | Table DELETE: UNAUTHORIZED | None |
403 | Forbidden | Table DELETE: FORBIDDEN | None |
404 | Not Found | Table DELETE: TBL_DB_NOT_FOUND | None |
Code samples
POST /v1/databases/{databaseId}/tables/search
Returns a list of Table resources present in a database. Only filter supported is 'database_id'.
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
Example responses
200 Response
{
"results": [
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Table SEARCH: OK | GetAllTablesResponseBody |
400 | Bad Request | Table SEARCH: BAD_REQUEST | GetAllTablesResponseBody |
401 | Unauthorized | Table SEARCH: UNAUTHORIZED | GetAllTablesResponseBody |
403 | Forbidden | Table SEARCH: FORBIDDEN | GetAllTablesResponseBody |
404 | Not Found | Table SEARCH: NOT_FOUND | GetAllTablesResponseBody |
Code samples
GET /v1/databases/{databaseId}/tables
Returns a list of Table resources present in a database identified by databaseId.
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
Example responses
200 Response
{
"results": [
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Table GET_ALL: OK | GetAllTablesResponseBody |
401 | Unauthorized | Table GET_ALL: UNAUTHORIZED | GetAllTablesResponseBody |
404 | Not Found | Table GET_ALL: DB NOT_FOUND | GetAllTablesResponseBody |
Code samples
POST /v1/databases/{databaseId}/tables
Creates and returns a Table resource in a database identified by databaseId
Body parameter
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"},{\"id\":3,\"required\":true,\"name\":\"timestampColumn\",\"type\":\"timestamp\"}]}",
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": "\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]",
"tableProperties": {
"key": "value"
},
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"stageCreate": false,
"baseTableVersion": "string",
"tableType": "PRIMARY_TABLE"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
body | body | CreateUpdateTableRequestBody | true | none |
Example responses
201 Response
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Table POST: CREATED | GetTableResponseBody |
400 | Bad Request | Table POST: BAD_REQUEST | GetTableResponseBody |
401 | Unauthorized | Table POST: UNAUTHORIZED | GetTableResponseBody |
403 | Forbidden | Table POST: FORBIDDEN | GetTableResponseBody |
404 | Not Found | Table POST: DB_NOT_FOUND | GetTableResponseBody |
409 | Conflict | Table POST: TBL_EXISTS | GetTableResponseBody |
Code samples
GET /v1/databases/{databaseId}/tables/{tableId}/aclPolicies
Returns principal to role mappings on Table resource identified by databaseId and tableId.
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
tableId | path | string | true | Table ID |
Example responses
200 Response
{
"results": [
{
"principal": "string",
"role": "string"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | AclPolicies GET: OK | GetAclPoliciesResponseBody |
400 | Bad Request | AclPolicies GET: BAD_REQUEST | GetAclPoliciesResponseBody |
401 | Unauthorized | AclPolicies GET: UNAUTHORIZED | GetAclPoliciesResponseBody |
403 | Forbidden | AclPolicies GET: FORBIDDEN | GetAclPoliciesResponseBody |
404 | Not Found | AclPolicies GET: TABLE_NOT_FOUND | GetAclPoliciesResponseBody |
Code samples
PATCH /v1/databases/{databaseId}/tables/{tableId}/aclPolicies
Updates role for principal on Table identified by databaseId and tableId
Body parameter
{
"role": "string",
"principal": "string",
"operation": "GRANT"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
tableId | path | string | true | Table ID |
body | body | UpdateAclPoliciesRequestBody | true | none |
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | AclPolicies PATCH: NO_CONTENT | None |
400 | Bad Request | AclPolicies PATCH: BAD_REQUEST | None |
401 | Unauthorized | AclPolicies PATCH: UNAUTHORIZED | None |
403 | Forbidden | AclPolicies PATCH: FORBIDDEN | None |
404 | Not Found | AclPolicies PATCH: TABLE_NOT_FOUND | None |
Code samples
GET /databases/{databaseId}/aclPolicies
Returns principal to role mappings on resource identified by databaseId.
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
Example responses
200 Response
{
"results": [
{
"principal": "string",
"role": "string"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | AclPolicies GET: OK | GetAclPoliciesResponseBody |
400 | Bad Request | AclPolicies GET: BAD_REQUEST | GetAclPoliciesResponseBody |
401 | Unauthorized | AclPolicies GET: UNAUTHORIZED | GetAclPoliciesResponseBody |
404 | Not Found | AclPolicies GET: DB_NOT_FOUND | GetAclPoliciesResponseBody |
Code samples
PATCH /v1/databases/{databaseId}/aclPolicies
Updates role for principal on database identified by databaseId
Body parameter
{
"role": "string",
"principal": "string",
"operation": "GRANT"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
databaseId | path | string | true | Database ID |
body | body | UpdateAclPoliciesRequestBody | true | none |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | AclPolicies PATCH: UPDATED | None |
400 | Bad Request | AclPolicies PATCH: BAD_REQUEST | None |
401 | Unauthorized | AclPolicies PATCH: UNAUTHORIZED | None |
403 | Forbidden | AclPolicies PATCH: FORBIDDEN | None |
404 | Not Found | AclPolicies PATCH: DB_NOT_FOUND | None |
Code samples
GET /v1/databases
Returns a list of Database resources.
Example responses
200 Response
{
"results": [
{
"databaseId": "my_database",
"clusterId": "my_cluster"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Database GET_ALL: OK | GetAllDatabasesResponseBody |
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
Clustering columns for the table
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
columnName | string | true | none | Name of the clustering column in provided schema. The column should be of the type 'String'.Nested columns can also be provided with a dot-separated name (for example: 'eventHeader.countryCode').Column name is case-sensitive. |
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"},{\"id\":3,\"required\":true,\"name\":\"timestampColumn\",\"type\":\"timestamp\"}]}",
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": "\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]",
"tableProperties": {
"key": "value"
},
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"stageCreate": false,
"baseTableVersion": "string",
"tableType": "PRIMARY_TABLE"
}
Request containing details of the Table to be created
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
tableId | string | true | none | Unique Resource identifier for a table within a Database |
databaseId | string | true | none | Unique Resource identifier for the Database containing the Table |
clusterId | string | true | none | Unique Resource identifier for the Cluster containing the Database |
schema | string | true | none | Schema of the table. OpenHouse tables use Iceberg schema specification |
timePartitioning | TimePartitionSpec | false | none | Time partitioning of the table |
clustering | [ClusteringColumn]¦null | false | none | Clustering columns for the table |
tableProperties | object | true | none | Table properties |
» additionalProperties | string | false | none | Table properties |
policies | Policies | false | none | Policies of the table |
stageCreate | boolean | false | none | Boolean that determines creating a staged table |
baseTableVersion | string | true | none | The version of table that the current update is based upon |
tableType | string | false | none | The type of a table |
Property | Value |
---|---|
tableType | PRIMARY_TABLE |
tableType | REPLICA_TABLE |
{
"baseTableVersion": "Base table version to apply the change to",
"jsonSnapshots": [
"string"
],
"createUpdateTableRequestBody": {
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"},{\"id\":3,\"required\":true,\"name\":\"timestampColumn\",\"type\":\"timestamp\"}]}",
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": "\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]",
"tableProperties": {
"key": "value"
},
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"stageCreate": false,
"baseTableVersion": "string",
"tableType": "PRIMARY_TABLE"
}
}
Request containing a list of JSON serialized Iceberg Snapshots to be put
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
baseTableVersion | string | true | none | Base Table Version |
jsonSnapshots | [string] | false | none | List of json serialized snapshots to put |
createUpdateTableRequestBody | CreateUpdateTableRequestBody | false | none | Request containing details of the Table to be created |
{
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
}
Policies of the table
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
retention | Retention | false | none | Retention as required in /tables API request. The column holds the retention part or Policies. |
sharingEnabled | boolean | false | none | Whether data sharing needs to enabled for the table in /tables API request. Sharing is disabled by default |
columnTags | object | false | none | Policy tags applied to columns in /tables API request. |
» additionalProperties | PolicyTag | false | none | Policy tags applied to columns in /tables API request. |
"{'colName': [PII, HC]}"
Policy tags applied to columns in /tables API request.
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
tags | [string] | false | none | Policy tags |
"{retention:{count:3, granularity: 'day'}}"
Retention as required in /tables API request. The column holds the retention part or Policies.
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer(int32) | true | none | time period in count for which the retention on table will be applied |
granularity | string | true | none | time period granularity for which the retention on table will be applied |
columnPattern | RetentionColumnPattern | false | none | Optional object to specify retention column in case where timestamp is represented as a string |
Property | Value |
---|---|
granularity | HOUR |
granularity | DAY |
granularity | MONTH |
granularity | YEAR |
"{columnName:datepartition, pattern: yyyy-MM-dd-HH}"
Optional object to specify retention column in case where timestamp is represented as a string
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
columnName | string | true | none | Name of retention column |
pattern | string | true | none | Pattern for the value of the retention column following java.time.format.DateTimeFormatter standard. |
"\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}"
Time partitioning of the table
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
columnName | string | true | none | Name of the timestamp column in provided schema. The column should be of the type 'Timestamp'. Nested columns can also be provided with a dot-separated name (for example: 'eventHeader.timeColumn').Column name is case-sensitive. |
granularity | string | true | none | Granularity of the time partition. |
Property | Value |
---|---|
granularity | HOUR |
granularity | DAY |
granularity | MONTH |
granularity | YEAR |
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
tableId | string | false | read-only | Unique Resource identifier for a table within a Database |
databaseId | string | false | read-only | Unique Resource identifier for the Database containing the Table |
clusterId | string | false | read-only | Unique Resource identifier for the Cluster containing the Database |
tableUri | string | false | read-only | Fully Qualified Resource URI for the table |
tableUUID | string | false | read-only | Table UUID |
tableLocation | string | false | read-only | Location of Table in File System / Blob Store |
tableVersion | string | false | read-only | Current Version of the Table. |
tableCreator | string | false | read-only | Authenticated user principal that created the Table. |
schema | string | false | read-only | Schema of the Table in Iceberg |
lastModifiedTime | integer(int64) | false | read-only | Last modification epoch time in UTC measured in milliseconds of a table. |
creationTime | integer(int64) | false | read-only | Table creation epoch time measured in UTC in milliseconds of a table. |
tableProperties | object | false | read-only | A map of table properties |
» additionalProperties | string | false | none | A map of table properties |
timePartitioning | TimePartitionSpec | false | none | Time partitioning of the table |
clustering | [ClusteringColumn]¦null | false | none | Clustering columns for the table |
policies | Policies | false | none | Policies of the table |
tableType | string | false | read-only | The type of a table |
Property | Value |
---|---|
tableType | PRIMARY_TABLE |
tableType | REPLICA_TABLE |
{
"results": [
{
"tableId": "my_table",
"databaseId": "my_database",
"clusterId": "my_cluster",
"tableUri": "my_cluster.my_database.my_table",
"tableUUID": "73ea0d21-3c89-4987-a6cf-26e4f86bdcee",
"tableLocation": "<fs>://<hostname>/<openhouse_namespace>/<database_name>/<tableUUID>/metadata/<uuid>.metadata.json",
"tableVersion": "string",
"tableCreator": "bob",
"schema": "{\"type\":\"struct\",\"fields\":[{\"id\":1,\"required\":true,\"name\":\"id\",\"type\":\"string\"},{\"id\":2,\"required\":true,\"name\":\"name\",\"type\":\"string\"}]}",
"lastModifiedTime": 1651002318265,
"creationTime": 1651002318265,
"tableProperties": {
"key": "value"
},
"timePartitioning": "\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}",
"clustering": [
"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"
],
"policies": {
"retention": "{retention:{count:3, granularity: 'day'}}",
"sharingEnabled": false,
"columnTags": "{'colName': [PII, HC]}"
},
"tableType": "PRIMARY_TABLE"
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
results | [GetTableResponseBody] | false | read-only | List of Table objects in a database |
{
"role": "string",
"principal": "string",
"operation": "GRANT"
}
Request containing aclPolicies of the Database to be updated
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
role | string | true | none | Role that is being granted/revoked. |
principal | string | true | none | Grantee principal whose role is being updated |
operation | string | true | none | Whether this is a grant/revoke request |
Property | Value |
---|---|
operation | GRANT |
operation | REVOKE |
{
"principal": "string",
"role": "string"
}
List of acl policies associated with table/database
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
principal | string | false | read-only | Principal with the role on the table/database |
role | string | false | read-only | Role associated with the principal |
{
"results": [
{
"principal": "string",
"role": "string"
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
results | [AclPolicy] | false | read-only | List of acl policies associated with table/database |
{
"results": [
{
"databaseId": "my_database",
"clusterId": "my_cluster"
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
results | [GetDatabaseResponseBody] | false | read-only | List of Database objects |
{
"databaseId": "my_database",
"clusterId": "my_cluster"
}
List of Database objects
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
databaseId | string | false | read-only | Unique Resource identifier for the Database |
clusterId | string | false | read-only | Unique Resource identifier for the Cluster containing the Database |