_get_spark
Internal helper
This page documents an internal implementation helper, not a primary public API.
Return an explicit Spark session or the active notebook global spark.
Most Fabric notebooks already expose a global spark object. Tests and
local scripts can pass spark_session explicitly to avoid relying on the
notebook runtime.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spark_session
|
object
|
Spark session to use instead of the notebook global |
None
|
Returns:
| Type | Description |
|---|---|
object
|
Spark session object. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no Spark session is passed and no global |
Source code in src/fabricops_kit/fabric_io.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |