This message was deleted.
# ask-community
s
This message was deleted.
s
Hi Heber, currently the only way to mix assets and ops is to wrap ops inside a graph-backed asset. Whether you want to do this sort of depends on the other stuff going into your job-- if you’re just using assets, then you should just build an asset graph like this:
Copy code
from dagster import AssetOut, asset, multi_asset, define_asset_job, repository


@asset
def foo():
    return [1, 2, 3]


@multi_asset(
    outs={
        "user": AssetOut(),
        "pwd": AssetOut(),
    }
)
def credentials(foo):
	# ...
    return user, password

@asset
def bar(user):
    return "bar"

@asset
def baz(pwd):
    return "baz"



all_assets_job = define_asset_job(name="all_assets_job")


@repository
def repo():
    return [
        foo, 
        bar, 
        baz, 
        credentials, 
        all_assets_job
    ]
But also, you might want to consider setting your credentials with config instead of a
multi_asset