Rasmus Bonnevie
04/21/2023, 2:10 PMowen
04/21/2023, 8:53 PMfrom dagster import job, op
@op
def my_op():
pass
@job
def my_job():
my_op()
from here, I was able to navigate to the job page (from the left nav), then click on the "Launchpad" (next to "Overview"), then launch a run from thereRasmus Bonnevie
04/24/2023, 9:12 PM@job()
def other_job():
pass
and it shows up like in the image attached.
What I just noticed is that it has 3 assets associated with it, so I guess Dagster assumes it to be an asset job - but why?
All 3 associated assets are source assets.owen
04/24/2023, 9:42 PMRasmus Bonnevie
04/25/2023, 4:08 AMother_job
to see if I could isolate or circumvent the problem. Both jobs have the same three source assets associated, so I don't see how it can be a naming thing?
I have more than 3 source assets, so AFAICT the only distinguishing factor of the three is that they have an observe function.Rasmus Bonnevie
04/25/2023, 4:38 AMdef _observe():
with open(full_path) as file:
content = file.read()
hash_sig = sha256()
hash_sig.update(bytearray(content, "utf8"))
return DataVersion(hash_sig.hexdigest())
Rasmus Bonnevie
04/25/2023, 11:23 AMRasmus Bonnevie
04/27/2023, 8:14 AMfrom dagster import (Definitions, job,
observable_source_asset, op)
@observable_source_asset
def source():
pass
@op
def do_something():
pass
@job
def a_job():
do_something()
defs = Definitions(assets=[source], jobs=[a_job])
owen
04/27/2023, 4:33 PM