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