Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§ͺ PySpark SQL Without Temp Views – Bronze to Silver Example

This repository contains a simple and production-like example of how to use PySpark's spark.sql() function by passing DataFrames directly as named parameters β€” avoiding the need for temporary views.

πŸ“– Related Article

Check out the full Medium article here:
πŸ‘‰ Efficient Spark SQL without Temp Views: Cleaner Data Pipelines

βœ… Works with PySpark 3.3 and later

πŸ“Œ What You'll Learn

  • How to write SQL queries on DataFrames without creating temp views
  • How to build a simple data transformation pipeline (Bronze β†’ Silver layer)
  • Why this approach improves clarity and maintainability in Spark projects

πŸ› οΈ Example Overview

We simulate a medallion architecture scenario with:

  • Bronze Layer: Raw data for customers and orders
  • Silver Layer:
    • Join customers and orders
    • Filter high-value orders
    • Aggregate spending per customer

About

Clean example showing how to use spark.sql() directly with DataFrames in PySpark 3.3+, avoiding temp views for cleaner and safer SQL queries in data pipelines.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages