Job handler
JobHandler
Represents a job handler that runs a specific job based on configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config |
ConfigDTO
|
The configuration data for the job handler. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
_config |
ConfigDTO
|
The configuration data for the job handler. |
_job_handler |
str
|
The name of the job handler. |
_config_id |
int
|
The unique identifier for the configuration. |
_module |
module
|
The imported module for the specified job handler. |
Methods:
| Name | Description |
|---|---|
_import_job_handler_as_module |
Imports the job handler module based on the provided configuration. |
run |
Runs the job associated with the configuration. Args: source_input: The input data for the job. Returns: tuple: A tuple containing job_data, job_status, and target_endpoint. |
Source code in apps/services-bronze-layer/spark-batch/spark_batch_bronze/jobs/job_handler.py
run(source_input)
async
Run the job associated with the configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_input |
type[Model]
|
The input data for the job. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
Tuple[dict, StatusDTO, str]
|
A tuple containing job_data, job_status, and target_endpoint. |