Skip to content

Describe a table (`catalog.schema.table` or a shorter unambiguous name): `qualified`, `name`,

POST
/datanotes/operations/describe_table/
curl --request POST \
--url https://example.com/datanotes/operations/describe_table/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "table": "example" }'

Describe a table (catalog.schema.table or a shorter unambiguous name): qualified, name, catalog, schema, description, aliases, layout (folder, row_folder: the folder pattern of new rows, archive), options (partition, filename, archive, exclude), typed columns with label/aliases/description and the dense flag, untyped_fields, row_count, and when set: tags, bases (the bases it inherits from, in order), constraints (its CHECKs, name → where), row_template, history, autolink_target, fields (their values).

Before adding a column (e.g. a new metric), read columns and match your concept against name, label, aliases and description; reuse an existing column when it means the same.

missing_descriptions ({table, columns}), present only when something has no description (a table defined before descriptions were required), names what lacks one: write them with alter_table description and alter_column changes.description, asking the user when the meaning is unclear.

Media typeapplication/json
object
table
required
string

Example generated

{
"table": "example"
}

Done.

Media typeapplication/json

The table’s definition with its qualified name and row count.

object
name
required
string
schema
required
string
catalog
string
description

What a row of the table records.

string
aliases

Other words for what the table records, for agents.

Array<string>
layout
required
object
folder
required

Folder of the table’s rows.

string
row_folder
required

Folder pattern of new rows: the table folder, plus its partition.

string
archive
required

Archive folder.

string
key
additional properties
any
options
required

The table options set on it: partition, filename, archive, exclude.

object
key
additional properties
any
columns
required

Declared columns.

Array<object>
object
name
required
string
type
required

Column type (string, number, integer, boolean, date, datetime, enum, link, list, …).

string
items

Element type of a list column.

string
required
required
boolean
default

Default value.

min
number
max
number
step
number
values

Allowed values of an enum.

Array<string>
value_descriptions
object
key
additional properties
string
ref

Target table of a link column.

string
inverse
string
ref_where

Link column: the where filter every linked row must match.

object
key
additional properties
any
ref_by

Link column: the row’s column that picks the targets’ level: {column, target_column?, levels?, map} (map always expanded: value -> null for a top level, or the allowed target values).

object
key
additional properties
any
description
string
aliases
required
Array<string>
unique
boolean
identity
string
Allowed values: filename uuid created
generated

Expression of a generated column.

string
dense
required

Written on every row (with its default).

boolean
key
additional properties
any
untyped_fields
required

Table defaults without a column (written on every new row), and the table front matter key.

Array<string>
qualified
required

Catalog.schema.table

string
row_count
required

Rows in the table.

integer
tags

Key/value labels of the table (alter_table tags), when it has any.

object
key
additional properties
string
missing_descriptions
MissingDescriptions

What has no description, when something has none (a table defined before descriptions were required): fill them with alter_table and alter_column.

object
table
required

True when the table itself has no description.

boolean
columns
required

The columns without a description.

Array<string>
bases

The bases it inherits columns from, in order.

Array<string>
constraints

Its CHECK constraints: name → the where every row must match.

object
key
additional properties
object
key
additional properties
any
row_template

The text of every new row’s note.

string
history

Its own history setting (absent: the database’s).

boolean
autolink_target

Its own autolink_target setting (absent: the default).

boolean
fields

Front matter keys every new row gets, with their values.

object
key
additional properties
any
key
additional properties
any

Example

{
"columns": [
{
"identity": "filename"
}
]
}

Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Missing or wrong bearer token.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Unknown table, view, migration, note or folder.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Ambiguous table name: it matches several tables (paths or tables lists them).

Media typeapplication/json
object
error
required
string
paths

The tables’ folders the name matches.

Array<string>
tables

The qualified tables the name matches.

Array<string>

Example generated

{
"error": "example",
"paths": [
"example"
],
"tables": [
"example"
]
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}