pdstools.decision_analyzer.data_read_utils

Decision Analyzer data-reading utilities.

The Action Analysis readers (read_nested_zip_files, read_gzipped_data, read_gzipped_ndjson_directory) have moved to pdstools.pega_io so all user-facing file reads funnel through one inspectable surface. They are re-exported here for back-compat with any external caller importing from the old location; new code should import from pdstools.pega_io.

Functions

validate_columns(→ tuple[bool, str | None])

Validate that default columns from table definition exist in the dataframe.

Module Contents

validate_columns(df: polars.LazyFrame, extract_type: dict[str, pdstools.decision_analyzer.column_schema.TableConfig]) tuple[bool, str | None]

Validate that default columns from table definition exist in the dataframe.

This function checks if required columns exist in the data, accounting for the fact that columns may be present under either their source name or their target label name.

Parameters:
  • df (pl.LazyFrame) – The dataframe to validate

  • extract_type (dict[str, TableConfig]) – Table configuration mapping column names to their properties

Returns:

tuple containing validation success (bool) and error message (str or None)

Return type:

tuple[bool, str | None]