Data Columns
albert.resources.data_columns
DataColumn
Bases: BaseResource
The definition of a single measured result variable in Albert.
A Data Column (DAC) defines one direct output variable that a task can
measure, such as Viscosity or APHA Color. Data columns are the
reusable building blocks of a Data Template's results: a
DataTemplate references data columns
through its data_column_values, and the values recorded against a data
column during experiments are stored as Property Data.
Data columns are identified by a Data Column ID (format DAC..., e.g.
"DAC9999999") and are managed through
DataColumnCollection, accessed as
client.data_columns.
Example
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"EntityLinkWithName": {
"description": "EntityLink that includes the name field in serialization.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLinkWithName",
"type": "object"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"description": "The definition of a single measured result variable in Albert.\n\nA Data Column (DAC) defines one direct output variable that a task can\nmeasure, such as ``Viscosity`` or ``APHA Color``. Data columns are the\nreusable building blocks of a Data Template's results: a\n[`DataTemplate`][albert.resources.data_templates.DataTemplate] references data columns\nthrough its ``data_column_values``, and the values recorded against a data\ncolumn during experiments are stored as Property Data.\n\nData columns are identified by a Data Column ID (format ``DAC...``, e.g.\n``\"DAC9999999\"``) and are managed through\n[`DataColumnCollection`][albert.collections.data_columns.DataColumnCollection], accessed as\n``client.data_columns``.\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.data_columns import DataColumn\n client = Albert()\n column = DataColumn(name=\"Viscosity\")\n created = client.data_columns.create(data_column=column)\n created.id\n # 'DAC9999999'\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The name of the data column (e.g. ``\"Viscosity\"``).",
"title": "Name",
"type": "string"
},
"default": {
"type": "boolean",
"default": false,
"description": "Whether this is a default (platform-provided) data column.",
"title": "Default"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom metadata keyed by field name. Values may be strings, numbers, or entity links.",
"title": "Metadata"
},
"albertId": {
"default": null,
"description": "The Data Column ID assigned by Albert (format ``DAC...``). Populated by the server on creation; leave unset when building a column to create.",
"title": "Albertid",
"type": "string"
}
},
"required": [
"name"
],
"title": "DataColumn",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
name(str) -
default(bool) -
metadata(dict[str, MetadataItem] | None) -
id(str)
metadata
Custom metadata keyed by field name. Values may be strings, numbers, or entity links.
id
id: str = None
The Data Column ID assigned by Albert (format DAC...). Populated by the server on creation; leave unset when building a column to create.
DataColumnSearchItemDataTemplate
Bases: BaseAlbertModel
A lightweight data template reference within a data column search result.
Show JSON schema:
{
"$defs": {
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"description": "A lightweight data template reference within a data column search result.",
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the data template (format ``DAT...``).",
"title": "Albertid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the data template.",
"title": "Name"
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the data template."
}
},
"title": "DataColumnSearchItemDataTemplate",
"type": "object"
}
Fields:
DataColumnSearchItem
Bases: BaseAlbertModel, HydrationMixin[DataColumn]
Lightweight representation of a DataColumn returned from search.
Returned by
search,
this carries only summary fields for fast listing. Call hydrate() (or fetch
by id via
get_by_id)
to obtain the fully populated
DataColumn.
Show JSON schema:
{
"$defs": {
"DataColumnSearchItem": {
"description": "Lightweight representation of a DataColumn returned from search.\n\nReturned by\n[`search`][albert.collections.data_columns.DataColumnCollection.search],\nthis carries only summary fields for fast listing. Call ``hydrate()`` (or fetch\nby ``id`` via\n[`get_by_id`][albert.collections.data_columns.DataColumnCollection.get_by_id])\nto obtain the fully populated\n[`DataColumn`][albert.resources.data_columns.DataColumn].",
"properties": {
"albertId": {
"description": "The Data Column ID (format ``DAC...``).",
"title": "Albertid",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the data column.",
"title": "Name"
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the data column."
},
"createdByName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the user who created the data column.",
"title": "Createdbyname"
},
"createdBy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the user who created the data column.",
"title": "Createdby"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ISO 8601 timestamp of when the data column was created.",
"title": "Createdat"
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ISO 8601 timestamp of when the data column was last updated.",
"title": "Updatedat"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom metadata attached to the data column.",
"title": "Metadata"
},
"DataTemplates": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/DataColumnSearchItemDataTemplate"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The data templates that reference this data column.",
"title": "Datatemplates"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The composite type of the data column (e.g. ``composite``, ``sub``), when applicable.",
"title": "Type"
},
"parentDataColumn": {
"anyOf": [
{
"$ref": "#/$defs/DataColumnSearchItem"
},
{
"type": "null"
}
],
"default": null,
"description": "The parent data column, present on composite sub-column rows."
},
"subDataColumns": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/DataColumnSearchItem"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The sub data columns, present on composite parent rows.",
"title": "Subdatacolumns"
}
},
"required": [
"albertId"
],
"title": "DataColumnSearchItem",
"type": "object"
},
"DataColumnSearchItemDataTemplate": {
"description": "A lightweight data template reference within a data column search result.",
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the data template (format ``DAT...``).",
"title": "Albertid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the data template.",
"title": "Name"
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the data template."
}
},
"title": "DataColumnSearchItemDataTemplate",
"type": "object"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"$ref": "#/$defs/DataColumnSearchItem"
}
Fields:
-
_collection(BaseCollection | None) -
id(DataColumnId) -
name(str | None) -
status(Status | None) -
created_by_name(str | None) -
created_by(str | None) -
created_at(str | None) -
updated_at(str | None) -
metadata(dict[str, Any] | None) -
data_templates(list[DataColumnSearchItemDataTemplate] | None) -
type(str | None) -
parent_data_column(DataColumnSearchItem | None) -
sub_data_columns(list[DataColumnSearchItem] | None)
created_by_name
created_by_name: str | None = None
The name of the user who created the data column.
updated_at
updated_at: str | None = None
ISO 8601 timestamp of when the data column was last updated.
data_templates
data_templates: (
list[DataColumnSearchItemDataTemplate] | None
) = None
The data templates that reference this data column.
type
type: str | None = None
The composite type of the data column (e.g. composite, sub), when applicable.
parent_data_column
parent_data_column: DataColumnSearchItem | None = None
The parent data column, present on composite sub-column rows.
sub_data_columns
sub_data_columns: list[DataColumnSearchItem] | None = None
The sub data columns, present on composite parent rows.