Andreas
03/13/2024, 12:02 PMScout
03/13/2024, 12:02 PMRunRequest
object, which can include a run_config
parameter. The run_config
parameter allows you to provide the configuration that will be used when the sensor triggers a pipeline run. This configuration is a dictionary that specifies the settings for resources, loggers, execution, and more, depending on the needs of your pipeline. Here's an example from the documentation on how you might define a sensor with a `run_config`: python from dagster import sensor, RunRequest @sensor(job=my_job) def my_sensor(context): if some_external_condition(): yield RunRequest( run_key="unique-key-for-this-run", run_config={ "solids": { "my_solid": { "config": { "param": "value" } } } }, )
In this example, my_sensor
checks for some external condition, and if that condition is met, it yields a RunRequest
with a unique run_key
and a run_config
. The run_config
is a dictionary that specifies the configuration for the solid my_solid
within the job my_job
. Remember that the run_config
should match the configuration schema expected by the job being triggered. If you have specific questions about configuring a sensor's run_config
or if you encounter any issues, please feel free to ask for further assistance.