Week 11: ETL Pipelines and Vector Databases

DSAN 6000: Big Data and Cloud Computing
Fall 2026

Class Sessions
Author
Affiliation

Jeff Jacobs

Published

Monday, November 16, 2026

Open slides in new tab →

Pipelines for Triggered Execution

…HEY! WAKE UP! NEW DATA JUST CAME IN!

You before this week:

  • Sprint to your .ipynb and/or Spark cluster
  • Load, clean, process new data, manually, step-by-step
  • Email update to boss

You after this week:

  • Asset-aware pipeline automatically triggered
  • Airflow orchestrates loading, cleaning, processing
  • EmailOperator sends update

Pipelines vs. Pipeline Orchestration

From Astronomer Academy’s Airflow 101

Key Airflow-Specific Buzzwords

(Underlined words link to Airflow docs “Core Concepts” section)

  • Directed Acyclic Graph (DAG): Your pipeline as a whole!

  • DAGs consist of multiple tasks, which you “string together” using the control flow operators >> and <<

  • [Ex ] second_task, third_task can’t start until first_task completes:

    first_task >> [second_task, third_task]
    # Equivalent to:
    first_task.set_downstream([second_task, third_task])
  • [Ex ] fourth_task can’t start until third_task completes:

    fourth_task << third_task
    # Equivalent to:
    fourth_task.set_upstream(third_task)
  • What kinds of tasks can we create? Brings us to another concept…

Operators: What Kind of task?

  • + Hundreds of “community provider” Operators:
  • HttpOperator
  • S3FileTransformOperator
  • SQLExecuteQueryOperator
  • EmailOperator
  • SlackAPIOperator

+ Jinja templating for managing how data “passes” from one step to the next:

Task vs. Operator: A Sanity-Preserving Distinction

From Operator docs:

When we talk about a Task, we mean the generic “unit of execution” of a DAG; when we talk about an Operator, we mean a [specific] pre-made Task template, whose logic is all done for you and that just needs some arguments.

Task:

Operator:

From Ruiter et al. (2026)

Concepts \(\leadsto\) Code

start-airflow.sh
airflow db migrate
airflow api-server --port 8080
airflow scheduler
airflow dag-processor
airflow triggerer
  • Full Airflow “ecosystem” is running once you’ve started each piece via above (bash) commands!
  • Let’s look at each in turn… (Optional) Bonus slides!

The Payoff: Downstream Consumers Can Establish Their Own Triggered Execution(s)!

From Ruiter et al. (2026)

What are we Loading Into?

Our Working ETL Example

  • Extract text from OLTP, Transform by embedding into semantic vector space
  • Load into… OLAP DB, but what kind? Data Lake? ❌ Warehouse? ❌
name message embedding label
dim1 dim2 \(\cdots\) dim3072
Fangzhou card broke in half [0.8723 0.7536 \(\cdots\) 0.8022] card_issue
Samyu accidentally folded card into möbius strip, cant figure out which part is the back [0.1296 0.5923 \(\cdots\) 0.1105] NA (❓)
Jeff off the lean in italy like i was pisa, put it on the mastercard, already owe visa [0.2399 0.0656 \(\cdots\) 0.0967] rapping
  • In fact, none of the approaches thus far (whether OLTP or OLAP) are very helpful for this case: “standard” tabular storage fails to capture spatial structure…

Intuition: …Why Did We “Split” OLAP from OLTP in the First Place?

The answer: Different use cases \(\Rightarrow\) Optimizing for different “critical operations”

OLTP

  • Optimized for rapid insertion
  • Ex: Append-only logs, website events, sensor readings
  • …Vector DBs? ❌ Not typically a critical operation (vectors can be inserted offline/overnight at pace chosen by engineers)

OLAP

  • Optimized for rapid vectorized columnar computations (across many observations at once)
  • Ex: (df['y'] - df['yhat'])^2
  • Vector DBs? ❌ Each observation has not 1 but (say) 3,072 non-independent attributes; a single column
  • Critical operation for Vector DBs? Nearest-neighbors search
  • Need a data structure that forces records close in vector space to be close in DB… Spoiler ():
    QuadTree!

