Hi, can I use an Op to persist and Asset? I need t...
# ask-community
r
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()