Property Data
albert.collections.property_data.PropertyDataCollection
Bases: BaseCollection
Manage Property Data in the Albert platform.
Property Data is the actual measured result values in Albert. It lives in two places, and this collection covers both:
- On a Task: the results captured when a Property Task is executed,
organized per Block, interval combination, and trial. Task methods here are
named
*_task_*/*_interval_*/*_trial_*. - On an Inventory Item: custom property-data values attached directly to a
material (methods named
*_on_inventory). Task-measured results also roll up to the associated inventory item's properties.
Property Data is not Inventory Specs or Attributes. Specs
(client.inventory.get_specs / add_specs, deprecated) and
AttributeCollection
(client.attributes) store inventory reference properties for worksheet
lookup. Use this collection for experimentally measured (or custom PTD)
values.
Intervals and trials. Within a Block, results are addressed by:
- Interval: one specific combination of parameter setpoints (e.g. "measured
at 25°C"). It is identified by an interval ID of the form
ROW1(one intervalized parameter) orROW1XROW2(two). Build this ID from parameter values withget_interval_id, or list the intervals present on a task withcheck_for_task_data. When a block has no intervalized parameters, use the literal"default". - Trial: one replicate measurement of a given interval, identified by an integer trial number.
The void/unvoid methods mirror this hierarchy: void an entire task block, a single interval, or a single trial. Voided data is retained but excluded from results; unvoiding restores it.
Writing results. Use add_properties_to_task for brand-new values,
update_or_create_task_properties to upsert, and
bulk_load_task_properties to load a whole table at once. When adding
trials, supply a trial number only for an existing trial; omit it to create a
new trial, and create new trials one call at a time (loop for many).
This collection is accessed as client.property_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The authenticated Albert session used for API calls. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
base_path |
str
|
The base API route for property data requests. |
Methods:
| Name | Description |
|---|---|
get_properties_on_inventory |
Get all property data attached to an inventory item (not Specs/Attributes). |
add_properties_to_inventory |
Add custom property-data values directly to an inventory item. |
update_property_on_inventory |
Update a property-data value on an inventory item. |
get_task_block_properties |
Get the results in one task block for one inventory item. |
get_all_task_properties |
Get results across all block/inventory combinations of a task. |
get_task_property_records |
Get a task's results as flat rows, with their parameter setpoints attached. |
get_task_curve_data |
Get the curve data recorded on a task, one DataFrame per curve. |
check_for_task_data |
Report which block/interval combinations of a task have data. |
check_block_interval_for_data |
Report whether one block interval has data. |
add_properties_to_task |
Add new result values to a task block. |
update_property_on_task |
Patch existing result values on a task. |
update_or_create_task_properties |
Upsert result values on a task block. |
bulk_load_task_properties |
Overwrite a task block's results from tabular data. |
bulk_delete_task_data |
Delete a task block's results. |
void_task_data |
Void all results in a task block. |
unvoid_task_data |
Unvoid all results in a task block. |
void_interval_data |
Void the results of one interval combination. |
unvoid_interval_data |
Unvoid the results of one interval combination. |
void_trial_data |
Void the results of one trial. |
unvoid_trial_data |
Unvoid the results of one trial. |
search |
Search recorded property data across the platform. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The authenticated Albert session used for API calls. |
required |
Source code in src/albert/collections/property_data.py
get_properties_on_inventory
get_properties_on_inventory(
*, inventory_id: InventoryId
) -> InventoryPropertyData
Get all property data attached to an inventory item.
This includes both task-measured results that have rolled up to the item
and custom property-data values added directly to it. This is not
Inventory Specs / Attributes (inventory reference properties); for those
use client.inventory.get_specs (deprecated) or
get_by_parent_ids.
For results in the context of a specific task, use
get_task_block_properties
instead.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
InventoryId
|
The inventory item to retrieve properties for (format |
required |
Returns:
| Type | Description |
|---|---|
InventoryPropertyData
|
The item's properties, split into task-derived and directly-added data. |
Source code in src/albert/collections/property_data.py
add_properties_to_inventory
add_properties_to_inventory(
*,
inventory_id: InventoryId,
properties: list[InventoryDataColumn],
) -> list[InventoryPropertyDataCreate]
Add custom property-data values directly to an inventory item.
Use this for property-data values known independently of a task (stored as PTD on the item). Each entry targets a data column and carries a value. Properties are added one at a time and collected into the result.
This is not Inventory Specs / Attributes. For inventory reference
properties (worksheet lookup source of truth), use
add_specs
(deprecated) or
add_values.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
InventoryId
|
The inventory item to add properties to (format |
required |
properties
|
list[InventoryDataColumn]
|
The properties to add. Each pairs a data column with a value. |
required |
Returns:
| Type | Description |
|---|---|
list[InventoryPropertyDataCreate]
|
The registered properties. |
Source code in src/albert/collections/property_data.py
update_property_on_inventory
update_property_on_inventory(
*,
inventory_id: InventoryId,
property_data: InventoryDataColumn,
) -> InventoryPropertyData
Update a property on an inventory item.
Matches the existing property by its data column and updates its value. If the item has no value yet for that data column, the value is added.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
InventoryId
|
The inventory item to update (format |
required |
property_data
|
InventoryDataColumn
|
The data column and new value to set. |
required |
Returns:
| Type | Description |
|---|---|
InventoryPropertyData
|
The item's properties after the update. |
Source code in src/albert/collections/property_data.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
get_task_block_properties
get_task_block_properties(
*,
inventory_id: InventoryId,
task_id: TaskId,
block_id: BlockId,
lot_id: LotId | None = None,
) -> TaskPropertyData
Get the recorded results in one task block for one inventory item.
This is the focused read for a single block/inventory (and optionally lot)
combination. To sweep every combination on a task at once, use
get_all_task_properties.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
InventoryId
|
The inventory item whose results to read (format |
required |
task_id
|
TaskId
|
The Property Task the block belongs to (format |
required |
block_id
|
BlockId
|
The block to read (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None (all lots). |
None
|
Returns:
| Type | Description |
|---|---|
TaskPropertyData
|
The results in the block for the given inventory item, organized by interval and trial. |
Source code in src/albert/collections/property_data.py
get_task_curve_data
get_task_curve_data(
*,
task_id: TaskId,
block_id: BlockId | None = None,
inventory_id: InventoryId | None = None,
lot_id: LotId | None = None,
data_column_id: DataColumnId | None = None,
include_void: bool = False,
) -> list[TaskCurveData]
Get the curve data recorded on a task, one DataFrame per curve.
Finds every curve data column that has an uploaded curve and reads its points back. Each curve is returned with the block, inventory item, interval, trial, and data column it was recorded in. Columns are named by the headers of the uploaded CSV, values are returned as stored (typically strings), and rows are ordered by the curve's X axis when the data template defines one.
Each curve is read with its own request, so narrow the read with block_id,
inventory_id, lot_id, or data_column_id when only some curves are of
interest.
Example
curves = client.property_data.get_task_curve_data(task_id="TASFOR1")
for curve in curves:
print(curve.block_id, curve.trial_number, curve.data_column_name)
curve.data.to_csv(f"{curve.block_id}_{curve.trial_number}.csv", index=False)
# One curve column in one block
curves = client.property_data.get_task_curve_data(
task_id="TASFOR1", block_id="BLK1", data_column_id="DAC9999999"
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task to read curves from (format |
required |
block_id
|
BlockId
|
Only return curves in this block (format |
None
|
inventory_id
|
InventoryId
|
Only return curves for this inventory item (format |
None
|
lot_id
|
LotId
|
Only return curves for this lot (format |
None
|
data_column_id
|
DataColumnId
|
Only return curves for this curve data column (format |
None
|
include_void
|
bool
|
When True, also return curves from voided trials and intervals. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
list[TaskCurveData]
|
One entry per recorded curve, in block, interval, trial, column order. Empty when the task has no recorded curves matching the filters. |
Source code in src/albert/collections/property_data.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | |
check_for_task_data
check_for_task_data(
*, task_id: TaskId
) -> list[CheckPropertyData]
Report which block/interval combinations of a task have data.
Returns one entry per block/interval/inventory combination on the task,
each flagging whether data exists (data_exists) and carrying the
interval_id you can pass to the void/unvoid or read methods. This is
the easiest way to discover the interval IDs present on a task.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task to inspect (format |
required |
Returns:
| Type | Description |
|---|---|
list[CheckPropertyData]
|
The data status of each block/interval/inventory combination. |
Source code in src/albert/collections/property_data.py
check_block_interval_for_data
check_block_interval_for_data(
*,
block_id: BlockId,
task_id: TaskId,
interval_id: IntervalId,
) -> CheckPropertyData
Report whether one specific block interval has data.
A single-interval version of check_for_task_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_id
|
BlockId
|
The block to check (format |
required |
task_id
|
TaskId
|
The task the block belongs to (format |
required |
interval_id
|
IntervalId
|
The interval combination to check (e.g. |
required |
Returns:
| Type | Description |
|---|---|
CheckPropertyData
|
The data status of the given block interval. |
Source code in src/albert/collections/property_data.py
get_all_task_properties
get_all_task_properties(
*,
task_id: TaskId,
with_data_only: bool = False,
inventory_id: InventoryId | None = None,
lot_id: LotId | None = None,
) -> list[TaskPropertyData]
Get recorded results across all block/inventory combinations of a task.
Sweeps every block/inventory/lot combination on the task and returns its
results. For a single known combination, get_task_block_properties
is more direct.
Narrow the sweep with inventory_id and lot_id when only part of the
task is of interest. Combinations that do not match are never requested, so
filtering is faster than discarding results afterwards.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task to retrieve results for (format |
required |
with_data_only
|
bool
|
When True, skip combinations that have no recorded data. Defaults to False (every combination is returned). |
False
|
inventory_id
|
InventoryId
|
Only return results for this inventory item (format |
None
|
lot_id
|
LotId
|
Only return results for this lot (format |
None
|
Returns:
| Type | Description |
|---|---|
list[TaskPropertyData]
|
Results for each block/inventory/lot combination on the task. Each entry carries every interval recorded for that combination. Empty when the filters match no combination. |
Source code in src/albert/collections/property_data.py
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | |
get_task_property_records
get_task_property_records(
*,
task_id: TaskId,
with_data_only: bool = True,
inventory_id: InventoryId | None = None,
lot_id: LotId | None = None,
) -> list[TaskPropertyRecord]
Get a task's recorded results as flat rows, with their parameter setpoints.
Returns one record per measured value, already associated with the inventory
item, lot, interval, trial and data column it belongs to, and with the parameter
setpoints for that interval resolved and attached. Use this instead of walking
get_all_task_properties
and correlating workflows by hand.
Setpoints cannot be resolved for tenants running the increased-intervals beta,
where results are addressed by child workflow ID rather than by interval row.
Those records still carry their values and
interval_combination, but parameter_setpoints is empty.
Narrow the read with inventory_id and lot_id when only part of the task
is of interest. Combinations that do not match are never requested, so
filtering is faster than discarding records afterwards.
Example
records = client.property_data.get_task_property_records(task_id="TASFOR1")
records[0].data_column_name, records[0].value, records[0].parameter_setpoints
# ('Combing Force', '17.77', {'Condition': 'Wet'})
# Just one material on the task
records = client.property_data.get_task_property_records(
task_id="TASFOR1", inventory_id="INVA9999999"
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task to read results from (format |
required |
with_data_only
|
bool
|
When True, skip block/inventory combinations with no recorded data. Defaults to True. |
True
|
inventory_id
|
InventoryId
|
Only return records for this inventory item (format |
None
|
lot_id
|
LotId
|
Only return records for this lot (format |
None
|
Returns:
| Type | Description |
|---|---|
list[TaskPropertyRecord]
|
One record per measured value, in block, interval, trial, column order. Empty when the filters match no combination. |
See Also
TaskPropertyRecord.to_dataframe : Render the records as a table.
Source code in src/albert/collections/property_data.py
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 | |
update_property_on_task
update_property_on_task(
*,
task_id: TaskId,
patch_payload: list[PropertyDataPatchDatum],
inventory_id: InventoryId | None = None,
block_id: BlockId | None = None,
lot_id: LotId | None = None,
return_scope: ReturnScope = "task",
) -> list[TaskPropertyData]
Patch existing result values on a task.
This is the low-level update path: it applies a list of explicit patch
operations to values that already exist. For most cases prefer
update_or_create_task_properties (upsert) or
add_properties_to_task (new values), which build the patches for
you.
Example
from albert.resources.property_data import PropertyDataPatchDatum
from albert.core.shared.models.patch import PatchOperation
patch = PropertyDataPatchDatum(
operation=PatchOperation.UPDATE,
id="PTD1",
attribute="value",
new_value="1.5",
old_value="1.2",
)
client.property_data.update_property_on_task(
task_id="TASFOR1", patch_payload=[patch]
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task to update (format |
required |
patch_payload
|
list[PropertyDataPatchDatum]
|
The patch operations to apply. Image and curve values cannot be updated
here; use |
required |
inventory_id
|
InventoryId | None
|
Required when return_scope="block". |
None
|
block_id
|
BlockId | None
|
Required when return_scope="block". |
None
|
lot_id
|
LotId | None
|
Optional context for combo fetches. |
None
|
return_scope
|
Literal[task, block, none]
|
Controls the response. "task" (default) returns all task properties, "block" returns only the affected block/inventory/lot combination, and "none" skips fetching data. |
'task'
|
Returns:
| Type | Description |
|---|---|
list[TaskPropertyData]
|
The task's properties after the update, scoped per |
Source code in src/albert/collections/property_data.py
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 | |
void_task_data
void_task_data(
*,
task_id: TaskId,
inventory_id: InventoryId,
block_id: BlockId,
lot_id: LotId | None = None,
) -> None
Void all recorded results in a task block for one inventory item.
Voided data is retained but excluded from results; restore it with
unvoid_task_data. To void a narrower scope, use
void_interval_data or void_trial_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task containing the block (format |
required |
inventory_id
|
InventoryId
|
The inventory item whose results to void (format |
required |
block_id
|
BlockId
|
The block to void (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/property_data.py
unvoid_task_data
unvoid_task_data(
*,
task_id: TaskId,
inventory_id: InventoryId,
block_id: BlockId,
lot_id: LotId | None = None,
) -> None
Restore previously voided results in a task block for one inventory item.
The inverse of void_task_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task containing the block (format |
required |
inventory_id
|
InventoryId
|
The inventory item whose results to restore (format |
required |
block_id
|
BlockId
|
The block to unvoid (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/property_data.py
void_interval_data
void_interval_data(
*,
task_id: TaskId,
interval_id: str,
inventory_id: InventoryId,
block_id: BlockId,
lot_id: LotId | None = None,
data_template_id: DataTemplateId | None = None,
) -> None
Void the results of one interval combination in a task block.
Voided data is retained but excluded from results; restore it with
unvoid_interval_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task containing the block (format |
required |
interval_id
|
str
|
The interval combination to void (e.g. |
required |
inventory_id
|
InventoryId
|
The inventory item whose results to void (format |
required |
block_id
|
BlockId
|
The block to void within (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
data_template_id
|
DataTemplateId
|
Deprecated and ignored. Voiding always applies to every data template in the interval. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/property_data.py
986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 | |
unvoid_interval_data
unvoid_interval_data(
*,
task_id: TaskId,
interval_id: str,
inventory_id: InventoryId,
block_id: BlockId,
lot_id: LotId | None = None,
data_template_id: DataTemplateId | None = None,
) -> None
Restore previously voided results of one interval combination.
The inverse of void_interval_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task containing the block (format |
required |
interval_id
|
str
|
The interval combination to restore (e.g. |
required |
inventory_id
|
InventoryId
|
The inventory item whose results to restore (format |
required |
block_id
|
BlockId
|
The block to restore within (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
data_template_id
|
DataTemplateId
|
Deprecated and ignored. Unvoiding always applies to every data template in the interval. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/property_data.py
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 | |
void_trial_data
void_trial_data(
*,
task_id: TaskId,
interval_id: str,
trial_number: int,
inventory_id: InventoryId,
block_id: BlockId,
lot_id: LotId | None = None,
) -> None
Void one trial (replicate) within an interval combination.
The narrowest void scope: a single replicate measurement. Restore it with
unvoid_trial_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task containing the block (format |
required |
interval_id
|
str
|
The interval combination the trial belongs to (e.g. |
required |
trial_number
|
int
|
The 1-based trial (replicate) number to void. |
required |
inventory_id
|
InventoryId
|
The inventory item whose result to void (format |
required |
block_id
|
BlockId
|
The block to void within (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/property_data.py
1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 | |
unvoid_trial_data
unvoid_trial_data(
*,
task_id: TaskId,
interval_id: str,
trial_number: int,
inventory_id: InventoryId,
block_id: BlockId,
lot_id: LotId | None = None,
) -> None
Restore one previously voided trial (replicate).
The inverse of void_trial_data.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task containing the block (format |
required |
interval_id
|
str
|
The interval combination the trial belongs to (e.g. |
required |
trial_number
|
int
|
The 1-based trial (replicate) number to restore. |
required |
inventory_id
|
InventoryId
|
The inventory item whose result to restore (format |
required |
block_id
|
BlockId
|
The block to restore within (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/property_data.py
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 | |
add_properties_to_task
add_properties_to_task(
*,
inventory_id: InventoryId,
task_id: TaskId,
block_id: BlockId,
lot_id: LotId | None = None,
properties: list[TaskPropertyCreate],
return_scope: ReturnScope = "task",
) -> list[TaskPropertyData]
Add new result values to a task block.
This path is for new values only; to update existing values or upsert,
use update_or_create_task_properties, and to overwrite a whole
table use bulk_load_task_properties. Each value targets a data
column and an interval combination (build the interval ID with
get_interval_id).
Example
from albert.resources.property_data import TaskPropertyCreate, TaskDataColumn
# Derive the required data column / template from the existing block
block = client.property_data.get_task_block_properties(
inventory_id="INVA9999999", task_id="TASFOR1", block_id="BLK1"
)
column = block.data[0].trials[0].data_columns[0]
new_value = TaskPropertyCreate(
interval_combination="default",
data_column=TaskDataColumn(
data_column_id=column.id, column_sequence=column.sequence
),
value="33.3",
data_template=block.data_template,
)
client.property_data.add_properties_to_task(
inventory_id="INVA9999999",
task_id="TASFOR1",
block_id="BLK1",
properties=[new_value],
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
InventoryId
|
The inventory item the results are for (format |
required |
task_id
|
TaskId
|
The task to add results to (format |
required |
block_id
|
BlockId
|
The block to add results to (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
properties
|
list[TaskPropertyCreate]
|
The result values to add. |
required |
return_scope
|
Literal[task, block, none]
|
Controls the response. "task" (default) returns all task properties, "block" returns only the affected block/inventory/lot combination, and "none" skips fetching data. |
'task'
|
Returns:
| Type | Description |
|---|---|
list[TaskPropertyData]
|
The task's results after the add, scoped per |
Notes
To add to an existing trial, set trial_number on the
TaskPropertyCreate; leave it unset to create a new trial. Create new
trials one call at a time (loop for many) to avoid unexpected behavior.
Source code in src/albert/collections/property_data.py
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 | |
update_or_create_task_properties
update_or_create_task_properties(
*,
inventory_id: InventoryId,
task_id: TaskId,
block_id: BlockId,
lot_id: LotId | None = None,
properties: list[TaskPropertyCreate],
return_scope: ReturnScope = "task",
) -> list[TaskPropertyData]
Upsert result values on a task block.
Updates values that already exist and adds those that do not, in a single
call. This is the recommended general-purpose write method; use
add_properties_to_task when you know all values are new, or
bulk_load_task_properties to overwrite an entire table. Handles
image and curve values, which update_property_on_task cannot.
Example
from albert.resources.property_data import TaskPropertyCreate, TaskDataColumn
block = client.property_data.get_task_block_properties(
inventory_id="INVA9999999", task_id="TASFOR1", block_id="BLK1"
)
column = block.data[0].trials[0].data_columns[0]
value = TaskPropertyCreate(
interval_combination="default",
data_column=TaskDataColumn(
data_column_id=column.id, column_sequence=column.sequence
),
value="42",
trial_number=1,
data_template=block.data_template,
)
client.property_data.update_or_create_task_properties(
inventory_id="INVA9999999",
task_id="TASFOR1",
block_id="BLK1",
properties=[value],
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
InventoryId
|
The inventory item the results are for (format |
required |
task_id
|
TaskId
|
The task to write to (format |
required |
block_id
|
BlockId
|
The block to write to (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
properties
|
list[TaskPropertyCreate]
|
The result values to update or create. |
required |
return_scope
|
Literal[task, block, none]
|
Controls the response. "task" (default) returns all task properties, "block" returns only the affected block/inventory/lot combination, and "none" skips fetching data. |
'task'
|
Returns:
| Type | Description |
|---|---|
list[TaskPropertyData]
|
The task's results after the upsert, scoped per |
Notes
To target an existing trial, set trial_number on the
TaskPropertyCreate; leave it unset to create a new trial. Create new
trials one call at a time (loop for many) to avoid unexpected behavior.
Source code in src/albert/collections/property_data.py
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 | |
bulk_load_task_properties
bulk_load_task_properties(
*,
inventory_id: InventoryId,
task_id: TaskId,
block_id: BlockId,
property_data: BulkPropertyData,
interval="default",
lot_id: LotId = None,
return_scope: ReturnScope = "task",
) -> list[TaskPropertyData]
Overwrite a task block's results from tabular data.
The fastest way to load a full table of results for one interval. Build the
BulkPropertyData from a DataFrame with BulkPropertyData.from_dataframe.
.. warning:: This overwrites any existing results for the targeted interval. Column names in the data must exactly match the data column names (case-sensitive).
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
InventoryId
|
The ID of the inventory. |
required |
task_id
|
TaskId
|
The ID of the task. |
required |
block_id
|
BlockId
|
The ID of the block. |
required |
lot_id
|
LotId
|
The ID of the lot, by default None. |
None
|
interval
|
str
|
The interval combination to load into (e.g. |
'default'
|
property_data
|
BulkPropertyData
|
Column-wise data holding all rows for a single interval. Create it with
|
required |
return_scope
|
Literal[task, block, none]
|
Controls the response. "task" (default) returns all task properties, "block" returns only the affected block/inventory/lot combination, and "none" skips fetching data. |
'task'
|
Returns:
| Type | Description |
|---|---|
list[TaskPropertyData]
|
The task's results after the load, scoped per |
Source code in src/albert/collections/property_data.py
1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 | |
bulk_delete_task_data
bulk_delete_task_data(
*,
task_id: TaskId,
block_id: BlockId,
inventory_id: InventoryId,
lot_id: LotId | None = None,
interval_id=None,
) -> None
Delete a task block's results.
Permanently removes results for the block/inventory combination (optionally
narrowed to one interval). To hide data reversibly instead of deleting it,
use the void methods (void_task_data, void_interval_data).
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The task to delete results from (format |
required |
block_id
|
BlockId
|
The block to delete results from (format |
required |
inventory_id
|
InventoryId
|
The inventory item whose results to delete (format |
required |
lot_id
|
LotId
|
A specific lot of the inventory item. Defaults to None. |
None
|
interval_id
|
IntervalId
|
Limit deletion to one interval combination (e.g. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/property_data.py
search
search(
*,
result: str | None = None,
text: str | None = None,
order: OrderBy | None = None,
order_by: OrderBy | None = None,
sort_by: str | None = None,
inventory_ids: list[SearchInventoryId]
| SearchInventoryId
| None = None,
project_ids: list[SearchProjectId]
| SearchProjectId
| None = None,
lot_ids: list[LotId] | LotId | None = None,
data_template_ids: DataTemplateId
| list[DataTemplateId]
| None = None,
data_column_ids: DataColumnId
| list[DataColumnId]
| None = None,
sheet_ids: list[str] | None = None,
category: list[DataEntity] | DataEntity | None = None,
data_templates: list[str] | str | None = None,
data_columns: list[str] | str | None = None,
parameters: list[str] | str | None = None,
parameter_group: list[str] | str | None = None,
parameter_set: list[str] | None = None,
unit: list[str] | str | None = None,
created_by: str | list[str] | None = None,
task_created_by: list[UserId] | UserId | None = None,
updated_by: str | list[str] | None = None,
from_created_at: str | None = None,
to_created_at: str | None = None,
from_updated_at: str | None = None,
to_updated_at: str | None = None,
search_field: list[str] | None = None,
source_field: list[str] | None = None,
facet_list: list[str] | None = None,
return_fields: list[str] | str | None = None,
return_facets: list[str] | str | None = None,
max_items: int | None = None,
) -> Iterator[PropertyDataSearchItem]
Search recorded property data across the platform.
Searches measured results platform-wide (not scoped to a single task) and
returns lightweight search items. The result parameter accepts a
compact result-query syntax for filtering by measured value under a
condition. Results are returned as a lazily paginated iterator.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
str
|
Result-value query, e.g. |
None
|
text
|
str
|
Free text search across all fields. |
None
|
order
|
OrderBy
|
Sort direction (ascending/descending). |
None
|
order_by
|
OrderBy
|
Alternate sort-direction parameter supported by the search API. |
None
|
sort_by
|
str
|
Field to sort results by. |
None
|
inventory_ids
|
SearchInventoryId or list[SearchInventoryId]
|
Filter by inventory IDs. |
None
|
project_ids
|
SearchProjectId or list[SearchProjectId]
|
Filter by project IDs. |
None
|
lot_ids
|
LotId or list[LotId]
|
Filter by lot IDs. |
None
|
data_template_ids
|
DataTemplateId or list[DataTemplateId]
|
Filter by data template IDs. |
None
|
data_column_ids
|
DataColumnId or list[DataColumnId]
|
Filter by data column IDs. |
None
|
sheet_ids
|
list[str]
|
Filter by sheet IDs. |
None
|
category
|
DataEntity or list[DataEntity]
|
Filter by data entity categories. |
None
|
data_templates
|
str or list[str]
|
Filter by data template names. |
None
|
data_columns
|
str or list[str]
|
Filter by data column names. |
None
|
parameters
|
str or list[str]
|
Filter by parameter names. |
None
|
parameter_group
|
str or list[str]
|
Filter by parameter group names. |
None
|
parameter_set
|
list[str]
|
Filter by parameter, unit, and parameter-group combinations. |
None
|
unit
|
str or list[str]
|
Filter by unit names. |
None
|
created_by
|
str or list[str]
|
Filter by creator. Accepts user display name(s) or UserId(s) (e.g.
|
None
|
task_created_by
|
UserId or list[UserId]
|
Filter by user IDs who created the task. |
None
|
updated_by
|
str or list[str]
|
Filter by user(s) who last updated the data. Accepts UserId(s) only
(e.g. |
None
|
from_created_at
|
str
|
Only include records created on or after this date (ISO 8601). |
None
|
to_created_at
|
str
|
Only include records created on or before this date (ISO 8601). |
None
|
from_updated_at
|
str
|
Only include records updated on or after this date (ISO 8601). |
None
|
to_updated_at
|
str
|
Only include records updated on or before this date (ISO 8601). |
None
|
search_field
|
list[str]
|
Restrict which fields the text query searches. |
None
|
source_field
|
list[str]
|
Restrict which fields are returned in the response. |
None
|
facet_list
|
list[str]
|
Fields to include in search facets. |
None
|
return_fields
|
str or list[str]
|
Deprecated and ignored. Use |
None
|
return_facets
|
str or list[str]
|
Deprecated and ignored. Use |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, iterates over all matches. |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[PropertyDataSearchItem]
|
A lazily paginated iterator of matching property data search items. |
Source code in src/albert/collections/property_data.py
1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 | |