Skip to content

JobOptions

kedro_dagster.config.models.JobOptions

Bases: BaseModel

Configuration options for a Dagster job.

Parameters

Name Type Description Default
pipeline PipelineOptions

Pipeline options specifying which pipeline and nodes to run.

required
executor ExecutorOptions or str or None

Executor options instance or string key referencing an executor.

required
schedule ScheduleOptions or str or None

Schedule options instance or string key referencing a schedule.

required
loggers list[LoggerOptions or str] or None

List of logger configurations (inline LoggerOptions) or logger names (strings) to attach to the job.

required

Examples

jobs:
  my_data_processing:
    pipeline:
      pipeline_name: data_processing
      node_namespaces: [price_predictor]
      tags: [test1]
    executor: multiprocessing
    schedule: daily_schedule
    loggers: [console, file_logger]

See Also

kedro_dagster.config.models.PipelineOptions : Pipeline filtering options within this job. kedro_dagster.config.models.ScheduleOptions : Schedule options referenced by this job. kedro_dagster.config.models.LoggerOptions : Logger options referenced by this job. kedro_dagster.config.models.KedroDagsterConfig : Top-level config that holds a dict of these job options.

Source Code

Show/Hide source
class JobOptions(BaseModel):
    """Configuration options for a Dagster job.

    Parameters
    ----------
    pipeline : PipelineOptions
        Pipeline options specifying which pipeline and nodes to run.
    executor : ExecutorOptions or str or None
        Executor options instance or string key referencing an executor.
    schedule : ScheduleOptions or str or None
        Schedule options instance or string key referencing a schedule.
    loggers : list[LoggerOptions or str] or None
        List of logger configurations (inline ``LoggerOptions``) or
        logger names (strings) to attach to the job.

    Examples
    --------
    ```yaml
    jobs:
      my_data_processing:
        pipeline:
          pipeline_name: data_processing
          node_namespaces: [price_predictor]
          tags: [test1]
        executor: multiprocessing
        schedule: daily_schedule
        loggers: [console, file_logger]
    ```

    See Also
    --------
    `kedro_dagster.config.models.PipelineOptions` :
        Pipeline filtering options within this job.
    `kedro_dagster.config.models.ScheduleOptions` :
        Schedule options referenced by this job.
    `kedro_dagster.config.models.LoggerOptions` :
        Logger options referenced by this job.
    `kedro_dagster.config.models.KedroDagsterConfig` :
        Top-level config that holds a dict of these job options.
    """

    model_config = ConfigDict(extra="forbid")

    pipeline: PipelineOptions
    executor: ExecutorOptions | str | None = None
    schedule: ScheduleOptions | str | None = None
    loggers: list[LoggerOptions | str] | None = None