cursus.mods.exe_doc.redshift_data_loading_helper

Redshift Data Loading Helper for execution document generation.

Converts RedshiftDataLoadingConfig Pydantic fields into the 3-specification JSON structure (clusterSpecification, querySpecification, outputSpecification) expected by the SAIS SDK script at /opt/ml/processing/config/config.

class RedshiftDataLoadingHelper[source]

Bases: ExecutionDocumentHelper

Helper for extracting execution document configurations from RedshiftDataLoading steps.

Converts flat Cursus Pydantic fields into the 3-specification JSON structure (clusterSpecification, querySpecification, outputSpecification) expected by the SAIS SDK Redshift script.

can_handle_step(step_name, config)[source]

Check if this helper can handle the given step configuration.

get_execution_step_name(step_name, config)[source]

Get execution document step name.

Handles job_type suffix: RedshiftDataLoading_mo_orders → RedshiftDataLoading-MoOrders

extract_step_config(step_name, config)[source]

Extract 3-specification JSON from RedshiftDataLoading config.

Uses config.step_config_json if available (computed property), otherwise builds from individual fields.

Returns:

{clusterSpecification, querySpecification, outputSpecification}

Return type:

Dict matching the SAIS SDK’s 3-spec structure

get_step_type()[source]

Return STEP_TYPE for execution document.