Hi, i have some issues with sensors. I am trying t...
# announcements
Hi, i have some issues with sensors. I am trying to add a sensor to an existing working pipeline and i keep getting
Error: There are no sensors defined for repository...
while running
dagster sensor list -d path_to_working_dir/ -f /path_to_pipeline_file.py
I tried to put the sensor function and decorator in a separate file and also in the same file as the pipeline. When i try to run the same command on the sensor file i get
dagster.core.errors.DagsterUserCodeProcessError: dagster.core.errors.DagsterInvariantViolationError: No pipelines or repositories found in "address_enrichment_sensor".
What am i missing here?
sensor definition:
Copy code
def my_s3_sensor(context):
    new_s3_keys = get_s3_keys("BUCKET", prefix="/raw/", since_key=context.last_run_key)
    if not new_s3_keys:
        yield SkipReason("No new s3 files found for bucket my_s3_bucket.")
    for s3_key in new_s3_keys:
        yield RunRequest(run_key=s3_key, run_config={})
Have you tried including the sensor in the same dagster repository as address_enrichment pipeline? You need to do that
yes i added the sensor name to the
in the
Hi Avri - is it possible to post the full repo.py file?
Hey Daniel, i got it figured out! turns out the issue was with the import paths in the repo.py file. Thanks anyway!
condagster 1