Hi team, below code is from "Connecting Ops in Job...
# ask-community
h
Hi team, below code is from "Connecting Ops in Jobs" tutorial page, I wonder if the second op doesn't require output from the first op, what will the @ job that part looks like? (linear job that each op doesn't require output from previous op.) @ job def myJob() op1() >> op2() something similar to this?
Copy code
import csv

import requests

from dagster import get_dagster_logger, job, op


@op
def download_cereals():
    response = requests.get("<https://docs.dagster.io/assets/cereal.csv>")
    lines = response.text.split("\n")
    return [row for row in csv.DictReader(lines)]


@op
def find_sugariest(cereals):
    sorted_by_sugar = sorted(cereals, key=lambda cereal: cereal["sugars"])
    get_dagster_logger().info(f'{sorted_by_sugar[-1]["name"]} is the sugariest cereal')


@job
def serial():
    find_sugariest(download_cereals())
🤖 1
r