apache / hamilton
Apache Hamilton helps data scientists and engineers define testable, modular, self-documenting dataflows, that encode lineage/tracing and metadata. Runs and scales everywhere python does.
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing apache/hamilton in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewApache Hamilton — portable & expressive data transformation DAGs > **Disclaimer** > > Apache Hamilton is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC. > > Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. > > While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. Apache Hamilton (incubating) is a lightweight Python library for directed acyclic graphs (DAGs) of data transformations. Your DAG is **portable**; it runs anywhere Python runs, whether it's a script, notebook, Airflow pipeline, FastAPI server, etc. Your DAG is **expressive**; Apache Hamilton has extensive features to define and modify the execution of a DAG (e.g., data validation, experiment tracking, remote execution). To create a DAG, write regular Python functions that specify their dependencies with their parameters. As shown below, it results in readable code that can always be visualized. Apache Hamilton loads that definition and automatically builds the DAG for you! Functions B() and C() refer to function A via their parameters Apache Hamilton brings modularity and structure to any Python application moving data: ETL pipelines, ML workflows, LLM applications, RAG systems, BI dashboards, and the Apache Hamilton UI allows you to automatically visualize, catalog, and monitor execution. > Apache Hamilton is great for DAGs, but if you need loops or conditional logic to create an LLM agent or a simulation, take a look at our sister library Burr 🤖 . Installation Apache Hamilton supports Python 3.8+. We include the optional dependency to display our Apache Hamilton DAG. For visualizations, Graphviz needs to be installed on your system separately. To use the Apache Hamilton UI, install the and dependencies. To try Apache Hamilton in the browser, visit www.tryhamilton.dev Why use Apache Hamilton? Data teams write code to deliver business value, but few have the resources to standardize practices and provide quality assurance. Moving from proof-of-concept to production and cross-function collaboration (e.g., data science, engineering, ops) remain challenging for teams, big or small. Apache Hamilton is designed to help throughout a project's lifecycle: • **Separation of concerns**. Apache Hamilton separates the DAG "definition" and "execution" which lets data scientists focus on solving problems and engineers manage production pipelines. • **Effective collaboration**. The Apache Hamilton UI provides a shared interface for teams to inspect results and debug failures throughout the development cycle. • **Low-friction dev to prod**. Use to modify your DAG between execution environments instead of error-prone feature flags. The notebook extension prevents the pain of migrating code from a notebook to a Python module. • **Portable transformations**. Your DAG is independent of infrastructure or orchestration, meaning you can develop and debug locally and reuse code across contexts (local, Airflow, FastAPI, etc.). • **Maintainable DAG definition**. Apache Hamilton automatically builds the DAG from a single line of code whether it has 10 or 1000 nodes. It can also assemble multiple Python modules into a pipeline, encouraging modularity. • **Expressive DAGs**. Function modifiers are a unique feature to keep your code DRY and reduce the complexity of maintaining large DAGs. Other frameworks inevitably lead to code redundancy or bloated functions. • **Built-in coding style**. The Apache Hamilton DAG is defined using Python functions, encouraging modular, easy-to-read, self-documenting, and unit testable code. • **Data and schema validation**. Decorate functions with to validate output properties, and raise warnings or exceptions. Add the adapter to automatically inspect dataframe-like objects (pandas, polars, Ibis, etc.) to track and validate their schema. • **Built for plugins**. Apache Hamilton is designed to play nice with all tools and provides the right abstractions to create custom integrations with your stack. Our lively community will help you build what you need! Apache Hamilton UI You can track the execution of your Apache Hamilton DAG in the Apache Hamilton UI. It automatically populates a data catalog with lineage / tracing and provides execution observability to inspect results and debug errors. You can run it as a local server or a self-hosted application using Docker. DAG catalog, automatic dataset profiling, and execution tracking Get started with the Apache Hamilton UI • To use the Apache Hamilton UI, install the dependencies (see section) and start the server with • On the first connection, create a and a new project (the should be ). • Track your Apache Hamilton DAG by creating a object with your and and adding it to your . Now, your DAG will appear in the UI's catalog and all executions will be tracked! Documentation & learning resources • 📚 See the official documentation to learn about the core concepts of Apache Hamilton. • 👨🏫 Consult the examples on GitHub to learn about specific features or integrations with other frameworks. • 📰 The DAGWorks blog includes guides about how to build a data platform and narrative tutorials. • 📺 Find video tutorials on the DAGWorks YouTube channel • 📣 Reach out via the Apache Hamilton Slack community for help and troubleshooting How does Apache Hamilton compare to X? Apache Hamilton is not an orchestrator (you might not need one), nor a feature store (but you can use it to build one!). Its purpose is to help you structure and manage data transformations. If you know dbt, Apache Hamilton does for Python what dbt does for SQL. Another way to frame it is to think about the different layers of a data st…