# ask-community

Reid Beels

08/11/2022, 4:46 PM
I’ve got a job defined that syncs a database from one environment to another. I’m logging an AssetMaterialization to represent the target database and it is appearing in the asset catalog. I’d like to switch this job over to be an asset, based on the same graph of ops used by the job, so that users in dagit can refresh it by requesting a materialization. When I do that, I get this error:
Copy code
All leaf nodes within graph 'refresh_db' must generate outputs which are mapped to outputs of the graph, and produce assets. The following leaf node(s) are non-asset producing ops: {'swap_databases'}. This behavior is not currently supported because these ops are not required for the creation of the associated asset(s).
These ops don’t have outputs because the data isn’t flowing through Dagster: it’s the result of some
commands. Is there a way to model this as an asset without using outputs?
dagster bot responded by community 1


08/11/2022, 5:52 PM
@Reid Beels haha I almost discussed the same thing here with @owen some minutes ago