tracdap.rt.metadata.data

Module Contents

Classes

DataDefinition

Define a dataset that can be stored and managed in the TRAC platform

FieldSchema

Schema for an individual field in a tabular dataset

PartKey

Partition key for tabular datasets

PartType

Partitioning scheme applied to a dataset

SchemaDefinition

A schema definition describes the schema of a dataset

SchemaType

Enumeration of the available types of data schema

TableSchema

Schema for a tabular dataset

class tracdap.rt.metadata.data.DataDefinition

Define a dataset that can be stored and managed in the TRAC platform

class Delta
dataItem

dataItem

Type:

str

deltaIndex

deltaIndex

Type:

int

class Part
partKey

partKey

Type:

PartKey

snap

snap

Type:

DataDefinition.Snap

class Snap
deltas

deltas

Type:

List[DataDefinition.Delta]

snapIndex

snapIndex

Type:

int

parts

parts

Type:

Dict[str, DataDefinition.Part]

schema

schema

Type:

Optional[SchemaDefinition]

schemaId

schemaId

Type:

Optional[TagSelector]

storageId

storageId

Type:

TagSelector

class tracdap.rt.metadata.data.FieldSchema

Schema for an individual field in a tabular dataset

See also

TableSchema

businessKey

businessKey

Type:

bool

categorical

categorical

Type:

bool

fieldName

fieldName

Type:

str

fieldOrder

fieldOrder

Type:

int

fieldType

fieldType

Type:

BasicType

formatCode

formatCode

Type:

Optional[str]

label

label

Type:

str

notNull

This could become mandatory with the next metadata update

Type:

Optional[bool]

class tracdap.rt.metadata.data.PartKey

Partition key for tabular datasets

opaqueKey

opaqueKey

Type:

str

partRangeMax

partRangeMax

Type:

Optional[Value]

partRangeMin

partRangeMin

Type:

Optional[Value]

partType

partType

Type:

PartType

partValues

partValues

Type:

List[Value]

class tracdap.rt.metadata.data.PartType(*args, **kwds)

Bases: enum.Enum

Partitioning scheme applied to a dataset

PART_BY_RANGE = 1

Partition by range over an ordered variable (not available yet)

PART_BY_VALUE = 2

Partition by value over a categorical variable (not available yet)

PART_ROOT = 0

Dataset has a single partition called the root partition (this is the default)

class tracdap.rt.metadata.data.SchemaDefinition

A schema definition describes the schema of a dataset

Schema definitions can be top level objects (a type of object definition), in which case they can be referred to by multiple data definitions. Alternatively they can be embedded in a data definition to create datasets with one-off schemas.

A table schema describes the schema of a tabular data set. Other schema types may be added later, e.g. for matrices, tensors, curves, surfaces and structured datasets.

See also

DataDefinition

partType

partType

Type:

PartType

schemaType

schemaType

Type:

SchemaType

table

table

Type:

Optional[TableSchema]

class tracdap.rt.metadata.data.SchemaType(*args, **kwds)

Bases: enum.Enum

Enumeration of the available types of data schema

Currently only table schemas are supported, other schema types may be added later.

See also

SchemaDefinition

SCHEMA_TYPE_NOT_SET = 0
TABLE = 1

Tabular data

class tracdap.rt.metadata.data.TableSchema

Schema for a tabular dataset

fields

fields

Type:

List[FieldSchema]