Skip to main content
PYSPARK • LESSON 277

Stream-Static Join for Real-Time Dimension Enrichment

How can we enrich incoming streaming transactions in real time by joining them with a static database table of customers?

Production3 Minutes860 XP
🤔 THE QUESTION

How can we enrich incoming streaming transactions in real time by joining them with a static database table of customers?

💡 WHAT IS IT?

Joining a streaming DataFrame with a static DataFrame performs lookup enrichment without requiring streaming state stores.

🎯 WHAT IS IT USED FOR?

Augmenting incoming financial payment transactions with customer risk profiles and KYC verification status.

💻 EXAMPLE
df_enriched_stream = streaming_orders.join(df_static_customers, "customer_id", "left")

🎯 Mission Objectives

Practice typing production-grade PySpark code for Stream-Static Join for Real-Time Dimension Enrichment.

  • Stream-static join architecture
  • Stateless real-time lookup
  • Transaction data enrichment