Schemas

February 14, 2024 · View on GitHub

OpenHouse Tables APIs v0.1

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:

Terms of service

License: Apache 2.0

Snapshot

Puts Iceberg snapshots to Table

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"
  }
}

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
tableIdpathstringtrueTable ID
bodybodyIcebergSnapshotsRequestBodytruenone

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"
}

Responses

StatusMeaningDescriptionSchema
200OKIceberg snapshot PUT: UPDATEDGetTableResponseBody
201CreatedIceberg snapshot PUT: CREATEDGetTableResponseBody
400Bad RequestIceberg snapshot PUT: BAD_REQUESTGetTableResponseBody
409ConflictIceberg snapshot PUT: CONFLICTGetTableResponseBody

Table

Get Table in a Database

Code samples

GET /v1/databases/{databaseId}/tables/{tableId}

Returns a Table resource identified by tableId in the database identified by databaseId.

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
tableIdpathstringtrueTable 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"
}

Responses

StatusMeaningDescriptionSchema
200OKTable GET: OKGetTableResponseBody
401UnauthorizedTable GET: UNAUTHORIZEDGetTableResponseBody
403ForbiddenTable GET: FORBIDDENGetTableResponseBody
404Not FoundTable GET: NOT_FOUNDGetTableResponseBody

Update a Table

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"
}

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
tableIdpathstringtrueTable ID
bodybodyCreateUpdateTableRequestBodytruenone

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"
}

Responses

StatusMeaningDescriptionSchema
200OKTable PUT: UPDATEDGetTableResponseBody
201CreatedTable PUT: CREATEDGetTableResponseBody
400Bad RequestTable PUT: BAD_REQUESTGetTableResponseBody
401UnauthorizedTable PUT: UNAUTHORIZEDGetTableResponseBody
403ForbiddenTable PUT: FORBIDDENGetTableResponseBody
404Not FoundTable PUT: DB_NOT_FOUNDGetTableResponseBody

DELETE Table

Code samples

DELETE /v1/databases/{databaseId}/tables/{tableId}

Deletes a table resource

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
tableIdpathstringtrueTable ID

Responses

StatusMeaningDescriptionSchema
204No ContentTable DELETE: NO_CONTENTNone
400Bad RequestTable DELETE: BAD_REQUESTNone
401UnauthorizedTable DELETE: UNAUTHORIZEDNone
403ForbiddenTable DELETE: FORBIDDENNone
404Not FoundTable DELETE: TBL_DB_NOT_FOUNDNone

Search Tables in a Database

Code samples

POST /v1/databases/{databaseId}/tables/search

Returns a list of Table resources present in a database. Only filter supported is 'database_id'.

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase 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"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
200OKTable SEARCH: OKGetAllTablesResponseBody
400Bad RequestTable SEARCH: BAD_REQUESTGetAllTablesResponseBody
401UnauthorizedTable SEARCH: UNAUTHORIZEDGetAllTablesResponseBody
403ForbiddenTable SEARCH: FORBIDDENGetAllTablesResponseBody
404Not FoundTable SEARCH: NOT_FOUNDGetAllTablesResponseBody

List Tables in a Database

Code samples

GET /v1/databases/{databaseId}/tables

Returns a list of Table resources present in a database identified by databaseId.

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase 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"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
200OKTable GET_ALL: OKGetAllTablesResponseBody
401UnauthorizedTable GET_ALL: UNAUTHORIZEDGetAllTablesResponseBody
404Not FoundTable GET_ALL: DB NOT_FOUNDGetAllTablesResponseBody

Create a Table

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"
}

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
bodybodyCreateUpdateTableRequestBodytruenone

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"
}

Responses

StatusMeaningDescriptionSchema
201CreatedTable POST: CREATEDGetTableResponseBody
400Bad RequestTable POST: BAD_REQUESTGetTableResponseBody
401UnauthorizedTable POST: UNAUTHORIZEDGetTableResponseBody
403ForbiddenTable POST: FORBIDDENGetTableResponseBody
404Not FoundTable POST: DB_NOT_FOUNDGetTableResponseBody
409ConflictTable POST: TBL_EXISTSGetTableResponseBody

Get AclPolicies for Table

Code samples

GET /v1/databases/{databaseId}/tables/{tableId}/aclPolicies

Returns principal to role mappings on Table resource identified by databaseId and tableId.

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
tableIdpathstringtrueTable ID

Example responses

200 Response

