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

Qwame

02/13/2023, 5:55 PM
Hi friends, how do I use
execute_in_process
method on a job created using
define_asset_job
?
o

owen

02/13/2023, 6:17 PM
hi @Qwame -- the easiest way to do this is actually to pull the job off of the repository, as
define_asset_job
jobs aren't fully resolved until they're placed there. So one option would look like
Copy code
from my_package import my_repository

def test_my_job():
    result = my_repository.get_job("name_of_job").execute_in_process()
q

Qwame

02/13/2023, 6:18 PM
Thanks @owen. What if I am using definitions?
Got it, thanks!
🌈 1
s

Saul Burgos

02/17/2023, 5:21 PM
Hi , I have used this command and is working but ... dagit is not showing the progress or status on the UI... but I know is running. Could you explain me why this happen? and if there is a way make dagit aware of this process?
o

owen

02/17/2023, 5:30 PM
the DagsterInstance is where all events get stored, and these events are what allow Dagit to know what's happening in your pipelines / jobs
if you have a
dagster.yaml
file set up, then you can pass in
instance=DagsterInstance.get()
to the execute_in_process call, which should cause this execution to write to your real dagster instance (rather than the default temporary one)
s

Saul Burgos

02/17/2023, 8:01 PM
I have setup the $DAGSTER_HOME. I am getting this error. I have en empty dagster.yml I see that all folder are created according to the documention: "If
DAGSTER_HOME
is set but
dagster.yaml
isn't present or is empty, Dagster will persist data on the local filesystem, structured like the following:" But when I run the job I am getting Dagster home is not set
Should I have a specific config on dasgter.yaml?
I solve it passing the instance from the context of the operation: context.instance
201 Views