cursus.mods.exe_doc.cradle_helper

Cradle Data Loading Helper for execution document generation.

This module provides the CradleDataLoadingHelper class that extracts execution document configurations from Cradle data loading step configurations.

class CradleDataLoadingHelper[source]

Bases: ExecutionDocumentHelper

Helper for extracting execution document configurations from Cradle data loading steps.

This helper ports the logic from CradleDataLoadingStepBuilder._build_request() and get_request_dict() methods to generate execution document configurations.

can_handle_step(step_name, config)[source]

Check if this helper can handle the given step configuration.

Parameters:
  • step_name (str) – Name of the step

  • config – Step configuration object

Returns:

True if this helper can handle the configuration, False otherwise

Return type:

bool

get_execution_step_name(step_name, config)[source]

Get execution document step name following step builder naming convention.

Transforms step names from DAG format to execution document format: - “CradleDataLoading_training” -> “CradleDataLoading-Training” - “CradleDataLoading_calibration” -> “CradleDataLoading-Calibration”

This follows the same logic as CradleDataLoadingStepBuilder._get_step_name(): 1. Extract base name by removing job_type suffix 2. Add hyphen separator and capitalize job_type

Parameters:
  • step_name (str) – Original step name from DAG (e.g., “CradleDataLoading_training”)

  • config – Configuration object containing job_type

Returns:

Execution document step name (e.g., “CradleDataLoading-Training”)

Return type:

str

extract_step_config(step_name, config)[source]

Extract execution document configuration from Cradle data loading step config.

Parameters:
  • step_name (str) – Name of the step

  • config – Cradle data loading configuration object

Returns:

Dictionary containing the execution document configuration

Raises:

ExecutionDocumentGenerationError – If configuration extraction fails

Return type:

Dict[str, Any]