Data Columns
albert.collections.data_columns.DataColumnCollection
Bases: BaseCollection
DataColumnCollection is a collection class for managing DataColumn entities in the Albert platform.
Methods:
Name | Description |
---|---|
get_by_name |
Get a data column by its name. |
get_by_id |
Get a data column by its ID. |
get_all |
Get all data column entities with optional filters. |
create |
Create a new data column entity. |
delete |
Delete a data column entity. |
update |
Update a data column entity. |
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
Source code in src/albert/collections/data_columns.py
get_by_name
get_by_name(*, name: str) -> DataColumn | None
Get a data column by its name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the data column to get. |
required |
Returns:
Type | Description |
---|---|
DataColumn | None
|
The data column object on match or None |
Source code in src/albert/collections/data_columns.py
get_by_id
get_by_id(*, id: DataColumnId) -> DataColumn
Get a data column by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the data column to get. |
required |
Returns:
Type | Description |
---|---|
DataColumn | None
|
The data column object on match or None |
Source code in src/albert/collections/data_columns.py
get_all
get_all(
*,
order_by: OrderBy = DESCENDING,
ids: DataColumnId | list[DataColumnId] | None = None,
name: str | list[str] | None = None,
exact_match: bool | None = None,
default: bool | None = None,
start_key: str | None = None,
max_items: int | None = None,
) -> Iterator[DataColumn]
Get all data column entities with optional filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
order_by
|
OrderBy
|
The order in which to sort the results. Default is DESCENDING. |
DESCENDING
|
ids
|
str or list[str]
|
Filter by one or more data column IDs. |
None
|
name
|
str or list[str]
|
Filter by name(s). |
None
|
exact_match
|
bool
|
Whether the name filter should match exactly. |
None
|
default
|
bool
|
Whether to return only default columns. |
None
|
start_key
|
str
|
The pagination key to start from. |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, fetches all available items. |
None
|
Returns:
Type | Description |
---|---|
Iterator[DataColumn]
|
An iterator over matching DataColumn entities. |
Source code in src/albert/collections/data_columns.py
create
create(*, data_column: DataColumn) -> DataColumn
Create a new data column entity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column
|
DataColumn
|
The data column object to create. |
required |
Returns:
Type | Description |
---|---|
DataColumn
|
The created data column object. |
Source code in src/albert/collections/data_columns.py
delete
delete(*, id: DataColumnId) -> None
Delete a data column entity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The ID of the data column object to delete. |
required |
Returns:
Type | Description |
---|---|
None
|
|
Source code in src/albert/collections/data_columns.py
update
update(*, data_column: DataColumn) -> DataColumn
Update a data column entity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column
|
DataColumn
|
The updated data column object. The ID must be set and match an existing data column. |
required |
Returns:
Type | Description |
---|---|
DataColumn
|
The updated data column object as registered in Albert. |