Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the Spark version. The string contains 2 fields, the first being a release version and the second being a git revision.
Syntax
from pyspark.sql import functions as sf
sf.version()
Examples
Example 1: Get Spark version
from pyspark.sql import functions as sf
spark.range(1).select(sf.version()).show(truncate=False)
+----------------------------------------------+
|version() |
+----------------------------------------------+
|4.0.0 4f8d1f575e99aeef8990c63a9614af0fc5479330|
+----------------------------------------------+