Tables

Update Table Definition

Updates table display name, table description, and multiple column definition patches for a table with typed columns. Snowflake, BigQuery only.

Request is handled asynchronously. The request is added to a queue and the job resource URL for status polling is returned.

Supported column alterations are the same as for Update Column Definition, except this endpoint does not support changing a column data type.

Backend DDL changes are not atomic across multiple column operations. If the async job fails after applying some changes, previously applied changes may remain applied. Re-read the table definition before retrying.

Initial response returns job details JobResponse. The result of the asynchronous job can be fetched via /v2/storage/jobs/{id}. When the job completes, final result is TableCreateResponse.

Parameters of job will be TableDefinitionUpdateJobParams.

put/v2/storage/branch/{branchId}/tables/{tableId}/definition

Request

Path parameters

tableIdstring required

The table Id.

branchIdstring required

Headers

contextstring nullable

Request body

displayNamestring

The name of a bucket or a table.

  • Allowed characters: A-Z, a-z, 0-9, dash - and underscore _. Anything else — a space, a dot, an accented letter — is rejected, not transliterated.
  • 1 to 96 characters.
  • Cannot start with an underscore. A dash or a digit as the first character is fine.
  • Registered (external) buckets follow this same rule, dashes included.
  • Uniqueness is case-insensitive within a stage: creating MyBucket next to mybucket fails with storage.buckets.alreadyExists, and for tables with storage.buckets.tableAlreadyExists or storage.validation.tableAlreadyExists.
  • To turn arbitrary user input into a name that satisfies this rule, call POST /v2/storage/webalize/display-name instead of reimplementing the transformation. It unaccents the input, replaces every run of disallowed characters with a single -, trims - from both ends, strips leading underscores, and truncates to 96 characters.
descriptionstring nullable

Table description; null or an empty string clears the description.

isDescriptionSystemManagedboolean nullable

Whether the table description is managed by the system (true) or the user (false). Output Mapping may overwrite a system-managed description but never a user-managed one.

Example request

{
  "displayName": "my-bucket",
  "description": "Orders fact table",
  "columns": [
    {
      "name": "amount",
      "length": "12,2",
      "description": "Order amount"
    }
  ]
}

Response

Job accepted; returns job details.

idstring required

Job ID.

statusstring required

Current status of the job.

urlstring required

API detail URL for the job.

tableIdstring nullable required

ID of the table affected by the job.

operationNamestring required

Type of operation performed.

operationParamsobject required

Parameters for the operation.

createdTimestring date-time required

Job creation timestamp.

startTimestring date-time nullable required

Job start timestamp.

endTimestring date-time nullable required

Job end timestamp.

runIdstring nullable required

Run ID for the job.

Example response

{
  "id": "22077337",
  "status": "waiting",
  "url": "https://connection.keboola.com/v2/storage/jobs/22077337",
  "tableId": null,
  "operationName": "workspaceLoad",
  "operationParams": {
    "workspaceId": "78423",
    "preserve": false,
    "input": [
      {
        "source": "in.c-application-testing.cashier-data",
        "destination": "my-table"
      }
    ],
    "queue": "main_fast"
  },
  "createdTime": "2017-02-13T16:41:18+0100",
  "startTime": null,
  "endTime": null,
  "runId": null,
  "results": null,
  "creatorToken": {
    "id": "27978",
    "description": "john.doe@keboola.com"
  },
  "actor": {
    "type": "token",
    "id": "27978",
    "name": "john.doe@keboola.com",
    "adminId": 1234
  },
  "metrics": {
    "inCompressed": false,
    "inBytes": 0,
    "inBytesUncompressed": 0,
    "outCompressed": false,
    "outBytes": 0,
    "outBytesUncompressed": 0
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.