https://dagster.io/ logo
#ask-community
Title
# ask-community
d

Daniel Mosesson

03/20/2023, 12:47 PM
Is there documentation on how to kick off a run of a partition from a sensor?
t

Tobias Pankrath

03/20/2023, 1:46 PM
The example does it
the one for custom partitions: it adds an element to the partition and schedules a run for it
d

Daniel Mosesson

03/20/2023, 2:08 PM
Ah, that is if I had a job. I just have a partitioned asset where that has job
and I want to yield a RunRequest so that I can not rerun when its going to be the same
t

Tobias Pankrath

03/20/2023, 2:14 PM
I created a job for that asset with
create_asset_job
and it works
d

Daniel Mosesson

03/20/2023, 2:15 PM
ty
Getting an error saying:
called  run_request_for_partition on non-partitioned job
I am creating the job with
define_asset_job('myjob',[myasset])
if that helps
t

Tobias Pankrath

03/20/2023, 4:31 PM
your asset is partitioned?
I am also passing the partition to the job:
Copy code
event_files_job = define_asset_job("event_files_job", AssetSelection.keys("event_files"), partitions_def=event_files_partition)
d

Daniel Mosesson

03/21/2023, 12:38 PM
That worked, thank you