Is it possible to reuse a single resource more tha...
# announcements
e
Is it possible to reuse a single resource more than once in a pipeline with an alias or something ? For instance, the DbInfo resource in the examples works great when specifying a single database to connect to because the solids that use the DbInfo resource have lines that execute like
context.db_info.engine.execute(...)
. But how would you specify multiple of a same resource if one pipeline needed to connect to a mysql and postgres server ? Something along the lines of:
Copy code
resources:
  db_info_mysql:
    config:
      username: mysqluser
      ...
  db_info_postgres:
    config:
      username: pguser
      ...
a
we have a tool for this unfortunately we do not expose it yet for use via the composition functions of
@pipeline
/
@composite_solid
https://dagster.phacility.com/source/dagster/browse/master/python_modules/dagster/dagster/core/definitions/dependency.py$23-28
we need to expose this - but in the meantime you could use it if you construct the dependencies directly