Skip to content

Describe the database: its folder (`root`), `metastore` (`metastore.yaml`: read it freely,

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

Describe the database: its folder (root), metastore (metastore.yaml: read it freely, but it is read-only for agents and changes only through the schema operations), configuration (default catalog and schema, row partition and file-name formats, archive folder, time zone, history, automatic links), journal folder, bases (shared column sets and the tables using them), catalogs → schemas → tables (with row_count, tags, and unreadable_count when some rows’ front matter cannot be read) and views; catalogs and schemas show their comment (set with comment_on). A table or base defined before descriptions were required has missing_descriptions: what lacks one, for alter_table / alter_column (define_base for a base) to fill, so every table and column says what it holds.

Media typeapplication/json
object

Example generated

{}

Done.

Media typeapplication/json
DatabaseDescription

The database: configuration, catalogs, schemas, tables, views and bases.

object
root
required

Database folder in the vault.

string
metastore
required

Path of metastore.yaml (catalogs, schemas, tables, views).

string
journal
required

Folder of the operation journal.

string
config
required

Database configuration.

object
default_catalog
required
string
default_schema
required
string
default_partition
required

Date format of row sub-folders; empty = flat.

string
default_filename
required

Date format of row file names.

string
archive_folder
required
string
timezone
required

IANA time zone; empty = values stored as given.

string
history
required

Transaction log (time travel) on by default.

boolean
autolink
required

Automatic links in the text writes put in bodies (on by default).

boolean
catalogs
required

Tables and views by catalog and schema.

Array<object>
object
catalog
required
string
description

What the catalog holds (comment_on).

string
default

Present (true) on the default catalog.

boolean
schemas
required
Array<object>
object
schema
required
string
description

What the schema holds (comment_on).

string
tables
required
Array<object>
object
name
required
string
qualified
required

Catalog.schema.table

string
row_count
required

Row count.

integer
unreadable_count

Rows whose front matter cannot be read, when there are any: not in row_count, since every read leaves them out. check_table lists them (code unreadable).

integer
description
string
tags

Key/value labels of the table, 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>
views
required
Array<object>
object
name
required
string
qualified
required
string
description
string
bases
required

Bases (shared columns) and the tables that extend each one.

Array<object>
object
name
required
string
description
string
bases

The bases this base builds on, in order.

Array<string>
columns
required

Column names the base declares.

Array<string>
tables
required

Qualified tables extending it.

Array<string>
missing_descriptions

What has no description, when something has none (a base defined before descriptions were required): define_base fills them.

object
base
required

True when the base has no comment.

boolean
columns
required

The base’s columns without a description.

Array<string>

Example generated

{
"root": "example",
"metastore": "example",
"journal": "example",
"config": {
"default_catalog": "example",
"default_schema": "example",
"default_partition": "example",
"default_filename": "example",
"archive_folder": "example",
"timezone": "example",
"history": true,
"autolink": true
},
"catalogs": [
{
"catalog": "example",
"description": "example",
"default": true,
"schemas": [
{
"schema": "example",
"description": "example",
"tables": [
{
"name": "example",
"qualified": "example",
"row_count": 1,
"unreadable_count": 1,
"description": "example",
"tags": {
"additionalProperty": "example"
},
"missing_descriptions": {
"table": true,
"columns": [
"example"
]
}
}
],
"views": [
{
"name": "example",
"qualified": "example",
"description": "example"
}
]
}
]
}
],
"bases": [
{
"name": "example",
"description": "example",
"bases": [
"example"
],
"columns": [
"example"
],
"tables": [
"example"
],
"missing_descriptions": {
"base": true,
"columns": [
"example"
]
}
}
]
}

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

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}