{
  "results": [
    {
      "principal": "string",
      "role": "string"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
200OKAclPolicies GET: OKGetAclPoliciesResponseBody
400Bad RequestAclPolicies GET: BAD_REQUESTGetAclPoliciesResponseBody
401UnauthorizedAclPolicies GET: UNAUTHORIZEDGetAclPoliciesResponseBody
403ForbiddenAclPolicies GET: FORBIDDENGetAclPoliciesResponseBody
404Not FoundAclPolicies GET: TABLE_NOT_FOUNDGetAclPoliciesResponseBody

Update AclPolicies for Table

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"
}

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
tableIdpathstringtrueTable ID
bodybodyUpdateAclPoliciesRequestBodytruenone

Responses

StatusMeaningDescriptionSchema
204No ContentAclPolicies PATCH: NO_CONTENTNone
400Bad RequestAclPolicies PATCH: BAD_REQUESTNone
401UnauthorizedAclPolicies PATCH: UNAUTHORIZEDNone
403ForbiddenAclPolicies PATCH: FORBIDDENNone
404Not FoundAclPolicies PATCH: TABLE_NOT_FOUNDNone

Database

Get AclPolicies on Database

Code samples

GET /databases/{databaseId}/aclPolicies

Returns principal to role mappings on resource identified by databaseId.

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID

Example responses

200 Response

{
  "results": [
    {
      "principal": "string",
      "role": "string"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
200OKAclPolicies GET: OKGetAclPoliciesResponseBody
400Bad RequestAclPolicies GET: BAD_REQUESTGetAclPoliciesResponseBody
401UnauthorizedAclPolicies GET: UNAUTHORIZEDGetAclPoliciesResponseBody
404Not FoundAclPolicies GET: DB_NOT_FOUNDGetAclPoliciesResponseBody

Update AclPolicies on database

Code samples

PATCH /v1/databases/{databaseId}/aclPolicies

Updates role for principal on database identified by databaseId

Body parameter

{
  "role": "string",
  "principal": "string",
  "operation": "GRANT"
}

Parameters

NameInTypeRequiredDescription
databaseIdpathstringtrueDatabase ID
bodybodyUpdateAclPoliciesRequestBodytruenone

Responses

StatusMeaningDescriptionSchema
200OKAclPolicies PATCH: UPDATEDNone
400Bad RequestAclPolicies PATCH: BAD_REQUESTNone
401UnauthorizedAclPolicies PATCH: UNAUTHORIZEDNone
403ForbiddenAclPolicies PATCH: FORBIDDENNone
404Not FoundAclPolicies PATCH: DB_NOT_FOUNDNone

List all Databases

Code samples

GET /v1/databases

Returns a list of Database resources.

Example responses

200 Response

{
  "results": [
    {
      "databaseId": "my_database",
      "clusterId": "my_cluster"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
200OKDatabase GET_ALL: OKGetAllDatabasesResponseBody

Schemas

ClusteringColumn

"\"clustering\":[{\"columnName\":\"country\"},{\"columnName\":\"city\"}]"

Clustering columns for the table

Properties

NameTypeRequiredRestrictionsDescription
columnNamestringtruenoneName 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.

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 details of the Table to be created

Properties

NameTypeRequiredRestrictionsDescription
tableIdstringtruenoneUnique Resource identifier for a table within a Database
databaseIdstringtruenoneUnique Resource identifier for the Database containing the Table
clusterIdstringtruenoneUnique Resource identifier for the Cluster containing the Database
schemastringtruenoneSchema of the table. OpenHouse tables use Iceberg schema specification
timePartitioningTimePartitionSpecfalsenoneTime partitioning of the table
clustering[ClusteringColumn]¦nullfalsenoneClustering columns for the table
tablePropertiesobjecttruenoneTable properties
» additionalPropertiesstringfalsenoneTable properties
policiesPoliciesfalsenonePolicies of the table
stageCreatebooleanfalsenoneBoolean that determines creating a staged table
baseTableVersionstringtruenoneThe version of table that the current update is based upon
tableTypestringfalsenoneThe type of a table

Enumerated Values

PropertyValue
tableTypePRIMARY_TABLE
tableTypeREPLICA_TABLE

IcebergSnapshotsRequestBody

{
  "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

Properties

NameTypeRequiredRestrictionsDescription
baseTableVersionstringtruenoneBase Table Version
jsonSnapshots[string]falsenoneList of json serialized snapshots to put
createUpdateTableRequestBodyCreateUpdateTableRequestBodyfalsenoneRequest containing details of the Table to be created

Policies

{
  "retention": "{retention:{count:3, granularity: 'day'}}",
  "sharingEnabled": false,
  "columnTags": "{'colName': [PII, HC]}"
}

Policies of the table

Properties

NameTypeRequiredRestrictionsDescription
retentionRetentionfalsenoneRetention as required in /tables API request. The column holds the retention part or Policies.
sharingEnabledbooleanfalsenoneWhether data sharing needs to enabled for the table in /tables API request. Sharing is disabled by default
columnTagsobjectfalsenonePolicy tags applied to columns in /tables API request.
» additionalPropertiesPolicyTagfalsenonePolicy tags applied to columns in /tables API request.

PolicyTag

"{'colName': [PII, HC]}"

Policy tags applied to columns in /tables API request.

Properties

NameTypeRequiredRestrictionsDescription
tags[string]falsenonePolicy tags

Retention

"{retention:{count:3, granularity: 'day'}}"

Retention as required in /tables API request. The column holds the retention part or Policies.

Properties

NameTypeRequiredRestrictionsDescription
countinteger(int32)truenonetime period in count for which the retention on table will be applied
granularitystringtruenonetime period granularity for which the retention on table will be applied
columnPatternRetentionColumnPatternfalsenoneOptional object to specify retention column in case where timestamp is represented as a string

Enumerated Values

PropertyValue
granularityHOUR
granularityDAY
granularityMONTH
granularityYEAR

RetentionColumnPattern

"{columnName:datepartition, pattern: yyyy-MM-dd-HH}"

Optional object to specify retention column in case where timestamp is represented as a string

Properties

NameTypeRequiredRestrictionsDescription
columnNamestringtruenoneName of retention column
patternstringtruenonePattern for the value of the retention column following java.time.format.DateTimeFormatter standard.

TimePartitionSpec

"\"timePartitioning\":{\"columnName\":\"timestampCol\",\"granularity\":\"HOUR\"}"

Time partitioning of the table

Properties

NameTypeRequiredRestrictionsDescription
columnNamestringtruenoneName 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.
granularitystringtruenoneGranularity of the time partition.

Enumerated Values

PropertyValue
granularityHOUR
granularityDAY
granularityMONTH
granularityYEAR

GetTableResponseBody

{
  "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"
}

Properties

NameTypeRequiredRestrictionsDescription
tableIdstringfalseread-onlyUnique Resource identifier for a table within a Database
databaseIdstringfalseread-onlyUnique Resource identifier for the Database containing the Table
clusterIdstringfalseread-onlyUnique Resource identifier for the Cluster containing the Database
tableUristringfalseread-onlyFully Qualified Resource URI for the table
tableUUIDstringfalseread-onlyTable UUID
tableLocationstringfalseread-onlyLocation of Table in File System / Blob Store
tableVersionstringfalseread-onlyCurrent Version of the Table.
tableCreatorstringfalseread-onlyAuthenticated user principal that created the Table.
schemastringfalseread-onlySchema of the Table in Iceberg
lastModifiedTimeinteger(int64)falseread-onlyLast modification epoch time in UTC measured in milliseconds of a table.
creationTimeinteger(int64)falseread-onlyTable creation epoch time measured in UTC in milliseconds of a table.
tablePropertiesobjectfalseread-onlyA map of table properties
» additionalPropertiesstringfalsenoneA map of table properties
timePartitioningTimePartitionSpecfalsenoneTime partitioning of the table
clustering[ClusteringColumn]¦nullfalsenoneClustering columns for the table
policiesPoliciesfalsenonePolicies of the table
tableTypestringfalseread-onlyThe type of a table

Enumerated Values

PropertyValue
tableTypePRIMARY_TABLE
tableTypeREPLICA_TABLE

GetAllTablesResponseBody

{
  "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"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
results[GetTableResponseBody]falseread-onlyList of Table objects in a database

UpdateAclPoliciesRequestBody

{
  "role": "string",
  "principal": "string",
  "operation": "GRANT"
}

Request containing aclPolicies of the Database to be updated

Properties

NameTypeRequiredRestrictionsDescription
rolestringtruenoneRole that is being granted/revoked.
principalstringtruenoneGrantee principal whose role is being updated
operationstringtruenoneWhether this is a grant/revoke request

Enumerated Values

PropertyValue
operationGRANT
operationREVOKE

AclPolicy

{
  "principal": "string",
  "role": "string"
}

List of acl policies associated with table/database

Properties

NameTypeRequiredRestrictionsDescription
principalstringfalseread-onlyPrincipal with the role on the table/database
rolestringfalseread-onlyRole associated with the principal

GetAclPoliciesResponseBody

{
  "results": [
    {
      "principal": "string",
      "role": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
results[AclPolicy]falseread-onlyList of acl policies associated with table/database

GetAllDatabasesResponseBody

{
  "results": [
    {
      "databaseId": "my_database",
      "clusterId": "my_cluster"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
results[GetDatabaseResponseBody]falseread-onlyList of Database objects

GetDatabaseResponseBody

{
  "databaseId": "my_database",
  "clusterId": "my_cluster"
}

List of Database objects

Properties

NameTypeRequiredRestrictionsDescription
databaseIdstringfalseread-onlyUnique Resource identifier for the Database
clusterIdstringfalseread-onlyUnique Resource identifier for the Cluster containing the Database