How can i configurate assets to use different toke...
# ask-community
w
How can i configurate assets to use different tokens (specify run_config into repository)? btw in ore repository use same assets?
example what i whant
Copy code
@repository
def my_dagster_project():
    return [
        daily_job,
        daily_schedule,
        with_resources(
            load_assets_from_package_module(assets,
# ⬇️ can i add run_config here with token 1? 
 group_name="first_acc", key_prefix="acc_1")
            + load_assets_from_package_module(assets, 
# ⬇️ and run_config with token 2? 
group_name="second_acc", key_prefix="acc_2"),
            {
                "discord": resources.discord_webhook_resource_v2.configured({"url": {"env": "DISCORD_WEBHOOK_URL"}}),
                "prod_postgres_warehouse_resource": resources.db_resource.prod_postgres_warehouse_resource.configured(
                    {"database": "db_2"}
                ),
            },
        ),
    ]
s
There's no current built-in way to mass-configure a set of assets. Have you considered using two different resources (and different resource keys) to represent the different tokens and have the assets in the different groups reference their respective resources?
w
once Owen help me to find solution for using rediefined schedule. Now I'm just looking for an easier way. https://dagster.slack.com/archives/C01U954MEER/p1643739827547249?thread_ts=1643739152.565959&cid=C01U954MEER