Comments (1)
Is your feature request related to a problem? Please describe.
The API for defining materializer nodes could be streamlined. Currently, materializer usage is very verbose and contains redundant information.
to.json( dependencies=["statistics"], id="statistics__json", # <- `__FORMAT` or `.FORMAT` won't conflict with other nodes path=f"{materializer_path}/statistics.json", ) # essentially to.$FORMAT( dependencies=[$NODE_NAME] id=$NODE_NAME__$FORMAT path=$MATERIALIZER_PATH/$NODE_NAME.$FORMAT )Side problem: using
from_
can point to inexistent files, which makes the DAG fail early, butto
can also point to inexistent directories (or no write access) which fail at the end of the pipeline and requires a rerun.Describe the solution you'd like
Instead, we could implement smart defaults to allow an API such as:
dr = ( driver.Builder() .with_destination(...) ... ) to.json("statistics") # essentially dr = ( driver.Builder() .with_destination($MATERIALIZER_PATH) ... ) to.$FORMAT($NODE_NAME)Features
.with_destination()
sets a base path for materialization. At driver instantiation, paths can be resolved to absolute path and check if they exist or create them (should followpathlib
API docs). This also provide a simple interface to pass credentials to an S3 bucket via fsspec or a dlt Destination- smart defaults for
from_
andto
won't conflict with the full API and will be backward compatible. It's slightly more challenging for materializers withcombine=
, but we could simply sort, concat, truncate the node names. The behavior would be implemented at the level of individual Saver/Loader to allow for exampleto.plt
, which is a render engine, not a format, to work without issue
Hmm, the issue is that not every one has path
or something equivalent-- the structure isn't there to unify it. That said, I agree that we should enable it to be part of the driver. Then we can just call execute
, knowing that we've already appended saver nodes... And visualize it staticaly.
from hamilton.
Related Issues (20)
- Add version field to data saver/ loader metadata HOT 2
- Add support for Polars LazyFrame and with_columns
- OSError when using jupyter magic in databricks notebook due to missing source code HOT 1
- Add SODA integration
- Umbrella Issue: Lifecycle Adapter Ideas HOT 2
- Add data source sinks for Polars Lazyframe implementation
- Add sources for missing Polars inputs
- Slack notifier. Have one that can notify a slack channel on error.
- Error cleanly when no output requested using .materialize
- Add xarray example
- `check_output_custom` could pass the information about the feature definition to the output validators HOT 4
- Pandas spss HOT 1
- Lifecycle adapter for automatic schema evolution
- Adapter mapping types to pyarrow
- `.visualize_execution()` doesn't show config nodes
- Improve API for `.execute()` all nodes HOT 10
- pandas fwf
- TDQM hook with overrides HOT 2
- Deprecate dependency on `networkx` for `sf-hamilton[visualization]`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hamilton.