Orchestration, Automation, and Version Control for Data Pipelines
Prerequisite Knowledge
This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.
Previously Covered in This Subject
- Data transformation and the ETL/ELT patterns — covered in Lecture 2 (data pipelines and ETL) and Lecture 5 (data transformation and ETL vs ELT).
- Structured data and schemas — covered in Lecture 1 (data formats and structured data) and Lecture 6 (what a database schema is).
- Data quality and validation — covered in Lecture 1 (data quality and the data doctor).
- Data pipelines and pipeline architecture — covered in Lectures 4, 5, and 6 (what pipelines are and why they are hard).
- Workflows and dependencies — covered in Lecture 5 (workflows and dependencies).
- Versioning models and the model registry — covered in Lecture 7 (saving and versioning models, the model repository and registry).
# Orchestration, Automation, and Version Control for Data Pipelines
10.1 Recap: Data Transformation, Validation and Testing
Hook — the question that starts it all. Last class ended with a single open question: if you were handed a real system with millions of claims flowing through a data pipeline, what transformation and testing would you actually perform? Before we can answer, we need to rebuild the map of where transformation, validation, and testing sit in the pipeline. That map is the layer pattern — and this session's entire story (validation, testing, orchestration) hangs off it.
10.1.1 The Bronze–Silver–Gold and ELT Layer Patterns
The session opens with a quick recap of last class. Two layer patterns were covered, and both answer the same question from different angles: how do you keep the journey from raw data to trusted data organized?
Pattern 1: bronze, silver, gold (the medallion pattern). Think of it as three shelves in a workshop:
- Bronze — raw ingestion. Data lands exactly as it arrived, nothing more. No cleaning, no renaming, no fixing. The point of keeping a bronze copy is that you always have the original to go back to if a later layer corrupts something.
- Silver — filtered, cleaned, and augmented. This is where the work of making raw data trustworthy happens: duplicates removed, types corrected, missing values handled, extra context joined in.
- Gold — final aggregation. The layer built for analysis and reporting, where numbers are summed, grouped, and shaped for dashboards and models.
Why three layers instead of one? Each layer answers a different question. Bronze answers "what did the source actually send us?" Silver answers "what is the trustworthy version of this data?" Gold answers "what number does the business actually run on?" If a report is wrong, you can check gold against silver, then silver against bronze, and find exactly which step introduced the error. That single property — being able to walk backwards to the raw original — is why the pattern exists.
Pattern 2: the ELT/BDB pattern (build, and then the ELT three-layer data modeling approach: staging, intermediate, and data mart):
- Staging — data is staged first: copied into the warehouse as-is, mirroring the source.
- Intermediate — data is built into an intermediate model: cleaned, joined, and reshaped into reusable building blocks.
- Data mart — the final assembly: the intermediate models are combined into the specific tables that reports and analyses consume.
The two patterns map onto each other naturally: bronze plays the role of staging, silver plays the role of intermediate, and gold plays the role of the data mart. One pattern names the quality of each layer; the other names the purpose of each layer. Both organize the same underlying idea: raw data in, trusted data out, with every step in between visible and auditable.
10.1.2 The Transformation and Validation Lifecycle
The data transformation, validation, and testing flow runs in steps:
- Discover the data — find the sources and understand what is actually in them.
- Map the data — decide how source fields become target fields (the mapping rules).
- Perform the transformation — design the logic and execute it.
- Validate and test — prove the transformed data is correct.
- Document and monitor — write down the rules and watch the pipeline over time.
The rule that was repeated until it stuck: every rule we need to automate must be documented. A rule that lives only in someone's head is a rule that disappears when they leave. A rule that lives only in code is a rule nobody can audit. Written-down rules are the raw material of validation: if a rule is not documented, you cannot write a test for it, and if you cannot test it, you cannot trust it.
The toolset is deliberately simple and familiar: SQL is used for validation (counts, sums, joins that expose orphans and duplicates), Python is used for validation (logic that SQL expresses badly), and a version control tool such as Git is used to keep track of everything — code, mappings, and documentation.
Recap + bridge. The lifecycle is: discover → map → transform → validate → monitor, with documentation wrapping every step. That pipeline of questions — what would you transform, what would you test — now meets the concrete exercise below, and the answers to it drive everything else in this session.
10.1.3 The Claims-Processing Exercise
The exercise: a system with many millions of claims, and you must decide what kind of data transformation and testing to perform.
The transformation rules are driven by business logic — for example, payout amounts based on policy type, location, and claim history. The testing side includes:
- verifying every client calculation with a checking application (an independent program that recomputes each payout),
- computing weekly payout totals and monthly payout totals,
- building fraud deduction logic with the hard requirement of no false positives (a legitimate claim must never be flagged as fraud),
- running checks by location and by policy as well as in aggregate,
- and a single target: zero payout error.
Worked example — a 3-claim slice of the million-claim book.
Suppose the payout rule for a standard auto policy is: base payout \(P = 200\) (currency units) per claim, plus 50 for every prior claim on the same policy, minus 30 if the vehicle location is a flood-risk zone. Claim history: Mr. A (policy POL-1, location "plain", 0 prior claims) → \(P_A = 200 + 50 \times 0 - 30 \times 0 = 200\). Ms. B (POL-1, "plain", 1 prior claim) → \(P_B = 200 + 50 \times 1 - 30 \times 0 = 250\). Mr. C (POL-2, "flood zone", 0 prior claims) → \(P_C = 200 + 50 \times 0 - 30 \times 1 = 170\).
- Weekly payout total (this week: A, B, C): \(200 + 250 + 170 = \mathbf{620}\).
- Monthly payout total (assume weeks of 620, 610, 640, 630): \(620 + 610 + 640 + 630 = \mathbf{2500}\).
- Fraud deduction: C's policy was flagged as suspected fraud by the fraud logic; the deduction reduces the payout by 170, and the firm keeps the claim under review. Because the no-false-positive rule is hard, the deduction happens only when evidence is verified — here we set the flag only after a second check confirms the pattern.
- Checking application: an independent program recomputes each payout from the raw claim table. A matches at 200, B at 250, C at 170 → the transformation rule and the check agree.
Sense-check: every individual payout, and both totals, came out of the same rule applied to the same input data — a mismatch of even one unit in one claim would break the zero-error target, which is why every calculation gets a second, independent pass.
Why "zero payout error" changes everything. With millions of claims, even a 0.001% error rate means dozens of wrong payouts. A single wrong payout is a customer-relations failure, a regulatory failure, or a fraud-loss failure. So validation cannot be a spot check at the end of the month: it must be automatic, rule-based, run by location and by policy as well as in aggregate, and repeated on every run — which is exactly why this session turns to schema validation, testing levels, and, finally, orchestration.
Real-world connection. This is the everyday world of insurance fintech: claims engines, payout computation, and fraud scoring run on exactly these patterns, and regulators demand provable correctness. The same structure — business rules, independent verification, totals at multiple granularities, a strict no-false-positive fraud flag, and a zero-error target — appears in payroll systems, healthcare reimbursement, and bank transaction reconciliation, wherever money moves based on computed values.
10.2 Schema and Contract Validation
Hook. Before a single transformation runs, ask: do the tables even look like what the rule expects? Most pipeline failures do not start with a wrong formula — they start with a column that silently changed type, a table that lost its parent key, or a name that means nothing to the next engineer. Schema and contract validation is the first line of defense against all three.
10.2.1 Schema Validation
Step one of making validation work is verifying the schema — the blueprint of a table or dataset: its columns, their types, and the rules they must obey. Ask the two questions that open the work: Do we have the right schema? And do we have all the data entities and all the attributes? (An entity is a thing we store, like Customer or Claim; an attribute is one of its properties, like CustomerName or ClaimAmount.)
Schema validation covers the whole data structure:
- The naming structure — every object follows the agreed naming standard, so a name tells you what the object is.
- The integrity — relationships between tables hold: no child without a parent, no orphan rows.
- The column names — the attributes exist, are spelled consistently, and mean what they say.
- The data types — an integer column holds integers, a date column holds dates. A float appearing where an integer is expected is a type failure.
- The constraints — the rules attached to the table.
Constraints are the rules you attach when you create tables. Three appear constantly in practice:
- Check constraints — a value must satisfy a condition (for example,
ClaimAmount >= 0; a negative payout is nonsense and should be rejected at the door). - Not null constraints — a column must always hold a value (for example, every claim must have a policy number).
- Unique constraints — a value may not repeat in a column (for example, claim reference numbers must be unique so no claim is paid twice).
Referential integrity is the fourth, relational rule: a child row's foreign key must point to an existing parent row — every claim must belong to a real policy. There should be no orphan rows: records whose parent was deleted or never arrived. Without referential integrity, joins silently lose rows and totals come out wrong.
Scope — what schema validation can and cannot catch. Schema validation proves the structure is right, not that the meaning is right. A table can pass every type and constraint check and still contain a customer name that was truncated, a date in the wrong time zone, or a value that is technically a number but factually wrong. Structure is checked here; meaning is checked later by rule validation and profiling. Also note the assumption behind schema validation: the schema itself is known and agreed — which is exactly why the contract step (10.2.3) demands it be versioned and tracked.
10.2.2 Naming Conventions
Naming conventions come straight from practice: while working in the US at Cisco, every company had its own naming standards and conventions — and the important skill was following one standard consistently once it was chosen. The example given: an index is named with the IDX prefix along with the table name.
Worked example — a readable index name. Consider a table customer_TB (the TB suffix marking it as a table) with a column cus_ID (the customer identifier). An index built for lookups by customer ID and location could be named:
IDX_CUSTOMER_TB_CUS_ID_LOC
Reading the name aloud: it is an index (IDX) on the customer table (CUSTOMER_TB) over the customer-ID and location columns (CUS_ID, LOC). Any engineer seeing the name knows what the object is, which table it serves, and which columns it covers — no lookup document needed.
Sense-check: compared with a name like IDX1 or X234, the self-describing name survives the person who created it. A new teammate can find the index, understand it, and reuse it instead of duplicating it.
Following one consistent standard for tables and indexes makes the schema readable and self-describing: the schema becomes documentation in itself, which is the cheapest documentation there is.
10.2.3 Contract Validation
Step two is validation of the contract — the agreement between the producer and the consumer of a data set. In the example here, the policy (the policy data) is the producer and something consumes the policy; the contract defines what the charges are if the terms are broken and what happens if they are not broken. In other words: the contract pins down the expectations — shape, fields, types, frequency — that both sides agree to, and the penalties (rejected data, reruns, escalations) when those expectations are violated.
Why a contract instead of a handshake? Producers change. A source system may rename a column, add a field, or start sending nulls. Without a written contract, the consumer discovers the change when numbers break; with a contract, the consumer can detect the violation the moment it happens — and the schema, being part of the contract, must be versioned. Versioning the schema was called very, very important: every version of the schema has to be tracked, so that when the producer ships schema v2, the consumer can compare it against the agreed v1, see exactly what changed, and decide whether downstream rules still hold.
Real-world connection. This is the producer-consumer pattern of data engineering: source systems, vendor feeds, and partner integrations all ship schemas that evolve. Financial and healthcare integrations live or die by contract management — a partner feed that silently drops a field can corrupt a month of reporting.
10.2.4 Rule Validation and Data Profiling
Every transformation mapping and every rule needs proper validation — rule validation from source to target. When logic such as GST (goods and services tax), or bad or extra charges, is applied, the rule must be validated as data travels from one place to another. Ask three questions for every row:
- What is the original source value?
- What is the target value after the rule?
- Is anything happening in between that should not be?
There must be no data loss: a customer's name that is Devendra Kumar at the source must still be Devendra Kumar at the target. If a transformation rule accidentally truncates, drops, or reorders values, the source and target no longer tell the same story.
Worked example — one row through a GST rule. Source row: OrderAmount = 1000.00, GST rate 18%. The mapping rule: TargetAmount = SourceAmount + 0.18 × SourceAmount.
- Source value:
1000.00. - Target value: \(1000.00 + 0.18 \times 1000.00 = 1000.00 + 180.00 = \mathbf{1180.00}\).
Validating the rule means checking that every row obeys this equation — recompute the target from the source and compare, and confirm no row was dropped in the move (row-count check). A rule that produced 118.00, or that swallowed every tenth row, fails validation even though the schema is perfect.
After the transformation comes data profiling as post-confirmation. Profiling was covered earlier, so use it to understand the data — all the attributes, all the columns: distributions, null rates, value ranges, unusual patterns. The profile of the customer or the payer also needs to be perfect, because a profile that looks wrong (a column that went from 2% nulls to 60% nulls, an amount column with a sudden spike) is the earliest sign that a rule broke something.
Pitfalls in schema, contract, and rule validation.
- Validating only the schema, never the values — the structure passes, the meaning is wrong.
- Letting naming conventions drift — two engineers invent two standards, and the schema stops being self-describing.
- Consuming a producer's feed without the versioned contract — a silent schema change breaks rules with no warning.
- Skipping the source-vs-target comparison — data loss (dropped rows, truncated values) is only visible when every rule is checked from source to target.
When the schema, the contract, and the rules all pass, the pipeline can move to the next question: does the logic itself keep working as the code changes? That is the job of testing.
Recap + bridge. Schema validation checks structure (naming, types, constraints, referential integrity); contract validation pins the producer-consumer agreement and forces schema versioning; rule validation and profiling check that values survive the journey intact. Structure, agreement, and values all verified — next: prove the pipeline's logic with unit, integration, regression, and performance testing.
10.3 Testing the Pipeline: Unit, Integration, Regression, and Performance
Hook. Your transformation code is correct today. How do you know it is still correct next week, after a teammate adds "one small improvement"? The whole point of testing a pipeline is to make "nothing broke" a mechanical fact instead of a hope — and to catch the break the moment it happens.
10.3.1 Regression Testing vs System Testing
The class was asked an open question: why do you do regression testing in industry, and what is the difference between regression testing and system testing?
The first answer offered was that regression testing simulates the real load the application will face when deployed in production. That was set aside — no. The next answer: "just to ensure we are not breaking anything existing." Perfect, correct.
Q: Why do you do regression testing in industry? What is the difference between regression testing and system testing? A: We do regression testing to ensure we are not breaking anything existing. Regression stands for this: when any new feature is added — an extra attribute, an extra column, an extra table, extra logic in a data pipeline — none of the existing functionality should change. If you have version 1.5 and you introduce version 1.6, that 1.6 should not break whatever functionality already existed. No new bugs introduced by the new feature — that is regression testing. System testing checks the new functionality itself; regression testing guards what already works.
The rejected answer matters as much as the accepted one. Load simulation (testing how the system behaves under heavy traffic) is a performance concern — it belongs to performance testing, not regression testing. Mixing the two up is exactly the kind of confusion this correction is meant to kill: regression is about change safety, not scale.
The two guards, side by side. Think of the pipeline as an old building being extended.
- System testing checks the new room: does the new feature do what it was built to do? (Does the new column get populated? Does the new rule produce the right value?)
- Regression testing checks the old building: did the extension crack the existing walls? (Do all the previously working rules still produce the same outputs?)
Regression answers one question only: did adding the new feature change any behavior that already worked? If version 1.6 must behave identically to 1.5 on everything 1.5 did, then a test that runs 1.5's expected outputs against 1.6's actual outputs is a regression test.
10.3.2 Automated Regression in Practice
From the instructor's own consulting work at Cisco: even as a data architect, changes were made to procedures and triggers, tables were archived, partitions were attached and detached as part of the work — and regression testing followed every change. A team in Pune ran the automated regression suite, checking the basic functionality. If the existing functionality broke, there was a problem: you had to go back, revert the change, roll back the change.
Q: Is regression testing also needed because of interdependencies between systems? A: Yes. If a team has a UI team and an ETL team, and the ETL team modifies some columns, integration testing is needed — otherwise the web UI can break. Some modules make changes in the UI alone; those changes must not interfere with the payment module or other modules. Regression also helps perform message flow integration between corporate systems. Nothing should break the existing modules and components; integration should work perfectly.
Two lessons sit inside this exchange. First, regression testing is automated regression testing — you write your own scripts and tools to run the same checks over and over, because no human will reliably remember to re-check everything by hand after every change. Second, regression applies to data pipelines and data warehousing projects just as much as to applications — a data architect changing partitions, archived tables, procedures, and triggers is changing production behavior, and every such change needs the guard.
The rollback discipline. Regression testing is only useful if a failure leads somewhere. The sequence in practice is: change → run the automated suite → if existing functionality breaks → revert the change and roll back to the previous version → investigate why. A regression failure that is ignored or "fixed forward" without understanding defeats the entire purpose.
10.3.3 Unit, Integration, and Performance Testing
A lot of transformation mappings and rules are created; when you add a new transformation logic, it must not break the existing rules. Performance testing makes sure everything performs better, especially with respect to big data. So the test levels are: unit test, integration test, regression test — and performance testing sits alongside as the scale guard.
Unit test — one rule, one rule only. A unit test checks one single transformation, one particular mapping, in isolation. The input is crafted to exercise the rule; the output is checked against the expected result; the surrounding pipeline is not involved.
Integration test — many rules working together. An integration test runs multiple transformations together, end to end, to make sure the components fit: each unit works, and so does the chain of units joined into a pipeline.
Regression test — new code vs. historical output. Regression compares the output against the historical output: what was done before, and are there any uninduced changes? Nothing new should appear that was not intended. The three levels nest: unit tests catch broken rules, integration tests catch broken joins, regression tests catch broken past behavior.
Worked example — the salutation unit test. A customer has a last name field and a first name field; when you address the customer, the target is a salutation — Mr., Miss, Mrs., or Doctor — followed by the name. That is one new rule, so you check that one individual rule with a unit test, and check how all the different inputs generate the output.
Inputs → expected outputs:
first = "Anita", last = "Rao", title = "Mrs."→Mrs. Raofirst = "Dev", last = "Kumar", title = "Mr."→Mr. Kumarfirst = "Meera", last = "Nair", title = "Doctor"→Doctor Nairfirst = "Kiran", last = "Iyer", title = NULL→Kiran Iyer(no title: fall back to the first name alone)
Run the rule on each input and compare against the expected value: all four pass → the unit test passes. If the rule produced Mrs. Anita Rao instead of Mrs. Rao, the unit test fails and the rule is fixed before it touches real data.
Sense-check: the test covers the interesting corners of the rule — each title, and the missing-title case — so one new rule is proven in isolation before it ever joins the pipeline.
The same example, one level up, shows why integration tests exist — the rule is now part of a chain:
Worked example — the weekly orders integration test. Product orders are summed into a weekly summary report — weekly orders code — and everything is integrated to make sure the component-to-component, end-to-end pipeline works.
The chain: orders table → (clean step: drop rows with null order IDs, 3 rows dropped) → (join step: attach customer country, 40 rows joined) → (aggregate step: sum order amounts by country) → weekly report.
Say the raw orders table holds 40 orders for the week, of which 3 have null order IDs and are dropped in cleaning. The join attaches a country to each of the remaining 37. The aggregate produces one row per country: e.g., US 12,400, IN 8,150, GB 3,450.
The integration test asserts three things at once: the drop removed exactly 3 rows (37 remain), every one of the 37 rows joined to exactly one country (no orphans, no duplicates), and the totals per country sum to the total of all order amounts (24,000 = 12,400 + 8,150 + 3,450).
Sense-check: the integration test passes only if each component's output is correct and the interfaces between components agree — a unit test could never catch the join silently duplicating rows, because the join is not part of any single unit.
Pitfalls in testing levels.
- Testing only the happy path — a unit test that never tries the NULL-title case, or an integration test with only one country, misses the failure modes that actually occur.
- Skipping integration tests because "every unit passes" — units can each be right while the chain is wrong (duplicated joins, dropped records between steps).
- Confusing regression with system testing — checking the new feature (system) and forgetting to check the old features (regression); both are needed on every change.
- Leaving regression manual — a regression suite that is not automated and not run on every change is a regression suite that will quietly stop running.
Real-world connection. Insurance, banking, and e-commerce pipelines treat these levels as a minimum bar: payout calculations get unit-tested rule by rule, weekly and monthly reporting is integration-tested end to end, and the historical-output comparison (regression) runs automatically after every deploy — the direct follow-on to the claims exercise in 10.1.
Recap + bridge. Unit tests prove a single rule; integration tests prove the chain; regression tests prove nothing old broke; performance tests prove the scale holds. Every one of these tests needs the rules written down (10.1) and the schema trusted (10.2) — and the whole testing story needs one more thing before it can run continuously: documentation that survives the people who wrote it. That is next.
10.4 Documentation of Data Models
Hook. A data model is a shared instrument: many people will read it, extend it, and operate it long after the original author has moved on. If the only copy of the design lives in someone's memory, the model is undocumented — and every future change becomes archaeology. Documentation is the difference between maintaining a system and guessing at it.
10.4.1 What Good Documentation Includes
After validation and testing comes documentation. Data models need documentation, and they need version control. Proper documentation includes:
- a lot of diagrams — pictures of the entities, the relationships, and the flow;
- table definitions — every table's columns, types, keys, and constraints;
- usage scenarios — how the model is meant to be used, with realistic examples;
- and database design notes — the reasoning behind the design decisions.
Good documentation makes the system easy to use and easy to modify: it gives clarity (anyone can understand the model) and easy maintenance (anyone can change the model safely). When a new person joins, or a new team takes over a project, they always talk about the application and the database architecture — good documentation serves them at all three levels of understanding:
- Conceptual understanding — what the business objects are and how they relate (the big picture).
- Logical understanding — the entities, attributes, and rules without hardware or storage details (the design).
- Physical understanding — the actual tables, indexes, partitions, and storage choices (the implementation).
Why three levels? Different readers need different maps. A business stakeholder needs conceptual; a data modeler needs logical; a database administrator needs physical. A model whose documentation jumps straight to physical table definitions is unreadable for its first two audiences — and a model that stops at a diagram is unbuildable for the third. The three-level habit keeps every reader on the right floor of the building.
10.4.2 The Data Dictionary Habit
The instructor's habit as an architect: while supporting a fintech company and reviewing their migration strategies, the first question asked was always — where is your data model? Do you have any documentation? Where is your data dictionary?
A data dictionary is the single reference for every piece of data: every attribute, every entity, every data frame, every data set, documented with its name, meaning, type, and rules.
Scope — what the data dictionary is and is not. The dictionary is the contract with the future: it records what each piece of data means so that nobody has to reverse-engineer meaning from code. It does not replace validation (10.2) or tests (10.3) — it is the substrate they run on. And it only works if it is kept current: a dictionary that still describes a schema from two migrations ago is worse than none, because it is trusted.
Documentation is the key to understanding for future implementation: the fintech migration review starts at the model because every downstream decision — what to migrate, what to transform, what to retire — is only as good as the understanding of what currently exists.
10.4.3 Tools for Documentation and Model Management
Real-world: several tools help here.
- dbt Core — an open source tool that helps create the models and also provides version control: models are written as code, reviewed, and versioned like software.
- DataHub — a tool for building data models and managing metadata, discovering data, and data governance: a central catalog that answers "what data exists, where, and who owns it."
- Amundsen — another tool you can use for data discovery and metadata: finding the right data set, its lineage, and its quality signals.
Recap + bridge. Documentation — diagrams, table definitions, usage scenarios, design notes — makes models easy to use and modify; the data dictionary habit makes every attribute traceable; and tools like dbt Core, DataHub, and Amundsen turn documentation into living infrastructure. If someone wants to get into data engineering, these tools are a good starting platform — because the field is, in large part, the discipline of keeping data understandable.
Real-world connection. Documentation is where data engineering and knowledge management meet: model registries, data catalogs, and dictionaries are standard parts of the modern data stack, and migration projects (like the fintech review) are won or lost on the quality of the model documentation they inherit.
10.5 Version Control for Data, Models, and Pipelines
Hook. A client calls: "the chain you sent me is not reflecting in my system." Nobody remembers which version of the code, the data, or the model that client received. If you cannot say which version is on that machine and what changed since it was built, debugging becomes guesswork. Version control is the discipline that makes "which version, changed by whom, and when" a question with a precise answer.
10.5.1 Why Version Control
Versioning is very, very important, and the class was asked: why do we need version control in the corporate world?
Q: Why do we need version control for the corporate world? A: We need it wherever we want to capture the change in state from one state to another — code, documents, non-code material. We want a track of what is changing and historical references of who made those changes, so that if there is a conflict we can trace back who did what and when. Version control gives you historical references for debugging, maintenance, and conflict resolution.
The answer has three parts packed into one idea:
- State capture — version control records the change in state from one state to another: the version of your code, the version of your PowerPoint, non-code material too.
- Change tracking — it keeps a track of what is changing, from which state to what state.
- Attribution — it keeps historical references of who is making those changes, because if you need to track down some kind of conflict, version control helps you trace back.
Think of it as a flight recorder. Every significant change is logged with its author, its time, and its content. When two changes collide — my edit and your edit both touch the same file — the recorder shows both versions and who wrote them, so the conflict can be resolved instead of guessed at. Code, documents, data sets, and models all benefit from the same mechanism, which is why version control is not a developer tool but an organizational habit.
10.5.2 Debugging, Baselining, and Upstream–Downstream Safety
More reasons were added by other students and the instructor. Version control helps for debugging and maintenance: a client says "the chain you sent is not reflecting in my system", so you check the version installed on that machine versus the master code — baselining is important. A baseline is a recorded, frozen version that both sides can agree on: the client's machine runs baseline X, the master code is baseline Y, and the difference between X and Y is precisely the change history to investigate.
Version control also matters for upstream and downstream applications: if there is a version change in an upstream application, the downstream application must take care of it; if the downstream breaks and is not ready, you can roll back to the previous version. The same safety net that guards a single file guards whole systems: an upstream change that breaks a downstream consumer is undone by reverting to the last known-good version.
Scope — versioning your dependencies, not just your code. The upstream–downstream story only works if the interface is versioned too: schemas (10.2.3), APIs, and message formats must carry versions so that "upstream changed" is a detectable, named event instead of a mystery. Version control for code without version control for the data contracts between systems leaves the riskiest gap in the chain unguarded.
Over a career of 30-plus years, everyone uses some version control, one way or another — even a folder of dated files is a crude version control system. The difference between crude and proper version control is whether the history is queryable: can you find who changed what, when, and why?
10.5.3 Versioning ML Models and Data Sets
Most data scientists and data engineers also do version control for machine learning models and deep learning models, and data sets go through changes too — preserving the working version while you are testing has many advantages.
Why model and data set versioning pays off.
- Experiment comparability — versioning helps measure performance: you can compare the performance of different machine learning models against different data sets using metrics, because each experiment is tied to an exact model version and an exact data version. Without both recorded, "model A beat model B" is a claim that cannot be reproduced.
- Compliance and auditing — data protection rules such as GDPR apply because we are talking about machine learning: customer data, where we store the data, everything before and after the pipeline — all of it needs to be properly maintained. An audit trail of who touched which data version, when, and why is a regulatory requirement, not a nicety.
The instructor recalled training banking people in Malaysia about ten years ago, before AI was in use there: customer data, where the data is stored, everything before and after the pipeline — all properly maintained. The lesson predates the AI boom: regulated industries were practicing data versioning long before models needed it, because their compliance obligations demanded the same bookkeeping that ML reproducibility now demands.
10.5.4 Naming Conventions and Version Numbers
Just like table names, file names, and index names, versions need proper naming conventions: which version is the development version, which is the test version, which year does that file name belong to. Software products follow this too — Microsoft drivers show it in their properties: there is a major version and a minor version, a file version and a product version.
The example given is a version number like 3.2.4, which maps each position to a level: three is the product, two is a particular component, and four is the sub-component. Written generally:
\[v = a.b.c\]
where \(v\) is the full version identifier, \(a\) is the major level — the product — \(b\) is the minor level — a particular component — and \(c\) is the patch level, the sub-component.
How to read 3.2.4. The first part (3) identifies the product — the whole application. The second (2) identifies a particular component — one module or subsystem inside the product. The third (4) identifies the sub-component — a smaller unit within that component. A compatibility number like this tells you which product, component, and sub-component changed: if a colleague says "we moved to 3.2.5", you know immediately that the sub-component changed while the product and component stayed put — a small, contained change. If the version jumps to 4.0.0, the product itself changed — a big, breaking event.
This is the same structure as standard semantic versioning (MAJOR.MINOR.PATCH): the professor's mapping (product, component, sub-component) and the standard terms (major, minor, patch) describe the same three levels — a major level for big/breaking change, a minor level for a component-level change, and a patch level for a sub-component fix. Comparing older and newer versions shows the differences, and the version number itself tells you how big those differences are likely to be.
Worked example — versions in the wild. Suppose the release history of a driver is:
- 3.2.4 — the version the instructor described: product 3, component 2, sub-component 4.
- 3.2.5 — next release: only the sub-component changed (4 → 5). Expect a small fix; the product and component interfaces are unchanged.
- 3.3.0 — the component changed (2 → 3). Expect a component-level change: new feature set, possibly new dependencies, but the product remains version 3.
- 4.0.0 — the product changed (3 → 4). Expect a major release: possibly breaking changes, new packaging, migration steps.
Diffing 3.2.4 against 3.3.0 should show only the component-level differences — the sub-component work from 3.2.5 is also inside 3.3.0, so nothing is lost by skipping intermediate patches.
Sense-check: the same number format carries the same meaning at every position — product first, then component, then sub-component — so reading any version number in the family takes no effort.
Data sets can also be versioned by state: incomplete, complete, filtered, unfiltered, cleaned, uncleaned. Version one may be incomplete, version two complete, the next one filtered, then unfiltered — different naming standards and version controls for each. The state labels make the version history self-describing: "data set v3 (filtered)" means something precise, while "data set v3" alone could mean anything.
10.5.5 Versioning Approaches: Duplication, Metadata, Tooling
There are several approaches to versioning data and models.
- File versioning — give each file a proper name carrying the version, the year, and the state: e.g.,
claims_2024_raw_v1.csv,claims_2024_clean_v2.csv. Simple, human-readable, and works anywhere. - Tool-based versioning — use version control tools: DVC (Data Version Control), Delta Lake, or even Git for data sets if you have enough storage; it also helps for real-time editing.
- Full duplication — if you want to save the full set as it is, duplicate it: the source version as a full copy in the new location, and then start creating versions on the copy. Expensive in storage, unbeatable in simplicity.
- Metadata-based version control — like the tracking history in an SRS (system software requirement specification) document: record when the document is created; give the particular file name or table name and state that it is valid up to which date, so you control the life cycle of particular data attributes with metadata — when the attribute becomes active, and when it is retired.
- And tooling — use version control tools such as CVS, SVN, Git LFS, or LakeFS for the heavy lifting.
10.5.6 Choosing a Tool: Modality, Diffing, and Comparison
A student raised the distinction between two types of version control: code version control, where ETL code is kept in GitHub or GitLab, and data version control, where it is not source code but a database you can backtrack with time travel.
Q: Are we talking about code version control in GitHub or GitLab, or data version control where you backtrack a database with time travel — both, or only data? A: Primarily data, data sets, and machine learning. There is a part for the ML code and a part for the data — we talk about both, but predominantly about the data and the data models, touching on the ML code. Not the entire project: for whole-project versioning you need change management, change control linked with version control, and configuration management — three bigger areas.
The scope is deliberately narrow: data, data sets, and ML, touching ML code — not the entire project. Whole-project versioning drags in three larger disciplines — change management (who approves changes), change control (how changes are governed), and configuration management (how the whole environment stays consistent) — which are beyond this lecture's scope.
Another student shared that Delta Lake's time travel feature was implemented in their tables — a real production example of data versioning: the table remembers its past states, so a query can ask "what did this table look like yesterday?" exactly as code version control asks "what did this file look like yesterday?"
Choose the tool by the data's modality — and by its diffing ability. You have to apply version control based on your needs, and choose the tool based on the data modality — the TAVI framework discussed earlier: text, audio, video, images, streaming data, sensor data. Not all version controls work for everything, so decide based on:
- what your tool supports — text diffs well, video does not;
- ease of use — will the team actually use it;
- comparison ability — like the
diffcommand in Unix: give two data sets anddiff DS1 DS2shows row by row, column by column, which row changed, the exact differences.
Whatever tool you pick should provide good differences and deltas between version one and version two: a comparison report, a dashboard kind of thing. Editors even have compare plugins for two files. If a version control tool cannot show you exactly what changed between two versions, it is not doing the job.
10.5.7 The Version Control Landscape
Real-world: Neptune.ai is one such tool for version control and managing metadata. dbt is an open source version control system for machine learning models, data sets, and metrics. Git LFS (Large File Storage) is for large file storage — AWS, Google, and Hadoop use big distributed file systems, and if you already know how to commit, push, and pull with Git, Git LFS is an easy open source option to try. In the old days, SVN and TFS were used; Git is the newer protocol. ClearCase was used around 2010 — one student had implemented UCM (Unified Change Management) with multi-site version control and multi-master replication, with changes moving between locations such as Chelmsford, Salt Lake City, Phoenix, Chennai, Korea, London, and Reading.
The multi-master question. The open question for anyone choosing a tool: does it have multi-master replication, and does it allow faster replication — if one person makes changes, can another person see the data changes instantly, or is there lag? Back in 2010, for the FAA (Federal Aviation Administration), reports were compared between the previous version and this version, and a PDF was created and uploaded — the platforms were much older then; now LakeFS and Delta Lake exist. Multi-master replication is the difference between a tool that syncs and a tool that fights you across time zones.
Recap + bridge. Version control captures state changes, attributes them to authors, supports debugging and rollback, extends to models and data sets, uses version numbers like \(v = a.b.c\) and state-based labels, and is chosen by modality and diffing ability. With documentation (10.4) and version control in place, the team's knowledge survives — and so does its ability to explain itself. Next, the human side of knowing when not to comment: the story of the four rishis.
Real-world connection. From regulated banking data books to Netflix-style ML pipelines, version control is the shared bookkeeping of machine learning: model registries, data versioning tools, and compliance audits all rely on the same principle — every state is named, every change is attributed, and every version can be revisited.
10.6 The Four Rishis: Knowing When Not to Comment
Hook. In a room where nobody has the full picture, the safest sentence is the shortest one: "I don't know." This story — told to leadership teams, senior data architects, project managers, and developers — is about why that sentence is not weakness but discipline.
10.6.1 The Story
A story the instructor used to tell leadership teams, senior data architects, project managers, and developers — about four rishis living in the Himalayas. A rishi is a sage, a seeker of spiritual knowledge. Their goal, like everyone's, was clear: to reach heaven and touch the lotus feet of God, to end the cycle of rebirth. They did tapas (severe spiritual discipline) for many years in the cold.
Then one fine day came the Akashwani — the oracle, the voice from the sky: God had accepted their wish; get ready, tomorrow a devdoot (a messenger) would come. The four prepared themselves. A Pushpak Viman arrived — the flying chariot, like the one that carried Ravana when he kidnapped Sita. The messenger said: congratulations, you have done great work, get ready to fly to heaven — but there is a condition. You may not talk to each other. Each of you sits in a separate direction — east, west, north, south — and there is no guarantee that all of you will go up; it depends on your behavior, how you perform.
The Pushpak Viman rose slowly. It flew over Goa, over beaches, toward Kerala, over forests. It moved slow, and below there was a huge lake. On one side of the lake, a tiger mother had just delivered cubs and was licking water. On the other side, a mother deer had delivered a baby deer and was also thirsty, drinking at the edge. The four watched. In a fraction of a second, the tiger noticed the deer, ran fast, attacked, killed the mother deer, and dragged it to the tiger's side.
The first rishi reacted immediately: what the hell did this tiger do? It just delivered babies; the deer is also a mother. How can this happen? This is Pabam, Anyayam — sin, injustice. He was dropped from the Pushpak Viman.
The second rishi: what the tiger did is right. A tiger doesn't eat grass. Deer are meant to be killed. No problem — what is the big deal? He too was dropped.
The third rishi was gossiping — commenting about what the first and second were saying: the first lost his mind, the second lost his mind, everything is known to God, what are they talking about? The third was also dropped.
The one person who did not say a word stayed quiet — and only he went up.
10.6.2 The Twist: The Messenger's Questions
The story has a twist. The messenger asked the person on the east side: what do you think? He said the tiger did wrong — dropped. The person on the west side, thinking the first one was wrong, said: the tiger did right — dropped. The third said: it could be 50% right, 50% wrong — maybe true, maybe false — dropped.
The trap of every "reasonable" answer. The first judgment (wrong), the opposite judgment (right), and even the balanced judgment (50% right, 50% wrong) all fail — because all three are judgments about events the judges cannot see fully. A student's guess — "allow me to solve this problem — I will go down and try to save them" — would also be a drop: action without mandate is as presumptuous as opinion without facts.
Then the messenger asked the fourth person the same question. The answer is simpler. The fourth person said: I don't know. That's all. I don't know.
Sense-check: the twist matters because it removes the easy reading of the story. Staying silent is not the same as secretly agreeing with one side — the fourth rishi is not hiding an opinion. He genuinely has none, and says so.
10.6.3 The Lesson for Work and Life
Sometimes it is better to stay on that boat. In the industry, things happen that we do not know why — one good person may be working very hard and still be laid off. The instructor, who has done restructuring and laid off many people, said: it is okay to feel pity for them; it is okay not to feel pity. But talking in the middle — that is gossip. When we don't know, we avoid gossip. If such a conversation happens — "I don't know why your organization is doing this, why my manager is doing this" — either you don't know, and you leave it to the one above (Uparwala).
Q: Is the moral of the story about controlling our emotions? A: Sometimes, yes — not to react or respond: just go with the flow. No need to comment on something beyond our control. People talk — "they did it like this, a million dollar loss" — or talk about what other people have done, without having a clue. It is okay to support the first person, okay to support the second. But the third person is very dangerous. The request to everyone: if you don't know, there is no need to comment about what others have done. Simply leave it, let it go, follow the flow.
The three roles, mapped to the workplace. The first rishi judges (outrage), the second rishi judges (approval), the third rishi gossips (commenting about the first two) — and the fourth declares ignorance. In an organization: it is fine to support a colleague, fine to disagree with a decision — but commenting about what others have done, without facts, is gossip. The third role is the dangerous one, because gossip does not merely take a position; it recruits others into a judgment with no evidence.
Why this is a professional rule, not just a moral one. The story was told to leadership teams because in an organization, the walls also have ears. Schemes get created that people may not like; commenting without knowing is gossip. This is the human in the loop: feel pity or don't, but do not judge from the middle when you have no facts. In pipeline and data-team work, the same discipline applies to engineering judgment: do not diagnose a failure — a broken pipeline, a bad decision, a delayed release — from the outside, without the data. Get the facts first, or say "I don't know."
Recap + bridge. When we don't know, we avoid gossip; the only answer the messenger accepted was "I don't know." That discipline — act on facts, not on commentary — is the human counterpart to the technical discipline of the rest of this session: validate before you trust, document before you assume, and orchestrate so that systems (and people) do not depend on guesswork. With facts and trust in place, we return to the machine side: orchestrating the pipeline itself.
10.7 Orchestration and Automation of Data Pipelines
Hook. A report pipeline used to run daily — once a night, one schedule, a handful of sources. Now it must run every hour, from dozens of sources, feeding dashboards and models. The old way of doing things — someone watching, someone waiting, someone waking up at 2 a.m. to press "run" — does not scale. This section is about why the pipeline needs a conductor, and what that conductor buys.
10.7.1 From Workflow to Orchestration
We are building machine learning process pipelines and data pipelines, and we define a workflow. First question: what is the difference between a workflow and a design? Workflow is used in many ways — in an automation industry (the instructor worked at Applied Materials), a workflow is like a recipe: follow the steps, and finally you get an outcome; any specific order follows a workflow. In a machine learning pipeline, data goes through some process and finally we get the final data. Asked whether it is good to automate the workflow or orchestrate it — certainly, yes. One student's phrasing captured it: workflow is how it needs to happen.
The symphony orchestra — the professor's analogy for orchestration. The reason the word orchestration is used: some things are in our control, some are not. Think of a symphony orchestra — Yanni, A.R. Rahman. So many instruments: the piano, the violin — and one person standing in front doing the complete orchestration, controlling the facts, coordinating everything. Orchestration creates uniformity, creates consistency, balances the output, increases or decreases the flow, maintains the flow. That is exactly what a data pipeline needs.
Where the analogy holds: every instrument plays its own part (each task does its job) but the conductor decides when each enters, how loud, and how it meshes (the orchestrator decides ordering, dependencies, and retries). Where it breaks: a conductor coordinates humans who can improvise; an orchestrator coordinates machines that must follow rules exactly — which is why pipeline orchestration needs explicit, testable rules rather than a wave of the baton.
10.7.2 Why Manual Pipelines Fail
The scenario: you are a data engineer with lots and lots of reports. Extract from multiple sources, transform, load into a warehouse, generate reports with a reporting tool — Power BI, Tableau, or Python. There are new channels, mobile applications, the third wave of BI — new types of experience, more customers, new insights at new frequencies. Not like earlier: daily or weekly replication. Now the frequency is hourly, every two hours. All of this pushes us toward automation and orchestration: many data sources, many transformations, lots of ETL, and finally reporting and visualization — while accommodating new upstream channels, more customers, more report types.
Q: What are the problems with a manual pipeline? A: Time consuming, error recovery, compliance gaps, and dependencies. It consumes lots of time; when something happens, recovering from the error and figuring out how to fix it is a problem. There is a compliance gap because every individual checks manually. And there are dependencies: one person knows Oracle, another knows AWS containers and Docker — when that person is not around or busy with other projects, there are problems. Dependencies also exist between jobs: one job has to wait for another job to complete.
On that last point: the instructor recalled 24x7 production support in the US, building data marts and data models and reports for mutual funds. When an error came, fix it, make sure the reference data was loaded, then wait a couple of hours for the next flow — set an alarm, wake up in two hours, wait for other systems to push data or complete. Lots of waiting, and humans get tired. The solution is data pipeline orchestration.
The four manual-pipeline failure modes, and what each costs. (1) Time — every run is babysat; (2) error recovery — when a step fails, a human must notice, diagnose, and repair, at 2 a.m. if necessary; (3) compliance — "every individual checks manually" means checks are skipped, forgotten, or done differently by different people; (4) dependencies — both human (one person holds the knowledge of Oracle or Docker) and job-level (one job waits for another with no automatic handoff). Orchestration removes all four by replacing the babysitter with a scheduler and the memory with recorded logic.
10.7.3 Data Pipeline Orchestration Defined
Definition. Data pipeline orchestration automates the movement and transformation of data between various systems, ensuring data is accurate, up to date, and ready for analysis. Three promises in one sentence: accuracy (validation runs as part of the flow), freshness (schedules and triggers keep data current at the required frequency), and readiness (the output lands where analysis expects it, when it is expected). Every feature discussed in the rest of this session — schedulers, executors, retries, alerts, DAGs — exists to keep those three promises.
10.7.4 Data Orchestration vs Data Pipeline Orchestration
Q: Is data orchestration different from data pipeline orchestration? A: Yes. Data orchestration only looks at a particular data task alone — data pre-processing, specific work with the data. Data pipeline orchestration is the holistic thing, from start to end. One definition read aloud in class: data pipeline orchestration is a more targeted approach — it zeros in on the specific tasks required to build, operate, and manage data pipelines. It is inherently context aware; it processes an intrinsic understanding of the events and processes within the pipeline, enabling more precise and efficient management of data flows. So it goes beyond just managing data.
The scale of the two. Data orchestration is single-task management: one data task alone — a pre-processing step, one specific piece of work on the data. Data pipeline orchestration is the whole journey: it orchestrates every task from source to consumption, and it is context aware — it understands the events and processes inside the pipeline (what just finished, what is waiting, what failed), and uses that understanding to manage the whole flow precisely. The difference is the difference between directing one actor and directing the entire play.
10.7.5 What Orchestration Buys You
We need data orchestration for efficiency, reliability, scalability, and flexibility — and we should be able to monitor and visualize.
Real-world: an e-commerce company or a telecommunication company gets real-time analytics from pipeline orchestration: continuously ingest data, move data, process data, and get insights — more importantly, detect anomalies. It enables data integration across applications — multiple applications, multiple systems. Machine learning and deep learning models can automate pipelines: orchestration enables the integration of ML and AI pipelines — data pre-processing, feature engineering, model training, and model serving — automating the end-to-end AI workflow. It also supports data governance and compliance — HIPAA for healthcare, GDPR for payments — many regulations can be met by using proper orchestration.
The data doctor — a comparison from the very first class. Data science too: a data scientist is like a data doctor. A doctor knows physics, chemistry, biology about the human body; a data scientist should know the physics about the data, the chemistry about the data — what combinations work better — and the movements of the data: the complete picture of the data, from where it comes, why it is slow, its movements. When a doctor touches your pulse and knows whether you have low BP or high BP, the data scientist should do the same: by looking at data variations, data distribution, data profiling, data speed, data size, and combinations of data, quickly make decisions — and apply multiple models and multiple mathematical techniques. Orchestration streamlines the data science workflow, enabling rapid experimentation and accelerating the development of predictive models — future models too.
Recap + bridge. A workflow is how the work needs to happen; a conductor (orchestration) makes it happen uniformly, consistently, and reliably across many tasks and many systems — while the data doctor reads the pulse of the data itself. Manual pipelines fail on time, recovery, compliance, and dependencies; orchestration fixes all four. The next question is what orchestration is not — and the answer draws the line against choreography.
10.8 Orchestration vs Choreography
Hook. Two orchestras, no conductor — would the musicians play the same piece? Probably, if they rehearsed the sequence perfectly. But the moment a violinist is late, or a piano is out of tune, there is nobody to adapt. That is the whole difference this section draws: a fixed sequence (choreography) versus a coordinator (orchestration).
10.8.1 The Two Concepts
Q: What is the difference between orchestration and choreography? A: One student's first thought was that orchestration is for musical concerts and choreography for dance. Choreography is for dance — and dance drama; it is a sequence. Choreography primarily looks at one particular thing: a sequence — step one, step two, step three, repeat. Service A gives data to service C, service B invokes data from service A and gives a reply — but there is no orchestrator. If something goes wrong, bingo — it all falls out. There is no in-between person; you understand the mistake only after the fact, when you look back at what happened — you realize you made a mistake. There is no synchronization — unless everything works very well, it is not good. An orchestrator is kind of a broker: in the broker architecture pattern, the broker does all the things and knows the problems between A and B. We have multiple clients, multiple data sources, multiple systems — the broker streamlines everything, depending on the quality parameters, and has control of all the services and operations: when to do what. Study the broker architecture pattern — it is a very beautiful architectural pattern, very good for this course.
The student's first thought (music vs dance) was the trigger, not the answer: it is a useful distinction of vocabulary, but the real difference runs deeper. Both describe a sequence of steps — but the two differ on who is in charge:
Choreography — the fixed sequence. Choreography looks at one particular thing: a sequence — step one, step two, step three, repeat. Service A gives data to service C; service B invokes data from service A and gives a reply — but there is no orchestrator in the middle. The participants follow their pre-arranged steps and talk directly to each other. If something goes wrong, there is no in-between person to notice or adapt: you understand the mistake only after the fact, when you look back at what happened. There is no synchronization — unless everything works very well, it is not good.
Orchestration — the broker in the middle. An orchestrator is kind of a broker. In the broker architecture pattern, the broker does all the things and knows the problems between A and B. We have multiple clients, multiple data sources, multiple systems — the broker streamlines everything, depending on the quality parameters, and has control of all the services and operations: when to do what. One central brain sees the whole flow and coordinates it.
Scope — when each fits. Choreography shines when the sequence is fixed, trusted, and rarely changes: it is simple, there is no single point of failure, and every service knows its part. It fails when something goes wrong — no one knows the whole picture, mistakes surface only in retrospect, and there is no one to re-synchronize. Orchestration is the right tool when flows are complex, dynamic, or failure-prone — the orchestrator absorbs the complexity and the single point of failure must be engineered around (high availability, monitoring, retries). The professor's advice: study the broker architecture pattern — it is the pattern the whole orchestration story is built on.
10.8.2 Loose Coupling and Testability
A student asked whether the broker architecture is similar to master-slave, where a master is responsible for all the interactions between the slaves. Not exactly, but close: there may be multiple slaves and multiple brokers — but an orchestrator is just one. If there are multiple orchestrators, then yes, it is like multiple coordinator agents; with one master and multiple slaves, the master can be the coordinator agent, the orchestrator. For a very complex pipeline there may be two orchestrators: one main brain — like A.R. Rahman the main conductor — with one orchestrator taking care of the lights and control, another taking care of the instruments. Generally speaking, the broker architecture pattern is exactly what we are talking about: everything is streamlined through the orchestrator.
Tight cohesion inside, loose coupling between. Service dependency matters: without orchestration it is complicated point-to-point communication — every service tracks every other service's address, format, and timing. On the orchestration side, services are more loosely coupled, domain boundaries are defined well, and test cases can be confined within the domains. In software engineering there is the concept of tight coupling, tight cohesion, and loose coupling: a component must be self-contained, highly cohesive; between component one and component two we want loose coupling — reduce the dependency as much as possible. With clear domain boundaries, you have proper test cases for each domain, and only the dependent test cases are tested — the same testing structure as 10.3, now organized by domain.
Visual intuition. Picture two pictures side by side. Left: point-to-point — five boxes (A, B, C, D, E) with arrows between nearly every pair; the drawing is a tangle, and a change to any box ripples through every arrow. Right: orchestrated — the same five boxes on the edges, one broker box in the center, and each service has exactly one arrow: to the broker. The center is the only busy node; the edges stay clean. One-sentence takeaway: orchestration trades a tangle of direct links for one central coordinator — which is why couplings stay loose and tests stay local.
10.8.3 The Scope of Orchestration
What orchestration is scoped to do. The orchestration scope is coordinating different systems and services; it handles interdependent processes that require coordination across multiple systems, is highly adaptable and dynamic, and integrates multiple application services. Four properties to remember: it coordinates (not just executes), it handles interdependence (not just independent tasks), it adapts (the flow can change), and it integrates (many applications come together under one coordinator).
10.8.4 Exam Expectations
Exam note: in the final comprehensive examination you may expect a question about orchestration — what types of orchestrations exist, why you orchestrate, and what your best practices are in implementing orchestration. Be ready to explain the why and the best practices, not just the definition. In this lecture the types include data orchestration, data pipeline orchestration, and workflow orchestration (10.7, 10.10); the why is the four manual-pipeline failures (10.7.2); and the best practices are the ones this section covers — define domains, keep couplings loose, coordinate through a broker-like center, and test within domains.
With the exam target in view, the vocabulary itself needs one more contrast — the difference between a pipeline and a workflow — which is where the session goes next.
Recap + bridge. Choreography is a fixed sequence with no orchestrator; orchestration is a broker in the middle that coordinates everything, keeps couplings loose, and confines tests to domains. The orchestration story now needs its core vocabulary — what a pipeline is versus what a workflow is — which is exactly the comparison next.
10.9 Data Pipeline vs Data Workflow
Hook. Everyone agrees the data must flow. But is the job "build a pipe" or "run the whole water supply"? The answer decides what you build, what you test, and what you orchestrate — so this section draws the line between the pipeline and the workflow, point by point.
10.9.1 The Comparison
Q: Can you compare data pipeline and data workflow point by point? A: Point one: a data pipeline is a series of automated steps that move data from one system to another. A data workflow is a broader concept that includes the entire process of working with data. Think of it as water pipes: one pipe, very simple — water flows from one place to another; that is the data pipeline. When the water flows from the tank, from the corporation, from the bore well, from the motor — all connected — that is the whole process of dealing with the data: the workflow.
The professor's water analogy, extended. One pipe carries water from a tank to a tap: that is the pipeline — a single, simple, mechanical flow. But the city's water supply involves the tank, the corporation, the bore well, the motor, pressure valves, and the decisions about who gets water when: that is the workflow — the whole process of dealing with the data, including the parts that are not pipes at all.
The four points, side by side.
| Dimension | Data pipeline | Data workflow |
|---|---|---|
| What it is | A series of automated steps that move data from one system to another | A broader concept: the entire process of working with data |
| What it does | Extracts data from various sources, transforms it into a usable format, loads it into a destination system | Includes not just data movement, but the tasks, decisions, and actions performed on that data |
| Where it is used | Typically ETL (extract, transform, load) processes and data integration tasks | Often used in business intelligence and data analytics scenarios |
| What it contains | The data source, the extraction process, the transformation logic, the loading mechanism, and the destination system | Sequential tasks, parallel tasks, multiple tasks: line-of-business decisions, decision points — if that pipeline goes down, what can I do? |
When to pick which: if the question is "how does this data set get from source to destination," build (and test, and orchestrate) a pipeline; if the question is "how do we decide, act on, and govern the whole data flow — priorities, approvals, and human interventions included," design a workflow.
Worked example — the CSV-to-data-frame flow. "Take a CSV file, convert it into a data frame in Python — load the program, load the CSV, transform it, load it into another system. Done." That is a pipeline: each step is mechanical and automatic.
The workflow around it asks the questions the pipeline never sees: what decisions are you making (which CSV, which columns, what counts as bad data), what actions are you performing on that data (clean, drop, impute, approve), and what are the implications (who signs off before the transformed data reaches a report)?
Sense-check: the pipeline code is identical in both stories; the workflow is the layer of decisions, approvals, and priorities wrapped around it — which is why the pipeline is a subset of the workflow: one pipeline, one problem, but the whole data flow is bigger.
The human in the loop. There is also a human in the loop: human interventions and approvals — lots of data coming in, anomalies — should we take it, reject it, approve it? A workflow is not just data movement: what decisions are you making, what actions are you performing on that data, what are the implications? The workflow carries the judgment calls; the pipeline carries the mechanics.
10.9.2 The Pipe and Filter Connection
You can relate the workflow to the pipe and filter pattern — the instructor shared links to study both the broker architecture pattern (10.8) and the pipe and filter pattern, calling them very important and very helpful for building data workflows.
Pipe and filter in one breath. In pipe and filter, each filter carries out a specific standalone task — transforming, validating, or processing data — before forwarding it: it takes the data in, does some work on it, passes it on. A data pipeline is nothing but a pipeline: a little bit of work, that's it. But the entire workflow includes lots of filters: lots of parallel filters, parallel processing, and conditions — and that helps you improve the system.
The pattern gives the workflow its structure: filters are the tasks (each with one job, loosely coupled to its neighbors), and pipes are the connections between them — the same loose coupling idea as 10.8, applied at the data-flow level. Parallel filters explain why workflows can process many streams at once, and conditions explain the decision points where a workflow branches — if that pipeline goes down, what can I do?
Pitfalls in the pipeline/workflow distinction.
- Calling everything a pipeline — the word hides the decisions, approvals, and priorities that a workflow must make explicit.
- Designing a workflow with no decision points — a workflow that cannot branch ("what if this source fails?") is just a pipeline wearing a bigger name.
- Forgetting the human in the loop — anomaly handling, approvals, and rejections are workflow content; a system that auto-accepts everything is a compliance gap in the making.
- Skipping the pipe-and-filter structure — without filters as standalone tasks, validation and transformation get tangled into one un-testable blob, and the testing levels of 10.3 have nothing clean to bite on.
Recap + bridge. A pipeline is one automated flow from source to destination; a workflow is the whole process — decisions, actions, priorities, and humans included — and it can be built on the pipe and filter pattern. With the vocabulary settled, the orchestration story gets its hardest constraint: time. When must each task run, and what happens when data arrives late?
10.10 Workflow Orchestration and Time Dependencies
Hook. Every pipeline lives in time: this step runs after that one, and this data is only valid for a window. When the data itself arrives late — or does not arrive at all — the orchestrator needs a plan. That plan is the subject of this section: coordination, compliance, and the discipline of time-series thinking.
10.10.1 Coordination, Compliance, and Governance
Workflow orchestration means coordinating tasks across different teams or different systems; compliance and governance are major concerns. Orchestration coordinates and manages the execution of tasks within the pipeline — not just their scheduling, but their ordering, their handoffs, and the records that prove each step ran when it should. That record-keeping is what compliance demands: an auditor asks "did the check run before the data reached the report?" and the orchestration history answers it.
10.10.2 Time Series Dependencies
This is where time series forecasting comes into the picture — very important when you are talking about pipeline workflow. Models like ARIMA, SARMA, and LSTM (long short-term memory) are relevant.
The traffic light example — time dependency made concrete. Every five minutes, traffic signal data is collected with a particular date and time. What happens if the traffic data does not come through? How do you make a decision? When there is a heavy traffic jam, a patrol vehicle comes — it does not just appear; there are people watching the traffic data, signal data pushed through IoT into a central monitor. What happens if the traffic light goes down, or a sensor fails, or a battery problem stops the data? In that scenario you need to be able to harmonize the data and control the data — which time slice are you getting? It is all about time series forecasting and time series models.
The pattern in one paragraph: data arrives in time slices (5-minute buckets, each stamped with date and time); a missing slice is not "no data" but a hole with a time — and the pipeline must detect the hole, decide whether to wait, interpolate, re-request, or alert, and keep the downstream forecast honest about the gap.
What the time-series models are for. When a slice is missing, forecasting fills the picture: ARIMA (Autoregressive Integrated Moving Average) models a value as a weighted function of its own past values and past errors; SARMA (Seasonal ARMA) adds the repeating seasonal pattern — traffic at 8 a.m. looks like yesterday's 8 a.m., not like 3 a.m.; LSTM (long short-term memory) is a neural network variant that learns to remember and forget patterns over long sequences. All three answer the same operational question: given the slices we have, what should the missing slice plausibly look like? They are the mathematical bridge across the gap — never a substitute for the alert that a sensor is down.
Scope — what time dependency means for the pipeline. In machine learning and deep learning pipelines and workflows, you must consider the date and time: maybe the data comes late; there are lots of time dependencies. Correct timing of pipeline processes matters — one step should come after another. Questions the design must answer: how do you organize the data? Can you create or mask some data? If there is a delay in particular data, how do you control it? Run tasks sequentially by default; sometimes run them in parallel — the orchestrator decides which, based on the dependencies it knows (the DAG structure coming in 10.11).
Pitfalls to watch: (1) assuming data is always on time — a pipeline that cannot tolerate a late or missing slice will fail at 2 a.m.; (2) treating a missing slice as ordinary "no new data" — it is an event that needs harmonization or an alert; (3) mixing time zones or clocks across systems, which quietly shifts every slice boundary; (4) running everything sequentially when independent tasks could run in parallel — wasted hours of wall-clock time.
Recap + bridge. Workflow orchestration coordinates tasks and serves compliance; time dependencies mean every slice has a stamp, every delay has a consequence, and forecasting models (ARIMA, SARMA, LSTM) fill the gaps — while the orchestrator decides what runs after what, sequentially or in parallel. That "after what" relationship is precisely the graph structure of a pipeline: the directed acyclic graph, next.
Real-world connection. Traffic control centers, IoT platforms, and stock-market data feeds all run this exact pattern: 5-minute (or faster) data buckets, missing-slice detection, and forecast-based gap handling. Telemetry pipelines in manufacturing and energy monitoring are built the same way — which is why the professor ties pipeline orchestration to time series thinking so firmly.
10.11 Directed Acyclic Graphs and Workflow Core Concepts
Hook. Why does every orchestration tool draw pipelines as boxes with arrows — and why is a loop in those arrows forbidden? Because the boxes-and-arrows picture is a graph, and a pipeline whose graph loops can run forever. This section names the graph, explains its rules, and shows why the whole workflow vocabulary — tasks, operators, executors, SLAs — hangs on those rules.
10.11.1 What is a DAG
Q: What is a DAG? A: A directed acyclic graph. When you talk about a workflow, you are talking about a graph — data flowing from one place to another, some kind of graphical representation.
10.11.2 Core Workflow Concepts
The core concepts of a workflow. What are the tasks, what are the operators, what are the relationships between one and another, who is the executor, who is going to schedule, who is going to log the data, what is the SLA from one to another, and can we have a retry? Picture task one, task two, task three: from task one we can complete task two or task three; task three may go back and check something with task two. Directed means there is a clear direction (versus undirected). You can create machine learning tasks — filtering, classification — classify the data, filter the data, apply normalization. A pipeline-building exercise is coming: you will get one pipeline exercise and you will build one pipeline.
Each concept answers a question: tasks = what work is done; operators = how a task knows what to execute (10.12); relationships = what may run after what; executor = who actually runs it (10.13); scheduler = when it runs (10.13); logging = what is recorded; SLA = how long it may take; retry = what happens when it fails (10.13).
10.11.3 Acyclic vs Cyclic
Compare two graphs: the second one has a retry; the second is cyclic, the first is not. Acyclic — there should be no circular dependency: a task cannot depend on itself, nor can it depend on a task that ultimately depends on it. Pipeline graphs must also be acyclic — the graph must not link to a previously completed task, because that would mean the pipeline could run endlessly and never finish the workflow.
Why acyclic is a hard rule, not a preference. Pipeline steps (tasks) are always directed: they start with a task or multiple tasks and end with a specific task or tasks — that guarantees a path of execution and ensures tasks do not run before all their dependent tasks are completed. And they must be acyclic: a task cannot point back to a previously completed task — it cannot cycle back. If it could, the pipeline could run endlessly: task A waits for B, B waits for C, C waits for A — a deadlock where no task ever starts, or an infinite loop where the flow never finishes. A cyclic dependency is a scheduling contradiction: each task waits for a result that will never come. That is why every orchestration platform validates the graph and refuses cycles at definition time.
Visual intuition. Picture two diagrams. Left: acyclic — four boxes: Task A on top, Task B and Task C below it, Task D at the bottom; arrows run A → B, A → C, B → D, C → D. After A completes, B and C run; when both complete, D runs. Every arrow points downward; the flow always progresses. Right: cyclic — the same boxes but with an extra arrow looping from D back up to A, so a "run" of the pipeline never reaches a finish line. Both are drawn with the same boxes and arrows; the single upward loop is what separates a pipeline from a treadmill. One-sentence takeaway: in a pipeline graph, arrows flow one way — toward completion, never in a circle.
10.11.4 PERT, CPM, and State Transitions
If you studied PERT and CPM models (mechanical engineering, project management), revise them for understanding: earliest start, latest start, earliest finish, latest finish, float, slack — these are graph concepts applied to scheduling.
PERT/CPM as workflow thinking. PERT (Program Evaluation and Review Technique) and CPM (Critical Path Method) are project-scheduling methods built on the same directed-graph ideas as pipelines: each activity is a node, each precedence is an arrow. The scheduling vocabulary transfers directly:
- Earliest start / earliest finish — how soon each task can begin and end given its dependencies.
- Latest start / latest finish — how late each task may begin and end without delaying the whole flow.
- Float (or slack) — the amount a task can slip without delaying the project: \( \text{float} = \text{latest start} - \text{earliest start} \). Zero-float tasks form the critical path — the chain that determines the total duration.
Why this matters for pipelines: the orchestrator computes the same numbers to decide when tasks can run, which tasks are on the critical path (no slack — any delay breaks the SLA), and which can be delayed or retried without hurting the end-to-end schedule.
Scheduling numbers only make sense when the state of each job is known — which brings in the second graph concept the lecture paired with PERT/CPM.
State transitions — a started job is not a completed job. To understand a workflow you should also understand the state transition diagram: a job that has started does not mean it is completed. The states of a job: started, running, completed — or blocked: blocked for other processes. Conditions wait for a job to be completed; some jobs come before parallel ones. When customer data starts coming into the downstream system — data received, whether transformed or not — you can start multiple parallel tasks; one task may check for the acknowledgement. Parallel tasks are a normal part of pipelines.
The state diagram explains the retry story before we reach it: a failed run is a state, not an end — the orchestrator can return it to running (retry) or leave it blocked while its dependencies are fixed.
10.11.5 Graphs, Nodes, and Edges
A graph is a structure consisting of nodes and edges — nodes are the things (tasks), edges are the connections between them (dependencies). Real-world: nowadays people use Neo4j on the backend — the instructor taught Neo4j and trained students on it; it is a graph database, very beautiful. Many graph databases exist — people are moving toward MongoDB on one side, and they also use graph databases to store different relationships.
Why store a workflow in a graph database? You can use Neo4j or a graph database to build the entire relationship structure, then create your program on the outside of it. When building a workflow, instead of referring to a database (Oracle, Sybase, Informix, Postgres, Firebird, MongoDB, and so on) to understand what is a node and what the dependencies are, you can store the entire workflow in a graph database because the relationships live there — while the implementation and execution happen through the pipeline, in Python or Java. Defining workflows as graphs helps you visualize the entire workflow. The ER model is gone, the hierarchical model is gone, the network model is gone — from there we get into graphs: the graph model is the natural home for dependency structures that the relational model expresses awkwardly.
Exam note: revise PERT and CPM concepts — earliest start, latest start, earliest finish, latest finish, float, and slack — these are graph scheduling concepts that help you understand workflows. Also note: a pipeline exercise is coming — you will get one pipeline exercise and you will build one pipeline. The DAG concepts in this section (tasks, directed edges, acyclic guarantee, states) are the raw material for that exercise.
From the shape of the graph, the session now moves to what lives inside it.
Recap + bridge. A workflow is a directed acyclic graph: tasks as nodes, dependencies as edges, no cycles, states that move from started to running to completed or blocked — with PERT/CPM scheduling vocabulary (earliest/latest, float, slack) and graph databases (Neo4j) for storing the structure. The DAG is the shape; next come the things that live inside it: tasks, operators, sensors, and dependencies.
10.12 Tasks, Operators, Sensors, and Dependencies
Hook. A DAG is a picture — but what is inside each box, and what makes the boxes run in the right order? This section opens the boxes: tasks as the unit of work, operators as the predefined tools inside them, sensors as the waiters, and dependencies as the arrows that give the graph its direction.
10.12.1 The Sales Data Workflow
A simple example: a start operator, sales data, an operator — then determine the load type. Once the load type is determined, you can define, skip, or continue the sales data load. There is a program for the sales data load and a sales data transformation: we start, we extract the sales data, we transform the sales data, we load the sales data; once the load is done, we go into sales data reporting — prepare the report, publish the report, bingo, done. One simple workflow task.
Worked example — the sales DAG traced step by step. The workflow as a graph:
Start → ExtractSales → DetermineLoadType → LoadSales → TransformSales → PrepareReport → PublishReport
with a branch at DetermineLoadType: if the load type says "skip", the flow jumps straight to PublishReport (nothing new arrived); if "continue", it proceeds into LoadSales.
Trace with a concrete state: on Monday, 120 new rows arrive.
- Start — the DAG run begins; the orchestrator marks the run as started.
- ExtractSales — pulls the 120 new rows from the sales source. Output: 120 rows staged.
- DetermineLoadType — inspects the extract (e.g., file present, row count > 0) → decides continue.
- LoadSales — loads the 120 rows into the sales table. Loader reports 120 inserted, 0 rejected.
- TransformSales — aggregates the sales table into the daily summary (e.g., 120 rows → 12 region totals).
- PrepareReport — builds the report from the transformed data.
- PublishReport — publishes it. DAG completes.
Sense-check: every step consumed the previous step's output and produced the next step's input; had DetermineLoadType found an empty extract, the skip branch would have jumped to PublishReport with "no change" — the graph shows both paths at a glance.
10.12.2 Tasks and Operators
A task is the basic unit of execution. Tasks are arranged into a DAG — the directed acyclic graph — with upstream and downstream dependencies set between them to express the order they should run in. If task A must finish before task B starts, A is upstream of B and B is downstream of A — the arrow between them says "A before B".
There are kinds of tasks: operator tasks — predefined tasks that can be strung together to build most parts of a DAG. You can define the name and the particular thing: for example, ping, then redirect into an email address. Operators are the reusable building blocks — a Python operator runs a Python callable, a bash operator runs a shell command, a database operator runs SQL, an email operator sends mail — and a DAG is mostly "predefined operators + your parameters + the arrows between them."
10.12.3 Sensors
Sensors are a special subclass of operators which are all waiting for something to happen — not the IoT sensor, but a trigger, like an Oracle trigger: waiting for some event. It can be time based, or waiting for a file — a kind of dependency: file success.
The sensor as a waiter. While a normal operator does work, a sensor does nothing visible except wait for a condition: a file to appear in a landing directory (file-success dependency), a clock to reach a time (time-based), an external task or DAG to complete, an API to respond. When the condition is met, the sensor succeeds and the downstream tasks proceed; until then, the flow holds. That is how a pipeline expresses "I cannot start until something else — possibly in another system — has happened."
10.12.4 Dependencies: Upstream and Downstream
Dependencies build the relationship between one job and another job. For example, extra data is the dependency for the internal API load incremental — those are the dependencies; it is like an edge to a node. The key part is how tasks relate to each other — upstream and downstream tasks — that is what dependencies are.
Dependencies are the arrows of the graph. In graph terms: a task is a node, a dependency is an edge. "Extra data must be ready before the internal API incremental load starts" is an edge from the extra-data task to the API-load task. Every edge is a promise the orchestrator honors: the downstream task does not start until all its upstream tasks have succeeded. That single mechanism — edges as promises — is how a DAG expresses the pipeline's order without anyone hard-coding a script of steps.
10.12.5 Declare Tasks First, Dependencies Second
Exam note: there may be a question in the examination where you are creating your own workflow — a pipeline workflow given some example. The procedure that was emphasized: declare the task first and then declare the dependencies second. First, declare all the tasks. Get that order right and the DAG builds itself.
The reason for the rule: a dependency can only reference tasks that already exist. If you write arrows before the nodes, the graph is undefined; if you declare every node first, then add every edge, the DAG assembles cleanly and the orchestrator can validate it (no cycles, no missing nodes) before anything runs. This is also the practical recipe for the coming pipeline exercise (10.11): list the tasks, then wire the dependencies.
Pitfalls in building task graphs.
- Declaring dependencies before tasks — the graph refers to tasks that do not exist yet; the DAG fails to build.
- Missing the skip path — a DetermineLoadType-style branch with no "skip" behavior makes an empty input halt the pipeline instead of gracefully reporting "nothing new".
- Overspecifying order — adding arrows where no dependency exists forces sequential execution of tasks that could run in parallel, wasting wall-clock time.
- Forgetting sensors for external waits — a task that polls a file with hand-written retry loops is a re-invention of a sensor, done worse.
Recap + bridge. Tasks are the units of work in a DAG; operators are predefined task kinds; sensors wait for events; dependencies are the upstream-downstream edges; and the build order is tasks first, dependencies second. With the graph built, the next question is who runs it and what happens when it fails — executors, schedulers, logging, and retries.
10.13 Executors, Schedulers, Logging, and Retries
Hook. A DAG says what runs in what order. But who physically runs the tasks, when does the whole thing wake up, and what happens when a task fails at 3 a.m. and nobody is watching? The answer has four parts: executors, schedulers, logging, and retries — the machinery that turns a graph into a running, self-healing pipeline.
10.13.1 Executors and Schedulers
When a task is created, the executor is the mechanism by which task instances run — think of objects as instantiated classes. The DAG definition is the class: a blueprint. The task instance is the object: a concrete execution of that blueprint on a particular day, with particular data. At runtime there is an executor and a scheduler.
The scheduler decides; the executor does. The scheduler monitors all the tasks and the whole DAG: it spins up the sub-process, checks whether it is completed, what is waiting, and so on — it looks at every DAG, every task, and every dependency, and decides what is ready to run right now. The executor is the mechanism that actually runs the task instances the scheduler has decided are ready: on one machine, on a pool of local workers, across a cluster via a message broker, or inside Kubernetes pods. The separation matters because it lets a pipeline's decisions (scheduler) and its muscle (executor) scale independently: the same DAG can move from a single machine to a cluster by changing only the executor.
10.13.2 Logging and SLA
Logging: we have to log every task. Look for the SLA — the service level agreement: at what time it has to complete — and retry: we want to have a retry if some job does not run.
The three guarantees of a well-run pipeline. Logging records every task's start, end, success, failure, and output — the audit trail that debugging, compliance, and monitoring all draw from. The SLA is the time contract: "the nightly load completes by 5 a.m." The scheduler checks SLA compliance and flags violations. Retry is the automatic response to failure: if a job does not run — a transient network error, a temporary lock, a flaky connection — the orchestrator tries again, a set number of times, before it escalates. Together they convert "something might have gone wrong" into "we know exactly what ran, how long it took, and what we did about it."
10.13.3 Retries and Loaders
This connects to database loaders. In Oracle, Informix, and many other databases there is the SQL loader, a high performance loader. Loaders report errors, records inserted, records deleted, records skipped. Sometimes you do not have a good data set; you load and duplicates get eliminated, so you rerun the load. One student was rerunning millions of records that very evening. Filters produce accepted records and rejected records; you may send the rejected records to somebody to look at why — it may be an anomaly, it may be an outlier — then you fix and rerun, or talk to the upstream people to fix it, and rerun.
The retry loop is only safe when the loader tells the truth. The SQL loader's report — records inserted, deleted, skipped, errors — is what makes reruns safe: the pipeline knows exactly what a previous attempt did, so a retry does not blindly double-insert. Skipped and rejected records are events to route (send to a human, quarantine, log for review) — not noise to ignore. And when the fix is upstream (bad data at the source), retrying before talking to the upstream people merely re-fails the same way: retry is for transient problems, human review is for data problems.
10.13.4 The 32 KB Story
A concrete example from the same evening: a job was created to ingest data; anything that goes beyond 32 KB was treated as some kind of heavy data and was not ingested.
Worked example — the 33-record rerun. The job ran against 3 million records. 33 records were not ingested — anything over the 32 KB limit was skipped — and all that data had 167–168 MB of content inside.
- Rejection rate: \(\frac{33}{3{,}000{,}000} = 0.0011\%\) — a tiny fraction of records.
- Average size of a skipped record: \(\frac{167\text{ MB}}{33} \approx 5.1\text{ MB}\) per record — versus the ~1 KB of a typical record, these were genuinely heavy.
- The rerun: the job had to be rerun in the evening for only those 33 records — re-ingesting 167 MB of the 32 KB-exceeded payloads without re-processing the whole 3 million.
Sense-check: the numbers hang together — 33 × ~5 MB ≈ 167 MB, matching the reported range — and the orchestration point is the important one: the fix (a targeted rerun of 33 records) happened without manual intervention, which is exactly what orchestration tools automate.
Recap + bridge. The scheduler decides what runs, the executor runs it, logging records it, SLAs bound it, and retries rescue it — while loaders report what each attempt inserted, deleted, or skipped, so reruns are precise (33 records, not 3 million). This is the machinery inside the orchestration tools surveyed next.
Real-world connection. Every production data platform runs this exact loop: scheduled loads, SLA alarms, loader reports, rejected-record queues, and automated retries. The 32 KB story is a small, perfect specimen of why orchestration exists — a 0.0011% edge case that, without automation, means a human re-running millions of records by hand.
10.14 Orchestration Tools
Hook. The concepts are settled — DAGs, tasks, schedulers, retries. Now the question every team actually faces: which tool? The honest answer, from this section, is "it depends" — and the skill is evaluating tools against your needs rather than worshipping the most famous one.
10.14.1 What an Orchestration Tool Does
What is the purpose of an orchestration tool? It helps you transform data from one to another and achieves the outcome by stringing together the network of tasks, so you do not need to worry about it. Like a website building tool — Figma came up as an analogy — a graphical tool that gives you the luxury to create and load. A student read out the five bullet points: the purpose of a data orchestration tool is scheduling the task, starting the task, saving the states, monitoring the workflows, and generating alerts.
The five duties of an orchestration tool.
- Scheduling the task — deciding when each task runs (daily, hourly, on the 5-minute clock).
- Starting the task — launching it when its time and dependencies are satisfied.
- Saving the states — recording every task's state (started, running, completed, failed) so runs are auditable and resumable — the state-transition ideas of 10.11 made concrete.
- Monitoring the workflows — watching the whole DAG, not just individual tasks.
- Generating alerts — telling a human when something needs attention.
If a tool does these five things, it is an orchestration tool — regardless of its name or vendor.
10.14.2 Operator-Native and Container-Native Tools
The data orchestration tool should be operator native: it should have predefined templates — a filtering template, a sourcing template. Power BI is a great example of connectors: data can come from AWS, from a URL source, from JDBC, from ODBC, from CSV, from sensors and real-time streams — thousands of connectors, even MongoDB — JSON files, Excel, XML, APIs. Whatever tool you choose, it needs proper templates to connect to different sources. Tools should also be container native: depending on what you carry — a web service or a JSON file — it can be orchestrated through Kubernetes or any other tool. Microsoft people use AKS (Azure Kubernetes Service) to manage Kubernetes: the infrastructure is managed by Microsoft, and you build whatever image you want inside the package and provide the main image.
Two native-nesses, two questions. Operator native answers: can the tool talk to my sources out of the box (templates for filtering, sourcing, and connecting to JDBC/ODBC/CSV/APIs/streams)? Container native answers: can the tool run my workloads as containers (a web service or a JSON-processing job packaged as an image) on a container platform like Kubernetes — with a managed option like AKS taking care of the infrastructure? Both matter in practice: connectors decide how fast you start, containers decide how far you scale.
10.14.3 The Tool Landscape
Real-world: there are data specific workflow tools and general purpose workflow tools: Kubeflow, Argo, Tekton, AWS Step Functions. Apache Airflow supports dynamic pipeline generation, builds scalable architecture using DAGs, schedules tasks, and automates the ETL process — Netflix is using Airflow. There is Prefect, a Python-based workflow tool; Dagster; Argo — another tool; Kubeflow, where you can build ML workflows. On AWS, the managed service for Airflow is called MWAA (Managed Workflows for Apache Airflow), available through the AWS Academy Data Engineering account.
A word on scale, from the reference reading. In Airflow's own ecosystem, the scheduler hands ready tasks to an executor: the default SequentialExecutor runs one task at a time (fine for testing, not production), while LocalExecutor, CeleryExecutor, DaskExecutor, and KubernetesExecutor scale the work across machines. The lecture's conceptual split (scheduler decides, executor runs — 10.13) is exactly how Airflow is built, and the same split appears in every serious tool. When a pipeline outgrows a single machine, the executor is what you change — not the DAG.
10.14.4 Evaluate, Don't Idolize
Q: Is Airflow enough for building an ML pipeline workflow? A: You can use it — it depends on whether it fulfills your needs: it connects to all the data sources, and you can build your own logic with minimal coding, adding your own code. Every tool is different. RoboDK, for example, simulates complete robot operations — it has templates for JSON files, XML files, APIs, web services, curl calls — but it only supports about 200 robot configurations, so you have to try. Every tool is built for some specific purpose; none of them address everything. We should not be tool-centric people. It is up to you to evaluate and assess, try all the scenarios, and see whether it fits your purpose. It is all trial and run.
The tool-centric trap. "Is Airflow enough?" is the wrong question in one sense — the right question is "does this tool, for my data, my scale, my team, do the job?" The lecture's verdict: every tool is built for some specific purpose; none of them address everything. Evaluate and assess — try all the scenarios, test against your own sources and workloads, and pick what fits your purpose. It is all trial and run. The tool-centric person picks a famous tool and bends the problem to it; the pipeline-centric person reads the problem first, then matches the tool.
Worked example — a three-question evaluation. Suppose you must pick an orchestrator for an ML pipeline that reads from a database, transforms in Python, and trains a model weekly.
- Q1 Connectivity: does the tool have connectors/templates for my database and Python environment? (Airflow: yes — database operators and Python operators; Kubeflow: yes for ML workloads; Tekton: container-oriented, weaker for direct database reads.)
- Q2 Execution model: can my workloads run as containers on my platform? (Kubernetes-based tools: yes; Airflow: yes via KubernetesExecutor.)
- Q3 ML support: does it handle model training and versioning, or only data movement? (Kubeflow: designed for ML; Airflow: general purpose — ML logic goes in your own Python.)
Score the tool against your answers and run a small trial before committing. Sense-check: the same three questions score every candidate consistently — which is the point of evaluating instead of idolizing.
RapidMiner is another good one — the paid tool can be difficult to buy, but a downloadable version is available; it was bought by Siemens. RapidMiner has operators for everything: data import, data access, cleansing, modeling, scoring, validation — validation operators, utility operators, modeling operators — you can add your own operator, apply a model, filter. For people who are not yet working on machine learning projects (some are on Microsoft, some AWS, some Databricks), RapidMiner and Orange are recommended as easy-to-use tools to build rules, transformations, ETL, and pipelines from start to end.
Recap + bridge. Orchestration tools schedule, start, save states, monitor, and alert; good ones are operator native and container native; the landscape spans Airflow (Netflix), Prefect, Dagster, Argo, Kubeflow, Tekton, AWS Step Functions, and MWAA; and the right choice is evaluation, not idolatry — with RapidMiner and Orange as friendly starting points. The next step is putting all of it together: designing an end-to-end pipeline workflow from source to deployment.
10.15 Designing an End-to-End Pipeline Workflow
Hook. You have the vocabulary — DAGs, tasks, sensors, executors — and a tool. Now the design question: how do you go from "we have an IoT device and a model idea" to a running pipeline? The answer is a fixed sequence of decisions, from the source all the way to deployment, with alerts and humans placed exactly where they are needed.
10.15.1 The Design Steps
When you want to design a workflow: decide the data source — an IoT device, for example; how you are going to collect and save it — data ingestion; and what kind of validation to build — data type correct, duplicates, are all the columns present. Then you build the transformation of data, model training, and model deployment.
The design as a pipeline of decisions.
- Data source — where the data comes from (an IoT device, a database, an API). The source determines the format, the frequency, and the failure modes.
- Data ingestion — how you collect and save it: the mechanism (batch file, stream, API pull) and the storage target (bronze layer, staging area).
- Validation — what you check at the door: data type correct, duplicates handled, all columns present. This is the schema/rule validation of 10.2, placed at ingestion so bad data never travels far.
- Transformation — the cleaning, joining, and reshaping between raw and usable (silver layer).
- Model training — using the transformed data to train the model.
- Model deployment — shipping the trained model so it can serve predictions.
Each decision feeds the next: you cannot design validation before knowing the source, and you cannot train before the transformation is defined.
10.15.2 Triggers, Alerts, and the Human in the Loop
You can build a lot of triggers: as soon as data is collected, you start — the trigger event is "a new data file is detected". If validation fails, you create an alert; the alert is sent to the person who is building it; they validate the data; and execution stops — human in the loop.
The trigger–alert–human chain. A trigger is the event that starts a task: not "run at 6 a.m." but "a new data file is detected" — the file-sensor idea of 10.12. An alert is the event that stops the flow and calls a person: validation failed, so the alert fires, the alert goes to the person who owns the pipeline, they validate the data by hand, and execution stops until they decide. This is the human in the loop of 10.6 and 10.9 made operational: machines run the routine, humans own the judgment calls, and the orchestration tool routes between the two.
10.15.3 Logging and Continuous Monitoring
Ingestion runs first, then validation, transformation, model training, and deployment. Along the way you find out what components are missing, what data attributes are missing, what the dependencies are. Log it: the logging file enables continuous monitoring.
Design rules that keep the pipeline honest.
- Log at every stage, not just at the end — "what components are missing, what data attributes are missing, what the dependencies are" is only discoverable from logs written along the way; the 32 KB story (10.13) worked because the loader recorded exactly what was skipped.
- Validation stops the flow, it does not slow it — a failed validation with no alert is a silent failure; the alert must reach the owner, and execution must stop, by design.
- Do not assume the design is complete — hands-on practical work was ideal, but the portions are very heavy, so the pipeline building will be shown and exercised only as far as the schedule allows; the design steps here are the blueprint to practice on your own.
Recap + bridge. Design flows from source → ingestion → validation → transformation → training → deployment; triggers start tasks on events, alerts stop them for humans, and logging powers continuous monitoring. This is the complete end-to-end picture — which is exactly what the live tool demo next builds visually.
Real-world connection. IoT telemetry pipelines (the lecture's own example), clickstream ingestion, and ML feature pipelines all follow this exact skeleton: event trigger on arrival, validation at the door, human alert on failure, and full logging for monitoring — the same structure the orchestration tools of 10.14 are built to express.
10.16 Orange Miner: Building a Pipeline Visually
Hook. Every concept in this session — ingestion, validation, transformation, modeling, versioning — can be built with code. But it can also be built with wires and boxes: a live demo of Orange (Orange Miner), a data mining tool, showed how easy it is to build a machine learning pipeline visually — the design steps of 10.15, drawn instead of typed.
10.16.1 The Cutlets Dataset
A sample data file was loaded — cutlets, a time series data set with 35 instances, 2 features, no missing values, and no target variable. From the file you can build a data table.
Reading the cutlets summary. 35 instances = 35 rows (observations); 2 features = 2 columns of data (the inputs); no missing values = every cell is populated, so imputation is not needed yet; no target variable = no column is marked as the thing to predict — it is a raw data set, ready for exploration and transformation, not for supervised training yet. A time series data set means the rows carry a time order — the sort of data 10.10 taught us to respect.
Worked example — file to data table. The demo flow in five widgets: File → Data Table → Column Statistics → Merge → Unique Values → Graph.
- File loads
cutlets.csv: 35 rows × 2 columns. - Data Table displays it: the 35 instances as rows, the 2 features as columns — nothing dropped, nothing altered.
- Column Statistics shows each column's summary: count (35), mean, min, max, and missing-value count (0 for both features) — the profiling step of 10.2, one click away.
- Merge combines the cutlets data with another file (say a second time series with 35 more rows for a second sensor) — the join step, wired visually.
- Unique Values selects only unique values — no duplication — collapsing the merged set.
- Graph visualizes the distribution of the unique values.
Sense-check: the six widgets reproduce the pipeline skeleton — ingestion (File), storage view (Data Table), validation/profiling (Column Statistics), transformation (Merge, Unique Values), visualization (Graph) — everything covered, from ingestion to visualization, without writing a line of code.
10.16.2 Validation and Transformation
For validation, you can click column statistics and see the statistics of every column. For transformation, you can select only one column, or select a particular row — you decide what column you want, choose the good data, then merge data from another file. From the merged data, perform operations: select unique values only — no duplication — and from the unique values build a graph; visualize the distribution. Everything is covered, from ingestion to visualization.
10.16.3 Pre-processing and Python
Pre-processing is available too: data imputation — find the missing values and apply imputation rules. There is also a Python script widget: the Python script can perform an operation and give an output, and that output can be a data table.
The escape hatch. Orange is visual — but it does not trap you. The imputation widget applies missing-value rules (mean, median, or custom fill) without code, and the Python script widget accepts real Python: write a function, run it on the data, and its output becomes a data table that the rest of the visual flow can consume. Visual tools with escape hatches are how low-code pipelines stay unbounded: the common 80% stays visual, the special 20% drops into code.
10.16.4 Models and Versioning
You can build models: once the data table is created, apply a logistic regression or an AdaBoost — the data table goes into AdaBoost, and AdaBoost gives a result. Save the model — like the pickle file in Python: save model, load model. That saved model is a version: the entire thing is saved, the version is there, and you can use it later for loading that model.
Why "save the model" is versioning. The saved model is a version: the entire model object — parameters, trained weights, and the preprocessing it expects — is serialized to a file (pickle in Python, the Orange save widget here). That is exactly the model versioning of 10.5 in practice: load the old model, load the new model, compare their performance on the same data — every experiment is reproducible because every model is a saved, loadable artifact. The pitfall to avoid: saving only the score ("accuracy 0.83") and not the artifact — a number without the model cannot be reproduced, a saved model can.
Recap + bridge. Orange turns the pipeline into wires: file → table → statistics → merge → unique values → graph, with imputation, Python, and model building (logistic regression, AdaBoost) as widgets, and saved models as versions. This is a simple way of building workflows and pipelines — and a simple way to learn machine learning and deep learning. Orange and RapidMiner have wonderful videos (for example, an Orange Miner video for data cleansing and visualization) and sample data sets to try.
Real-world connection. No-code/low-code tools like Orange and RapidMiner are the on-ramp to data engineering and ML: analysts prototype pipelines visually, business teams explore data without code, and the same pipeline shapes carry over to production tools like Airflow and Kubeflow when the scale demands it.
Exam Guidance Summary
Everything below appeared in the session as explicit exam intel. The full explanations live in the sections referenced.
- Orchestration (10.8): the final comprehensive examination may ask about orchestration — what types of orchestrations exist, why you orchestrate, and your best practices in implementing orchestration. Be ready to explain the why and the best practices, not just the definition.
- Build-your-own workflow (10.12): expect a question where you create your own workflow — a pipeline workflow given some example.
- DAG build order (10.12): when building a DAG, remember the procedure: declare the task first and then declare the dependencies second; first declare all the tasks — get that order right and the DAG builds itself.
- PERT and CPM (10.11): revise these concepts: earliest start, latest start, earliest finish, latest finish, float, and slack — these are graph scheduling concepts that help you understand workflows.
- Pipeline exercise (10.11): a pipeline-building exercise is coming: you will get one pipeline exercise and you will build one pipeline.
- Comparisons to be ready for (10.3, 10.7, 10.9): be ready to contrast regression testing with system testing; unit vs integration vs regression vs performance testing; data pipeline vs data workflow; and data orchestration vs data pipeline orchestration — all of these were discussed in depth in this session.
Key Industry Applications
The session grounded every concept in a named real-world setting. The full stories live in the sections referenced.
- Claims processing (10.1): payout amounts by policy type, location, and claim history; weekly and monthly payout totals; fraud deduction logic with a no-false-positive requirement and a zero payout error target.
- Cisco (10.3): automated regression suites run after every change to procedures, triggers, partitions, and archived tables — roll back when basic functionality breaks.
- Fintech (10.4): migration reviews start with the data model, documentation, and data dictionary.
- Model documentation tools (10.4): dbt Core, DataHub, and Amundsen for data model documentation, metadata management, and data governance.
- Data and model versioning (10.5): Delta Lake time travel in production; Git LFS for large files; Neptune.ai for ML metadata; DVC for data set and model versioning.
- Multi-site version control (10.5): ClearCase UCM with multi-master replication; FAA compliance reporting between versioned reports.
- Real-time analytics (10.7): e-commerce and telecom: real-time analytics, continuous ingestion, and anomaly detection through pipeline orchestration.
- Compliance via orchestration (10.7): healthcare (HIPAA) and payments (GDPR) compliance supported by proper orchestration.
- Traffic IoT (10.10): signal data pushed every five minutes to a central monitor; time series models (ARIMA, SARMA, LSTM) for handling missing time slices.
- Graph databases (10.11): graph databases such as Neo4j store workflow relationships.
- Loaders and reruns (10.13): Oracle SQL loader and high performance loaders for rerunning failed loads — 33 records of 3 million skipped for exceeding 32 KB were re-ingested automatically.
- Orchestration tools (10.14): Apache Airflow (used by Netflix), Prefect, Dagster, Argo, Kubeflow, Tekton, AWS Step Functions, and AWS MWAA as orchestration tools.
- No-code pipelines (10.16): Orange and RapidMiner as no-code/low-code tools for building ML pipelines visually.
DMML Lecture 10 notes · Orchestration, Automation, and Version Control for Data Pipelines
Sections Breakdown
The bronze-silver-gold and ELT layer patterns, the discover-map-transform-validate-monitor lifecycle, and the claims-processing exercise with a zero payout error target.
Schema validation (naming, integrity, column names, data types, constraints, referential integrity), naming conventions, versioned producer-consumer contracts, and rule validation with data profiling.
Regression versus system testing, automated regression in practice, and the unit, integration, and performance test levels with worked salutation and weekly-orders examples.
What good documentation includes, the three levels of understanding, the data dictionary habit, and tools such as dbt Core, DataHub, and Amundsen.
Why version control matters, baselining and rollback, versioning ML models and data sets, version number conventions like 3.2.4, and choosing tools by modality and diffing ability.
The story of the four rishis and the lesson that when we do not know the facts, we do not comment - gossip versus discipline in the workplace.
From workflow to orchestration, why manual pipelines fail, the definition of data pipeline orchestration, and what orchestration buys you in efficiency, reliability, and compliance.
The fixed sequence (choreography) versus the broker in the middle (orchestration), loose coupling and testability, the scope of orchestration, and exam expectations.
The point-by-point comparison of data pipeline and data workflow, the water-pipe analogy, the human in the loop, and the pipe and filter pattern.
Coordination, compliance, and governance in workflow orchestration, time series dependencies, and ARIMA, SARMA, and LSTM models for handling missing time slices.
What a DAG is, core workflow concepts, acyclic versus cyclic graphs, PERT and CPM scheduling, state transitions, and graphs, nodes, and edges.
The sales data workflow, tasks and operators, sensors as waiters, upstream and downstream dependencies, and declaring tasks before dependencies.
Scheduler and executor separation, logging and SLAs, retries with honest loader reports, and the 32 KB rerun story.
The five duties of an orchestration tool, operator-native and container-native tools, the tool landscape (Airflow, Prefect, Dagster, Kubeflow), and evaluating rather than idolizing.
The design steps from data source to deployment, triggers, alerts, the human in the loop, and logging for continuous monitoring.
Building a pipeline visually with the cutlets data set: file, data table, column statistics, merge, unique values, imputation, Python script, and saved models as versions.
The session's explicit exam intel: orchestration questions, building your own workflow, DAG build order, PERT and CPM concepts, and comparison pairs to be ready for.
Real-world settings for every concept: claims processing, Cisco regression suites, fintech migration reviews, Delta Lake and Git LFS, HIPAA and GDPR, Airflow at Netflix, and Orange and RapidMiner.
Exam Revision Notes
Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.
Recap: Data Transformation, Validation and Testing
Must-know: Two layer patterns organize raw-to-trusted data: bronze/silver/gold (quality) and staging/intermediate/data mart (purpose); every rule to automate must be documented; the claims exercise demands zero payout error across millions of claims.
\[P = 200 + 50 \times (\text{prior claims}) - 30 \times (\text{flood-risk zone})\]
⚠️ Top pitfall: Leaving a rule undocumented or untested; spot-checking validation at month-end instead of automating it on every run.
Self-check: What does each of the three layers (bronze, silver, gold) answer?
Connects to: Schema and Contract Validation, Testing the Pipeline: Unit, Integration, Regression, and Performance, Orchestration and Automation of Data Pipelines.
Schema and Contract Validation
Must-know: Schema validation checks naming, integrity, column names, data types, and constraints (check, not null, unique) plus referential integrity with no orphans; contracts are versioned agreements between producer and consumer; every rule is validated source-to-target with no data loss, and profiling confirms the result.
\[\text{TargetAmount} = \text{SourceAmount} + \text{GST} \times \text{SourceAmount}\]
⚠️ Top pitfall: Validating only structure and never values; skipping the source-vs-target comparison so silent data loss goes unnoticed.
Self-check: What four kinds of things does schema validation cover, and what does referential integrity protect against?
Connects to: Recap: Data Transformation, Validation and Testing, Testing the Pipeline: Unit, Integration, Regression, and Performance.
Testing the Pipeline: Unit, Integration, Regression, and Performance
Must-know: Regression testing ensures new features (column, table, logic) break nothing existing and requires rollback when old functionality breaks; it differs from system testing (new functionality) and performance testing (load). Test levels: unit (one rule), integration (chain end-to-end), regression (historical output comparison).
⚠️ Top pitfall: Confusing regression with load simulation, or skipping integration tests because all units pass.
Self-check: What is the difference between regression testing and system testing?
Connects to: Recap: Data Transformation, Validation and Testing, Schema and Contract Validation, Documentation of Data Models.
Documentation of Data Models
Must-know: Documentation covers diagrams, table definitions, usage scenarios, and design notes; it serves conceptual, logical, and physical understanding; the data dictionary documents every attribute, entity, and data set; dbt Core, DataHub, and Amundsen are real tools for model management and metadata.
⚠️ Top pitfall: Letting the data dictionary go stale after migrations, so it describes schemas that no longer exist.
Self-check: What three levels of understanding should documentation serve, and what is the first question in a migration review?
Connects to: Schema and Contract Validation, Version Control for Data, Models, and Pipelines.
Version Control for Data, Models, and Pipelines
Must-know: Version control captures change in state with authorship for traceability; baselining compares installed vs master versions; ML models and data sets are versioned for experiment comparability and compliance (GDPR); version numbers follow a.b.c = product, component, sub-component (major, minor, patch); choose tools by modality and diffing ability.
\[v = a.b.c\]
⚠️ Top pitfall: Versioning code but not the data contracts between systems, leaving the upstream-downstream gap unguarded.
Self-check: In version number 3.2.4, what does each position identify?
Connects to: Schema and Contract Validation, Documentation of Data Models, The Four Rishis: Knowing When Not to Comment.
The Four Rishis: Knowing When Not to Comment
Must-know: When we do not know the facts, we do not comment; judging from the middle (gossip) is dangerous, and the accepted answer is 'I don't know'.
⚠️ Top pitfall: Commenting on what others have done without facts, or diagnosing a failure from the outside without the data.
Self-check: Why was the third rishi dropped, and what was the fourth rishi's answer?
Connects to: Orchestration and Automation of Data Pipelines.
Orchestration and Automation of Data Pipelines
Must-know: Workflow = how it needs to happen; orchestration coordinates many tasks like a conductor; manual pipelines fail on time, error recovery, compliance, dependencies; data pipeline orchestration is holistic and context aware while data orchestration handles a single data task; orchestration gives efficiency, reliability, scalability, flexibility, monitoring, and compliance support.
⚠️ Top pitfall: Assuming data orchestration (one task) covers pipeline orchestration (the whole end-to-end flow); relying on manual checks that get skipped.
Self-check: What are the four problems with a manual pipeline?
Connects to: The Four Rishis: Knowing When Not to Comment, Orchestration vs Choreography, Data Pipeline vs Data Workflow.
Orchestration vs Choreography
Must-know: Choreography = fixed sequence, no orchestrator, mistakes found only in retrospect; orchestration = broker in the middle with control of all services; loose coupling and tight cohesion with clear domain boundaries make testing local. Exam: types of orchestrations, why orchestrate, best practices.
⚠️ Top pitfall: Believing choreography is just 'dance' without seeing that it has no coordinator and no synchronization; point-to-point coupling that makes every change ripple.
Self-check: What happens when something goes wrong in a choreographed flow, and who notices it in an orchestrated flow?
Connects to: Orchestration and Automation of Data Pipelines, Data Pipeline vs Data Workflow, Workflow Orchestration and Time Dependencies.
Data Pipeline vs Data Workflow
Must-know: Pipeline = automated steps moving data (ETL/integration, one problem); workflow = entire process of working with data (decisions, actions, parallel tasks, human in the loop, BI/analytics); pipeline is a subset of the workflow; pipe and filter pattern structures workflows with standalone filters and conditions.
⚠️ Top pitfall: Calling everything a pipeline and hiding the decisions, approvals, and human interventions that make it a workflow.
Self-check: What does a workflow contain that a pipeline never does?
Connects to: Orchestration and Automation of Data Pipelines, Orchestration vs Choreography, Workflow Orchestration and Time Dependencies.
Workflow Orchestration and Time Dependencies
Must-know: Orchestration coordinates tasks and supports compliance/governance; time dependencies demand correct timing, sequential-by-default and parallel-when-independent execution, harmonization and control of late or missing data, and time series models (ARIMA, SARMA, LSTM) for gap handling.
⚠️ Top pitfall: Treating a missing data slice as ordinary 'no new data' instead of an event requiring harmonization or an alert.
Self-check: What happens if the traffic light data does not come through, and what models help?
Connects to: Data Pipeline vs Data Workflow, Directed Acyclic Graphs and Workflow Core Concepts.
Directed Acyclic Graphs and Workflow Core Concepts
Must-know: DAG = directed acyclic graph; acyclic forbids circular dependencies or the pipeline runs endlessly; core concepts: tasks, operators, relationships, executor, scheduler, logging, SLA, retry; revise PERT/CPM (earliest/latest start and finish, float, slack); job states: started, running, completed, blocked; workflows can live in graph databases like Neo4j.
\[\text{float} = \text{latest start} - \text{earliest start}\]
⚠️ Top pitfall: Creating a cyclic dependency (task depending on itself or its own downstream) so the pipeline never terminates.
Self-check: Why must a pipeline graph be acyclic?
Connects to: Workflow Orchestration and Time Dependencies, Tasks, Operators, Sensors, and Dependencies.
Tasks, Operators, Sensors, and Dependencies
Must-know: Task = basic unit of execution; operator = predefined task kind; sensor = operator waiting for an event (time or file); dependencies = upstream/downstream relationships, edge to a node; exam procedure: declare the task first, then the dependencies second; first declare all tasks.
⚠️ Top pitfall: Declaring dependencies before tasks exist, so the DAG cannot build; missing the skip path in load-type branches.
Self-check: What is the order for building a DAG: tasks or dependencies first?
Connects to: Directed Acyclic Graphs and Workflow Core Concepts, Executors, Schedulers, Logging, and Retries.
Executors, Schedulers, Logging, and Retries
Must-know: Scheduler monitors the DAG and decides what is ready; executor runs task instances; log every task; SLA = time by which it must complete; retry when a job does not run; loaders report errors, inserted, deleted, skipped records; reruns are targeted (33 of 3 million) and automated.
\[\frac{33}{3{,}000{,}000} = 0.0011\%\]
⚠️ Top pitfall: Retrying a data problem as if it were transient — a bad source needs an upstream fix, not another run.
Self-check: What does the scheduler do that the executor does not?
Connects to: Tasks, Operators, Sensors, and Dependencies, Orchestration Tools.
Orchestration Tools
Must-know: Five duties of an orchestration tool: scheduling, starting, saving states, monitoring workflows, generating alerts. Operator native (templates/connectors) and container native (Kubernetes, AKS). Airflow builds DAGs and automates ETL (used by Netflix); MWAA is AWS managed Airflow. Do not be tool-centric: evaluate against your purpose.
⚠️ Top pitfall: Being tool-centric: picking a famous tool and bending the problem to it instead of evaluating fit.
Self-check: What are the five purposes of a data orchestration tool?
Connects to: Executors, Schedulers, Logging, and Retries, Designing an End-to-End Pipeline Workflow.
Designing an End-to-End Pipeline Workflow
Must-know: Pipeline design order: data source, ingestion, validation, transformation, model training, model deployment. Triggers (new file detected) start tasks; failed validation creates an alert and execution stops for the human in the loop; logging enables continuous monitoring.
⚠️ Top pitfall: A failed validation with no alert is a silent failure; alerts must reach the owner and stop execution.
Self-check: What triggers the pipeline, and what happens when validation fails?
Connects to: Executors, Schedulers, Logging, and Retries, Orchestration Tools, Orange Miner: Building a Pipeline Visually.
Orange Miner: Building a Pipeline Visually
Must-know: Orange builds pipelines visually: file to data table, column statistics for validation, merge and unique values for transformation, graph for visualization, imputation and Python script widget for pre-processing, logistic regression/AdaBoost for modeling, and save/load model as versioning.
⚠️ Top pitfall: Saving only the score instead of the model artifact — a saved model is a version, a number is not reproducible.
Self-check: How is a saved model a version, and how do you load it later?
Connects to: Version Control for Data, Models, and Pipelines, Orchestration Tools, Designing an End-to-End Pipeline Workflow.