Unit 10 Cloud Pipelines Notes
Running Pipelines Automatically
Bring together every concept from the course into one complete picture — understanding the three execution modes, simulating the full automated sequence, and seeing how real businesses run pipelines without human intervention.
Learning Objectives
- Distinguish clearly between manual, scheduled, and event-based pipeline execution — and identify the right mode for a given business scenario
- Explain the distinct roles of Databricks and AWS Lambda in a fully automated pipeline
- Run three simulation cells that represent each execution mode individually and then the full automated sequence together
- Trace the complete journey from file upload to updated output table without any manual steps
- Apply a personal reflection on which workflows in your own context should be automated and how
Every time a pipeline runs, something started it. That starting mechanism is the execution mode. There are three — and most real business pipelines use a combination of all three depending on the task.
A manual coffee machine waits for you to press a button every morning. A coffee machine with a timer brews at 7 AM whether you asked it to that day or not. A smart coffee machine detects when you walk into the kitchen and starts brewing the moment you arrive. These are manual, scheduled, and event-based modes — applied to coffee. The same three patterns govern every automated data pipeline in existence.
A person decides when to run the pipeline and initiates it by clicking Run inside Databricks. Nothing happens without human action.
When it is appropriate: testing new notebooks, one-off analysis, diagnosing a problem, or any situation where oversight is required before results are trusted.
Databricks runs the notebook at a defined time — every morning at 7 AM, every Friday night, every first of the month. No person needs to be present.
When it is appropriate: regular reporting cycles, overnight batch jobs, payroll runs, and any workflow where the data updates on a predictable cadence.
AWS Lambda detects something happening — a file uploaded to S3, a customer action, a payment processed — and triggers Databricks immediately in response.
When it is appropriate: real-time processing, unpredictable data arrival, fraud detection, customer onboarding, and any situation where delays between data arrival and processing are unacceptable.
| Business Scenario | Best Mode | Why |
|---|---|---|
| Monthly financial close report | Scheduled | Runs once on a known date — predictable cadence suits a schedule |
| Customer places an order online | Event-Based | Must process immediately — waiting for the next scheduled run is unacceptable |
| Investigating a data anomaly | Manual | Human judgement is required — the analyst needs to examine results at each step |
| Nightly inventory update | Scheduled | All day’s transactions are available at midnight — a fixed overnight run is efficient |
| Supplier sends a file at unpredictable times | Event-Based | No fixed schedule exists — Lambda must react the moment the file arrives |
| Building and testing a new pipeline | Manual | During development, each step needs manual inspection before automation is trusted |
A production pipeline might run automatically on a schedule every night, trigger immediately via Lambda when urgent files arrive, and be run manually by an engineer when something needs investigating. The modes are not mutually exclusive — they are complementary tools, each suited to a different circumstance within the same pipeline’s lifecycle.
Looking back across this course, you started by clicking Run manually in every unit. Each unit added one more layer of automation capability. This section traces that evolution — showing exactly what changed at each stage and what the fully automated version looks like.
Full automation does not mean the pipeline runs without oversight. It means the execution requires no human initiation. Engineers still monitor logs, analysts still review outputs, and developers still update logic when business rules change. Automation handles the repetitive, time-sensitive triggering — humans handle the judgement, the monitoring, and the improvement. That division of responsibility is exactly what Unit 11 covers.
Create a notebook named Unit10_Automated_Pipeline in Databricks, set to Python, cluster attached. These three cells build on each other — run them in order and read the explanation for each before moving to the next.
print(“Scheduled Pipeline:”, schedule)
print(“Running automated sales workflow”)
The variable schedule stores the timing definition — “Daily at 8:00 AM.” In a real Databricks Jobs configuration, this string would not be typed in a variable; it would be set in the scheduling interface using a cron expression (a standard format for defining time patterns). The two print statements simulate the log messages a pipeline produces at the start of a scheduled run: confirming the schedule configuration and announcing that the workflow has begun. In production, these messages appear in the Databricks job run history — a manager reviewing the logs the next morning can see that the pipeline started exactly on time and what it processed.
print(“Event Detected:”, event)
print(“Lambda started the Databricks workflow”)
The variable event stores a description of what triggered the pipeline — “New file uploaded to S3.” In a live system, this value arrives automatically from Lambda. When a file lands in S3, Lambda packages the event details (file name, bucket, timestamp) and passes them to the Databricks notebook as input. The notebook reads those details from the event variable to know which file to process. The second print statement — “Lambda started the Databricks workflow” — represents the handoff confirmation: the notebook has received the trigger and is now running. This two-line log pattern is what engineers look for in the run history to confirm the automation is working end-to-end.
print(“Step 2: Lambda Triggered”)
print(“Step 3: Databricks Workflow Running”)
print(“Step 4: Output Table Updated”)
Each line maps directly to one stage of the complete automated pipeline you have built across this course. Step 1 is Unit 3: the raw file lands in the S3 bucket’s raw/ folder. Step 2 is Unit 9: Lambda detects the upload and fires the trigger. Step 3 is Units 5–6: the Databricks notebook reads, validates, cleans, and transforms the data. Step 4 is Unit 7: the cleaned result is written to the permanent Delta table — ready for dashboards and reports. In a real automated pipeline, this entire sequence runs without a single human action. The only step that a person performed was the original upload in Step 1 — and in many production systems, even that step is automated by a source system that exports and uploads files on its own schedule.
The technical knowledge in this course only becomes valuable when it connects to real problems. This section asks you to apply the execution mode framework — manual, scheduled, event-based — to workflows you actually encounter.
Before automating any pipeline, three questions narrow the decision: Does this need to happen immediately when data arrives, or can it wait for a fixed window? Is the logic stable enough to trust without manual inspection each time? And what is the cost — to the business or the people relying on the output — if the automated run fails silently? The answers determine not just which execution mode to use, but how much monitoring the pipeline needs. That is exactly what Unit 11 addresses.
Knowledge Check
Five questions covering Unit 10. Select the best answer for each question.
1. A hospital needs its patient bed-availability dashboard to update the moment a patient is admitted. Which execution mode is most appropriate?
2. In Cell 3 of this unit, what does “Step 2: Lambda Triggered” represent in a real pipeline?
3. Why might a business use all three execution modes — manual, scheduled, and event-based — within the same pipeline?
4. Looking back at the course journey, at which point did the pipeline first gain the ability to run without a person clicking Run?
5. What does full automation mean for the role of engineers and analysts in a pipeline?
Unit 10 Summary
What you covered in this unit
Manual runs require human action. Scheduled runs fire at defined times. Event-based runs respond immediately to something happening. Most real pipelines combine all three.
From manual clicks in Unit 1 to a fully automated pipeline by Unit 10 — each unit added one layer: logic, storage, triggers, and finally full automated execution.
File upload → Lambda trigger → Databricks processing → Delta table updated. No human action required between Step 1 and Step 4 in an automated pipeline.
Automation handles repetitive execution. Humans handle monitoring, judgement, and improvement. The two roles are complementary — not competing.