A Directed Acyclic Graph (DAG) is a graph structure with directed edges that contains no cycles, meaning you cannot traverse from one node back to itself; in data pipelines, DAGs provide a formalized workflow for transitioning, enriching, and consolidating data while ensuring item potency—where rerunning failed processes produces the same outcome—through mechanisms like retrying failed items until errors resolve themselves.
What is a DAG? A Guide to Directed Acyclic Graphs in Data Pipelines
Added:hi i'm jared hillam one of the terms that you'll hear floating around in the data and programming space is directed acyclic graph or dag so what is a dag well the description of a dag is in the name itself but i'm going to decompose the acronym starting with the g if you've seen my video titled what is a graph database you recall that the data in a graph database is stored in the form of nodes and connections well these nodes and connections are what we call a graph for example if you've ever created a mind map in a brainstorming session then you know what the basic structure of a graph is however if we define some rules around that structure then we can get it to accomplish some interesting tasks and that takes us to the word acyclic if you take the letter a out of acyclic then you're left with the word cyclic which is the base for a cyclical and cycle but if you add the ae back in then it turns cyclic into its opposite form which is something that does not repeat itself so an acyclic graph is one that has a rule about avoiding cycles and this takes us to the directed part of a dag which basically means that the flow has a defined direction that it is going in now if we put all of that together we have a graph with the rule that the flow goes in a specific direction and that it contains no cycles so a real world example might be the last package you ordered online the package destination should flow towards you during shipping and any scenarios where that direction cycles back would be considered an error now there might be many destinations where various packages will flow but the end point is you so what wouldn't be a dag well the delivery truck that delivered the package to your door yes it does go in a single direction for delivering the package but when its deliveries are done it returns back to the distribution center so basically there can be no way of getting trapped in a cycle if we're going to call the process a dag now in the realm of data a dag is a very formalized workflow for transitioning data that could be transitioning it from a location enriching it consolidating it curating it etc often there are graphical tools which drive dags for data processing however those tools don't preclude developers from writing logic within processes which may have logical dags within a query so just because the dag is not represented graphically does not mean that they aren't dags themselves the most experienced developers of data pipelines write dags that are item potent item potent code will give you the same ultimate outcome no matter how many times you run it in data pipelines item potency is particularly challenging because there are so many variables to account for for example connectivity interruptions late arriving data data quality problems very data volatility and just even business processes so the best data orchestration engineers produce dags which will load data despite all these issues occurring resulting in repeatable data loading and graceful handling of edge cases the solution therefore in an item potent dag when an error occurs is to simply run the dag again on that item now you might think that this would result in the same error but in most cases the error will resolve itself to demonstrate this let's use the online order example imagine a package being shipped gets lost we've all experienced this to one extent or another the course of action is one of two outcomes that should be programmed into the item potent dag either the item is reshipped or a refund gets issued to the buyer the reshipping of the item is an example of fixing the problem by re-running it through the dag in a vast majority of item potent dags this fix will solve the problem now if a dag fails over and over there needs to be a step to stop its repetition and a place for that data to live for review another best practice in writing dags is to ensure the items going into the dag equal the items coming out of the dag even if that item gets split within the dag this way the process can be audited for completeness what we want to avoid is a scenario where organizations are constantly relying on post-process cleanup steps especially as data pipelines grow to massive sizes i've written a white paper titled the algorithms that run the world which include dags you'll find that link in the video description if you're working on the data orchestration in your organization i recommend you reach out to intricity to talk with a specialist and we've included a link for that as well
Up Next

Git & GitHub Tutorial: Undoing Changes with Checkout, Revert, and Reset
@NetNinja
188.7K views•2017-06-12

IFS Therapy Demonstration: Complete Session with Unburdening
@IFSCA
95.9K views•2021-01-13

FastAPI vs Flask vs Django: Choosing the Right Python Web Framework
@TechWithTim
302.5K views•2024-05-26

Game of Thrones Opening Credits: A Cinematic Analysis
@gameofthrones
46.3M views•2011-04-18
Related Study Plans & Knowledge Roadmaps
Structured learning paths in General & Interdisciplinary Studies










![Microsoft Project - Tutorial for Beginners in 14 MINUTES! [ COMPLETE COURSE ]](https://i.ytimg.com/vi/ei5xUlksV7o/maxresdefault.jpg)























