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)
- Misleading error reporting for `parameterize.validate` on `group` dependency with empty list
- GracefulErrorAdapter fails with Parallelizable HOT 6
- Schema tracker does not track column position
- Detect cycles at graph build time HOT 2
- Multiple result builders in async adapter HOT 2
- AsyncDriver doesn't prune graph based on overrides HOT 3
- Include `injectable` in library comparison HOT 1
- Parallel Execution: `KeyError: 'key df not found in cache'` HOT 3
- Parallel Execution: Collect node returns `list[list[pd.DataFrame]]` instead of `list[pd.DataFrame]` HOT 5
- [Research] Better layout algorithm options for Hamilton UI dataflows HOT 2
- Implement ability to limit how many hops away we want to see the graph HOT 1
- Replace circleci with github actions
- Improving documentation structure
- Add documentation & example on writing tests for Hamilton code
- Documentation: add guide on node reuse
- Documentation: update references to external blogs on Hamilton
- Documentation: add user guide on "configuration" + Hamilton
- Can you update the the Slack link? HOT 1
- display `DataLoader` as materializer in viz HOT 3
- Enable Hamilton UI to run in google colab
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.