tables_get {civis}R Documentation

Show basic table info

Description

Show basic table info

Usage

tables_get(id)

Arguments

id

integer required.

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.

tableTags

array, An array containing the following fields:

  • id integer, Table Tag ID

  • name string, Table Tag Name

ontologyMapping

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

columns

array, An array containing the following fields:

  • name string, Name of the column.

  • civisDataType string, The generic data type of the column (ex. "string"). Since this is database-agnostic, it may be helpful when loading data to R/Python.

  • sqlType string, The database-specific SQL type of the column (ex. "varchar(30)").

  • sampleValues array, A sample of values from the column.

  • encoding string, The compression encoding for this columnSee: http://docs.aws.amazon.com/redshift/latest/dg/c_Compression_encodings.html

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

  • order integer, Relative position of the column in the table.

  • minValue string, Smallest value in the column.

  • maxValue string, Largest value in the column.

  • avgValue number, This parameter is deprecated.

  • stddev number, This parameter is deprecated.

  • valueDistributionPercent object, A mapping between each value in the column and the percentage of rows with that value.Only present for tables with fewer than approximately 25,000,000 rows and for columns with fewer than twenty distinct values.

  • coverageCount integer, Number of non-null values in the column.

  • nullCount integer, Number of null values in the column.

  • possibleDependentVariableTypes array, Possible dependent variable types the column may be used to model. Null if it may not be used as a dependent variable.

  • useableAsIndependentVariable boolean, Whether the column may be used as an independent variable to train a model.

  • useableAsPrimaryKey boolean, Whether the column may be used as an primary key to identify table rows.

  • valueDistribution object, An object mapping distinct values in the column to the number of times they appear in the column

  • distinctCount integer, Number of distinct values in the column. NULL values are counted and treated as a single distinct value.

joins

array, An array containing the following fields:

  • id integer,

  • leftTableId integer,

  • leftIdentifier string,

  • rightTableId integer,

  • rightIdentifier string,

  • on string,

  • leftJoin boolean,

  • createdAt string,

  • updatedAt string,

multipartKey

array,

enhancements

array, An array containing the following fields:

  • type string,

  • createdAt string,

  • updatedAt string,

  • joinId integer,

viewDef

string,

tableDef

string,

outgoingTableMatches

array, An array containing the following fields:

  • sourceTableId integer, Source table

  • targetType string, Target type

  • targetId integer, Target ID

  • target object,

  • job object,


[Package civis version 3.1.2 Index]