# dagster-support


02/02/2023, 2:06 PM
Hi everyone, I am stuck on what I think is a tiny problem, but I really can't figure it out. 🤯 What is a context? I am trying to set up a simple @op that runs a dbt model. the dbt_cli_resource need an argument that is "context" and I can't understand what kind of object/value should be placed inside. This is my simple code:
Copy code
def dbt_op():
    cli_resource = dbt_cli_resource(context)["my_model"])
def dbt_job():
And then I import my job in the repository obviously.


02/02/2023, 3:39 PM
Thank you Jamie, I also read your reply in #dagster-support. 🙌🏻 The solution you sent me here still leaves me wondering what I am supposed to put in "context" 🙁


02/02/2023, 3:40 PM
oh you dont need to put anything in the context. it’s like a “magic” parameter. when you run the job in dagit, the dagster backend will create the context object and supply it for you
if you’re trying to execute an op in a unit test you can create a context yourself, is that what you’re looking for?
but outside of unit testing, you don’t need to make the context yourself

Sean Davis

02/02/2023, 8:33 PM
And just to make it a bit more concrete, the "context" object is usually an instance of the "OpExecutionContext" ( Inside an op (or an asset), you can call the methods or accessors that are shown in the API documentation. These allow your op to access things like "resources" ( and configuration ( as well as simpler things like the "run_id" ( Logging is also available (
for example).