Vector Spaces: The Geometry of AI!

  • Why vector spaces over keyword matching?
  • What if words have different meanings in different contexts?

Word Counts: Good Enough?

Just four keywords per section:

Section Keywords
U.S. state, court, federal, republican
World government, country, officials, minister
Arts music, show, art, dance
Sports game, league, team, coach
Real Estate home, bedrooms, bathrooms, building

For each article, vote for section with highest keyword count:

Arts Real Estate Sports U.S. News World News Total
Correct 3020 690 4860 1330 1730 11630
Incorrect 750 60 370 1100 590 2870
Accuracy 0.801 0.920 0.929 0.547 0.746 0.802

What’s Missing? Context!

You shall know a word by the company it keeps. (Firth 1957)

Article A (World News):

President Bush said he was trying to convince President Vladimir Putin of Russia that cooperation was “in Russia’s security interests,” even though Defense Secretary Robert M. Gates did not win Mr. Putin’s support during a trip to Moscow last week.

“Bush Steps Up Effort to Persuade Putin on Missile Defense Plan”, NYTimes, 1 May 2007.

Article B (U.S. News):

President Bush began his day yesterday at dawn on the golf course. He began Saturday on the golf course, too. A weekend earlier, the president played two rounds of 18 holes on the course at Andrews Air Force Base just outside Washington.

“White House Letter; Bush Makes Quick Work of Relaxing”, NYTimes, 5 August 2002.

Basic Context Engineering

  • What exactly do we mean when we say “context”?
  • Different training objectives give different types of contexts!
  • Example: Closest vectors to Turing, trained on Wikipedia in two ways:


Dependency Tree 5-Word Window
Same category \(\rightarrow\) Pauling nondeterministic \(\leftarrow\) Topically related
(Paradigmatic) Hotelling computability (Syntagmatic)
Lessing deterministic
Hamming finite-state
Example from Uber AI Labs’ amazing Piero Molina

Pretentious But Helpful Terms!

  • Paradigmatic \(\approx\) Grammatical “substitutes”, drawn from same category/type
  • Syntagmatic \(\approx\) semantic relationships between words in a sentence


Paradigmatic
↓
Paradigmatic
↓
apples ← Syntagmatic → sweet
oranges ← Syntagmatic → sour
These \(\underline{\hspace{32mm}}\) taste very \(\underline{\hspace{32mm}}\) !

(Both terms from Saussure (1916))

How Do We Actually Get These Vectors?

  • High-level goal: Retain information about word-context relationships while reducing the \(M\)-dimensional representations of each word down to 3 dimensions.
  • Low-level goal: Generate rank-\(K\) matrix \(\mathbf{W}\) which best approximates distances between words in \(M\)-dimensional space (rows in \(\mathbf{X}\))

Now We Put These Embeddings (Vectors) into Databases

  • The goal: identify similar object as vectors “close to” the location (in vector space) of a given query

Vector Search Workflow

Unstructured Data \(\leadsto\) Structured Geometric Query Space

Fig 1: Image Source

More Data \(\leadsto\) “Increasing Returns”

Learn about vehicles from one dataset…

Learn about foods from another dataset…

Learn about color from both 🤯

Queries Embedded via the Same Model!

In-Class Demo: Vector DBs

[https://github.com/jpowerj/dsan6000-vectordb-demo}{.boxed-cb}

References

Firth, John Rupert. 1957. Papers in Linguistics, 1934-1951. Oxford University Press.
Ruiter, Julian de, Ismael Cabral, Kris Geusebroek, Daniel van der Ende, and Bas Harenslak. 2026. Data Pipelines with Apache Airflow, Second Edition. Simon and Schuster.
Saussure, Ferdinand de. 1916. Course in General Linguistics. Open Court.