Is there anyway I can save config values with asse...
# ask-community
s
Is there anyway I can save config values with assets even just redundantly to actually get to log the run_config with the asset materialization run. I.e. when I hit materialize that the resulting run contains information about the resource configs GCS bucket … without checking the code.
dagster bot responded by community 2
g
you can attach arbitrary metadata to an asset materialization i.e. JSON
s
Copy code
AssetGroup(
    assets=[generated_df, table_length],
    resource_defs={
        "mlflow": mlflow_tracking.configured({...}),
    }
)
yes but the run_config inside the run is empty when configure this way. What I am looking for is to get the actual configuration of my resources during so I can log it on run start. Inside the run I don’t know it though as it is empty, so I have to pass it on some otherway. With normal op runs there is the config field but on AssetGroups or build_job there is no such thing. The resources must be preconfigured but then once they are configured the run acts as if it has no configuration parameters.
s
not very familiar with assets, but can you access the object within the materialization code and log it there? You might not be able to get to the config json itself, but maybe you can get
context.resources.mlflow.server_name
, and other attributes?