Skip to content

Latest commit

 

History

History
1226 lines (963 loc) · 41 KB

catalog.md

File metadata and controls

1226 lines (963 loc) · 41 KB

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

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

Responses

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
This operation does not require authentication

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

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

Responses

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
This operation does not require authentication

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

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

Responses

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
This operation does not require authentication

DELETE Table

Code samples

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

Deletes a table resource

Parameters

Name In Type Required Description
databaseId path string true Database ID
tableId path string true Table ID

Responses

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
This operation does not require authentication

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

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

Responses

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
This operation does not require authentication

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

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

Responses

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
This operation does not require authentication

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

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

Responses

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
This operation does not require authentication

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

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

Responses

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
This operation does not require authentication

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

Name In Type Required Description
databaseId path string true Database ID
tableId path string true Table ID
body body UpdateAclPoliciesRequestBody true none

Responses

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
This operation does not require authentication

Database

Get AclPolicies on Database

Code samples

GET /databases/{databaseId}/aclPolicies

Returns principal to role mappings on resource identified by databaseId.

Parameters

Name In Type Required Description
databaseId path string true Database ID

Example responses

200 Response

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

Responses

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
This operation does not require authentication

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

Name In Type Required Description
databaseId path string true Database ID
body body UpdateAclPoliciesRequestBody true none

Responses

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
This operation does not require authentication

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

Status Meaning Description Schema
200 OK Database GET_ALL: OK GetAllDatabasesResponseBody
This operation does not require authentication

Schemas

ClusteringColumn

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

Clustering columns for the table

Properties

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.

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

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

Enumerated Values

Property Value
tableType PRIMARY_TABLE
tableType REPLICA_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

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

Policies

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

Policies of the table

Properties

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.

PolicyTag

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

Policy tags applied to columns in /tables API request.

Properties

Name Type Required Restrictions Description
tags [string] false none Policy tags

Retention

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

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

Properties

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

Enumerated Values

Property Value
granularity HOUR
granularity DAY
granularity MONTH
granularity YEAR

RetentionColumnPattern

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

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

Properties

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.

TimePartitionSpec

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

Time partitioning of the table

Properties

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.

Enumerated Values

Property Value
granularity HOUR
granularity DAY
granularity MONTH
granularity YEAR

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

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

Enumerated Values

Property Value
tableType PRIMARY_TABLE
tableType REPLICA_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

Name Type Required Restrictions Description
results [GetTableResponseBody] false read-only List of Table objects in a database

UpdateAclPoliciesRequestBody

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

Request containing aclPolicies of the Database to be updated

Properties

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

Enumerated Values

Property Value
operation GRANT
operation REVOKE

AclPolicy

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

List of acl policies associated with table/database

Properties

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

GetAclPoliciesResponseBody

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

Properties

Name Type Required Restrictions Description
results [AclPolicy] false read-only List of acl policies associated with table/database

GetAllDatabasesResponseBody

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

Properties

Name Type Required Restrictions Description
results [GetDatabaseResponseBody] false read-only List of Database objects

GetDatabaseResponseBody

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

List of Database objects

Properties

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