-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL adapters #46
Comments
Comment by elijahbenizzy TLDR -- an adapter that enables you to run either a transform or a load from sql. Framework can abstract away the executing/connecting piece. This would be especially nice with duckdb -- see stitchfix/hamilton#158. |
See #46 for some initial context. Basic design is: 1. A decorator that loads data and injects into a function 2. A set of Data Loaders that can be constructed from kwargs (they're all dataclasses) 3. A LoadFromDecorator that takes in a variety of data loader classes that are possible to choose from 4. A registry that specifies a mapping of key -> data loader classes, allowing us to polymorphically select them More todos, up next 1. Add tests for the default loaders 2. Add safeguards to ensure any loader is a dataclass 3. Add documentation
See #46 for some initial context. Basic design is: 1. A decorator that loads data and injects into a function 2. A set of Data Loaders that can be constructed from kwargs (they're all dataclasses) 3. A LoadFromDecorator that takes in a variety of data loader classes that are possible to choose from 4. A registry that specifies a mapping of key -> data loader classes, allowing us to polymorphically select them More todos, up next 1. Add tests for the default loaders 2. Add safeguards to ensure any loader is a dataclass 3. Add documentation
See #46 for some initial context. Basic design is: 1. A decorator that loads data and injects into a function 2. A set of Data Loaders that can be constructed from kwargs (they're all dataclasses) 3. A LoadFromDecorator that takes in a variety of data loader classes that are possible to choose from 4. A registry that specifies a mapping of key -> data loader classes, allowing us to polymorphically select them More todos, up next 1. Add tests for the default loaders 2. Add safeguards to ensure any loader is a dataclass 3. Add documentation We also add a register_adapter function in the registry. Note that this just moves the adapters we currently have around, and does not add new ones.
See #46 for some initial context. Basic design is: 1. A decorator that loads data and injects into a function 2. A set of Data Loaders that can be constructed from kwargs (they're all dataclasses) 3. A LoadFromDecorator that takes in a variety of data loader classes that are possible to choose from 4. A registry that specifies a mapping of key -> data loader classes, allowing us to polymorphically select them More todos, up next 1. Add tests for the default loaders 2. Add safeguards to ensure any loader is a dataclass 3. Add documentation We also add a register_adapter function in the registry. Note that this just moves the adapters we currently have around, and does not add new ones.
See #46 for some initial context. Basic design is: 1. A decorator that loads data and injects into a function 2. A set of Data Loaders that can be constructed from kwargs (they're all dataclasses) 3. A LoadFromDecorator that takes in a variety of data loader classes that are possible to choose from 4. A registry that specifies a mapping of key -> data loader classes, allowing us to polymorphically select them More todos, up next 1. Add tests for the default loaders 2. Add safeguards to ensure any loader is a dataclass 3. Add documentation We also add a register_adapter function in the registry. Note that this just moves the adapters we currently have around, and does not add new ones.
duckdb now supports Python UDF, with easy integration for functions that are typed and are pure (ref) |
I think we have done a form of this. |
Issue by elijahbenizzy
Thursday Sep 15, 2022 at 03:45 GMT
Originally opened as stitchfix/hamilton#197
See design here: https://docs.google.com/document/d/1-xVPX7PqyENOk31bXdcAVVPYSHaGMokeFiR85d_zoOo/edit.
The text was updated successfully, but these errors were encountered: