What is the primary difference between a 'transformation' and an 'action' in Spark?
Answer
Transformations return a new RDD/DataFrame, actions return a result or write data.
Explanation
Transformations create a new RDD/DataFrame/Dataset from an existing one and are lazily evaluated. Actions trigger the execution of the DAG of transformations and either return a result to the driver or write data to storage.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
Which Flume Channel is suitable for high-throughput, low-latency scenarios where some data loss is acceptable?
View question →
Which of the following describes a 'narrow transformation' in Spark?
View question →
What is the command to stop all Hadoop HDFS daemons?
View question →
Which of the following is a common use case for Apache Pig in the Hadoop ecosystem?
View question →
Which command is used to drop an existing table in Hive?
View question →
What is the purpose of the '--warehouse-dir' argument in Sqoop import?
View question →