Skip to content

Instantly share code, notes, and snippets.

@cnolanminich
Created December 3, 2024 20:05
Show Gist options
  • Save cnolanminich/bf3fefe0635dc3c2af070ca3b6acd946 to your computer and use it in GitHub Desktop.
Save cnolanminich/bf3fefe0635dc3c2af070ca3b6acd946 to your computer and use it in GitHub Desktop.
ops_no_data
import dagster as dg
@dg.op
def first_op(context: dg.OpExecutionContext) -> None:
context.log.info("Creating op one")
@dg.op(ins={"start": dg.In(dg.Nothing)})
def second_op(context: dg.OpExecutionContext) -> None:
context.log.info("Creating op two")
@dg.graph
def my_graph():
second_op(start=first_op())
job_with_dependency = my_graph.to_job()
defs = dg.Definitions(
jobs=[job_with_dependency]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment