pyspark.sql.is_remote#

pyspark.sql.is_remote()[source]#

Returns if the current running environment is for Spark Connect.

New in version 4.0.0.

Returns
bool

Notes

This will only return True if there is a remote session running. Otherwise, it returns False.

This API is unstable, and for developers.

Examples

>>> from pyspark.sql import is_remote
>>> is_remote()
False