Alchemy Feed

class forml.provider.feed.alchemy.Feed(sources: Mapping[dsl.Source | str, str], **readerkw)[source]

Bases: Feed[Selectable, ColumnElement]

Generic SQL feed based on SQLAlchemy.

All the hosted datasets need to be declared using a proper content resolver mapping specified using the sources option with keys representing the fully qualified schema name formatted as <full.module.path>:<qualified.Class.Name> and the values should refer to the physical table names like <database>.<table>.


All the referenced schema catalogs must be installed.

sources: Mapping[dsl.Source | str, str]

The mapping of schema catalogs to the DB tables.


Optional keywords typically for the pandas.read_sql.

The provider can be enabled using the following platform configuration:

 provider = "alchemy"
 connection = "mysql+pymysql://john:smith@localhost/"
 "openschema.kaggle:Titanic" = "kaggle.titanic"
 "foobar.schemas:Foo.Baz" = "foobar.baz"


Select the sql extras to install ForML together with the SQLAlchemy support.