Is there way to get the reference to the repositor...
# ask-community
Is there way to get the reference to the repository created by dagster inside another job and job? I mean how I get a reference to "core_generic" (see image). I want to use the method "`get_job`" of the repository
Do you mean like via a
object? This isn't currently possible, but if you file an issue, we might be able to add it. Alternatively, you could just import it inside your op/asset and access it that way?
I want to get an job in the same way I am getting it using definition. (See image) . so I want to do the same but with repository. is possible?
I want to use "execute_in_process". for that reason I want to the get job
ah yes - you can use
Yes but how do I get the "my_repository_def" reference .... If I do it in the same way I get an error
are you able to import it?
thinking a little but about this... the decorator normally execute and return a new function, for that reason I got the error.... mmmm how can I do this in other way?
oo wait a sec
you'd need to put that code inside an op, not a job
-decorated functions shouldn't have any logic in them other than stringing together ops and graphs:
❤️ 1
🌈 1
yeah you are right..thanks Sandy
Hi @sandy . After your suggestion everything is ok but now when I move the operation to it's own folder i am getting an error of "circular error" and is understandable because I am importing the ops on my "" and inside the ops I need to import the "repository" What is the dagster way to tackle this? I have in mind some hacky ways but I don't want to do it. Maybe using "DasgterInstance" can get the repository?
I believe you need to move the import
from ..repository import core_generic
inside the