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

Rafael Figueiredo

12/28/2022, 10:45 PM
Hi, can I use an Op to persist and Asset? I need to iterate a dataframe and hit an API foreach item.
Copy code
@asset
def my_dataframe() -> Output[pandas.DataFrame]:
    df = pandas.read_csv('some_path.csv')
    return df

@op
def persist_df(my_dataframe):
    for index, row in my_dataframe.iterrows():
        # request here
        pass


@job
def schedulable_job():
    persist_df()
3 Views