ds_resource_plugin_py_lib.common.resource.dataset.result¶
File: result.py
Region: ds_resource_plugin_py_lib/common/resource/dataset
Description¶
Dataclass capturing operation details for every dataset method call.
Classes¶
Structured error captured from a |
|
Report produced by every dataset operation. |
Module Contents¶
- class ds_resource_plugin_py_lib.common.resource.dataset.result.OperationError[source]¶
Bases:
ds_common_serde_py_lib.SerializableStructured error captured from a
ResourceException.- message: str¶
The error message.
- code: str¶
The error code.
- status_code: int¶
The HTTP status code.
- details: dict[str, Any]¶
The error details.
- class ds_resource_plugin_py_lib.common.resource.dataset.result.OperationInfo[source]¶
Bases:
ds_common_serde_py_lib.SerializableReport produced by every dataset operation.
Timing fields (
started_at,ended_at,duration_ms) are populated automatically by thetrack_resultdecorator. Providers may setrow_count,schema, ormetadatainside their method; any value left at its default will be auto-derived fromself.outputafter the method returns.Accessible on the dataset instance as
self.operation.- method: ds_resource_plugin_py_lib.common.resource.dataset.enums.DatasetMethod | None = None¶
The method that was called.
- success: bool = False¶
Whether the method call was successful.
- error: OperationError | None = None¶
The error captured from a
ResourceException.
- row_count: int = 0¶
The number of rows read, written, or discovered.
- started_at: datetime.datetime | None = None¶
The timestamp when the method started.
- ended_at: datetime.datetime | None = None¶
The timestamp when the method ended.
- duration_ms: float = 0.0¶
The duration of the method in milliseconds.
- schema: dict[str, Any] | None = None¶
The schema of the data.
- metadata: dict[str, Any]¶
The metadata of the data.