Skip to content

How can I run asset_job from python script and command line just like UI? #17675

Answered by sryza
takerfume asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @takerfume - try replacing -a with -j:

dagster job execute --package-name tutorial -j images_job

When you use -a you're telling Dagster to execute the variable images_job. However, this variable refers to a job that's unresolved, because it's not inside a Definitions object with the assets it targets. By using -j, you load the entire module including the Definitions object, and then execute "images_job" within that set of definitions, after it has been bound to the assets.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@takerfume
Comment options

@sryza
Comment options

@takerfume
Comment options

@takerfume
Comment options

@takerfume
Comment options

Answer selected by sryza
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants