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

Kyle Gobel

10/24/2022, 4:06 AM
How might I construct a graph that does something like this: (I know this doesn't work, but I think/hope my intent is clear enough to see what I'd like to happen). Looking to configure an
op
based on the output of a different
op
Copy code
from dagster import op, graph
from dagster_k8s import k8s_job_op

@op
def get_greeting():
  return "hello"

@graph
def my_graph():
   greeting = get_greeting()

   greeter = k8s_job_op.configured(
     {
        "image": "busybox",
        "command": ["/bin/sh", "-c"],
        "args": ["echo " + greeting], #obv this doesn't work, but not sure what to do
        "load_incluster_config": False,
        "namespace": "default"
      },
      name="say_greeting"
   )
   greeter()
I think I can kind of get around this just by using the k8s client directly in an op (create my own
k8s_job_op
essentially) -- but was hoping maybe there's a better way
2 Views