QuestionQ274

VerifiedDeveloping Code for Data Processing using Python and SQL

Which approach shows a modular, testable way to use DataFrame transform for ETL code in PySpark?

Explanation

PySpark DataFrame.transform applies a function that accepts a DataFrame and returns a DataFrame. Defining the ETL operation as a standalone function, passing it to DataFrame.transform, and asserting the resulting DataFrame against expected output keeps the transformation modular and directly testable.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!