ds_provider_aic_py_lib.serde

File: __init__.py Region: ds_provider_aic_py_lib/serde

Serde for fetch query results.

Submodules

Classes

FetchQueryDeserializer

Turn one fetch QueryResult into a pandas frame.

Package Contents

class ds_provider_aic_py_lib.serde.FetchQueryDeserializer[source]

Bases: ds_resource_plugin_py_lib.common.serde.deserialize.base.DataDeserializer

Turn one fetch QueryResult into a pandas frame.

__call__(value: Any, **_kwargs: Any) → pandas.DataFrame[source]

Deserialize a query body.

Parameters:
  • value – JSON object, or a JSON string or bytes body.

  • **_kwargs – Unused. Present for the deserializer contract.

Returns:

A frame whose columns follow columns and use arrow dtypes.

Raises:

DeserializationError – The body is not a rectangular query result.

get_next(value: Any, **_kwargs: Any) → bool[source]

Return whether fetch truncated this page.

get_end_cursor(value: Any, **kwargs: Any) → str | None[source]

Return the next row offset when this page has rows.

Parameters:
  • value – Query body.

  • **kwargs – offset is the offset this page was read from.

Returns:

The absolute offset of the next page, or None when the page is empty.