Hi I have a question about when you would use `bui...
# ask-community
e
Hi I have a question about when you would use
build_assets_job
vs
define_assets_job
?
👍 1
s
You should always use
define_asset_job
.
build_assets_job
is an earlier API that we still use internally.
Did you find the latter in documentation?
e
I was having a problem with a schedule and
unresolvedAssetDefinition
and in this post from yesterday it was mentioned
build_asset_definition
would give you resolved asset def https://dagster.slack.com/archives/C01U954MEER/p1655352716872389?thread_ts=1655238813.234129&cid=C01U954MEER
specifically the error is
AttributeError: 'UnresolvedAssetJobDefinition' object has no attribute 'run_request_for_partition'
What is best way to yield run request for static partitions in a schedule?
s
Ah - that is a gap. We will make it so that the object returned by
define_asset_job
has a
run_request_for_partition
method. In the mean time, the following should work as a workaround:
Copy code
return RunRequest(run_key=..., tags={"dagster/partition": <your partition key>, "dagster/partition_set": "<your job name>_partition_set"})
e
that worked thanks