Update a table

tables_patch(
  id,
  ontology_mapping = NULL,
  description = NULL,
  primary_keys = NULL,
  last_modified_keys = NULL
)

Arguments

id

integer required. The ID of the table.

ontology_mapping

list optional. The ontology-key to column-name mapping. See /ontology for the list of valid ontology keys.

description

string optional. The user-defined description of the table.

primary_keys

array optional. A list of column(s) which together uniquely identify a row in the data.These columns must not contain NULL values.

last_modified_keys

array optional. The columns indicating when a row was last modified.

Value

A list containing the following elements:

id

integer, The ID of the table.

databaseId

integer, The ID of the database.

schema

string, The name of the schema containing the table.

name

string, Name of the table.

description

string, The description of the table, as specified by the table owner

isView

boolean, True if this table represents a view. False if it represents a regular table.

rowCount

integer, The number of rows in the table.

columnCount

integer, The number of columns in the table.

sizeMb

number, The size of the table in megabytes.

owner

string, The database username of the table's owner.

distkey

string, The column used as the Amazon Redshift distkey.

sortkeys

string, The column used as the Amazon Redshift sortkey.

refreshStatus

string, How up-to-date the table's statistics on row counts, null counts, distinct counts, and values distributions are. One of: refreshing, stale, or current.

lastRefresh

string, The time of the last statistics refresh.

dataUpdatedAt

string, The last time that Civis Platform captured a change in this table.Only applicable for Redshift tables; please see the Civis help desk for more info.

schemaUpdatedAt

string, The last time that Civis Platform captured a change to the table attributes/structure.Only applicable for Redshift tables; please see the Civis help desk for more info.

refreshId

string, The ID of the most recent statistics refresh.

lastRun

list, A list containing the following elements:

  • id integer,

  • state string,

  • createdAt string, The time that the run was queued.

  • startedAt string, The time that the run started.

  • finishedAt string, The time that the run completed.

  • error string, The error message for this run, if present.

primaryKeys

array, The primary keys for this table.

lastModifiedKeys

array, The columns indicating an entry's modification status for this table.

ontologyMapping

list, The ontology-key to column-name mapping. See /ontology for the list of valid ontology keys.