tracdap.rt.metadata.data
¶
Module Contents¶
Classes¶
Create a collection of name/value pairs. |
|
A schema definition describes the schema of a dataset |
|
Enumeration of the available types of data schema |
|
- class tracdap.rt.metadata.data.DataDefinition¶
-
- 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:
- class tracdap.rt.metadata.data.FieldSchema¶
- businessKey¶
businessKey
- Type:
bool
- categorical¶
categorical
- Type:
bool
- fieldName¶
fieldName
- Type:
str
- fieldOrder¶
fieldOrder
- Type:
int
- 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.PartType(*args, **kwds)¶
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- PART_BY_RANGE = (1,)¶
- PART_BY_VALUE = (2,)¶
- PART_ROOT = (0,)¶
- 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
- schemaType¶
schemaType
- Type:
- 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
- SCHEMA_TYPE_NOT_SET = (0,)¶
- TABLE = (1,)¶
- class tracdap.rt.metadata.data.TableSchema¶
- fields¶
fields
- Type:
List[FieldSchema]