Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

dataflow: operation : Support shared config #720

@aghinsa

Description

@aghinsa

Now we don't have a way for operations in dataflow to share objects.so if we have a dataflow,


configs:
  db_lookup:
    database:
      config:
        filename: test.db
      plugin: sqlite
  db_query:
    database:
      config:
        filename: test.db
      plugin: sqlite

two connections are made into the database as config is initialized two times.

A possible solution is to support something like

sdb = SqliteDatabase(SqliteDatabaseConfig(filename="test.db"))

dataflow = DataFlow(
    operations={
        "db_query": db_query_create_table.op,
        "db_lookup": db_query_lookup.op,
        "get_single": GetSingle.imp.op,
    },
    configs={"db_query": "db", "db_lookup": "db",},
    sharedconfigs={"db": DatabaseQueryConfig(database=sdb)},

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions