<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Spark_Connect</id>
	<title>Spark Connect - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Spark_Connect"/>
	<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Spark_Connect&amp;action=history"/>
	<updated>2026-12-06T00:08:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://openlakehouse.io/w/index.php?title=Spark_Connect&amp;diff=49&amp;oldid=prev</id>
		<title>Open Lakehouse Wiki sync: Sync from open-lakehouse/wiki@355a38d</title>
		<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Spark_Connect&amp;diff=49&amp;oldid=prev"/>
		<updated>2026-11-22T18:53:21Z</updated>

		<summary type="html">&lt;p&gt;Sync from open-lakehouse/wiki@355a38d&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox software&lt;br /&gt;
| name                = Spark Connect&lt;br /&gt;
| developer           = [[Apache Software Foundation]] ([[Apache Spark]] project)&lt;br /&gt;
| initial_release     = Spark 3.4.0 (2023)&lt;br /&gt;
| latest_release      = Spark 4.3.0&lt;br /&gt;
| latest_release_date = 2026-10-30&lt;br /&gt;
| written_in          = Scala, Python&lt;br /&gt;
| type                = Client-server protocol for Apache Spark&lt;br /&gt;
| license             = Apache License 2.0&lt;br /&gt;
| website             = [https://spark.apache.org/docs/latest/spark-connect-overview.html Spark Connect overview]&lt;br /&gt;
| repo                = [https://github.com/apache/spark/tree/v4.3.0/sql/connect github.com/apache/spark (sql/connect)]&lt;br /&gt;
| related             = [[Apache Spark]], [[Spark Declarative Pipelines]]&lt;br /&gt;
}}&lt;br /&gt;
{{Verified|2026-11-22|the Spark 4.3.0 Spark Connect documentation and source at tag v4.3.0, Spark release notes 3.4.0, 3.5.0 and 4.0.0, and PyPI}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Spark Connect&amp;#039;&amp;#039;&amp;#039; is a client-server interface for [[Apache Spark]] in which a thin client library sends DataFrame operations to a remote Spark server as unresolved logical plans and receives the results over the network.&amp;lt;ref name=&amp;quot;overview&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/spark-connect-overview.html |title=Spark Connect Overview (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Spark Connect separates the application process from the Spark driver, so an application can run in an IDE, a notebook or a service without sharing a process or dependencies with the cluster. It was introduced in Spark 3.4.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
The Spark Connect client translates DataFrame operations into unresolved logical query plans, encodes them with Protocol Buffers and sends them to the server with gRPC.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Spark Connect endpoint on the server translates the received plans into Spark&amp;#039;s logical plan operators, much as Spark parses a SQL query, and then runs them through the normal Spark optimizer and execution engine. Results return to the client over gRPC as Apache Arrow-encoded row batches.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, a Spark Connect server listens on port 15002. The port is set by the static configuration &amp;lt;code&amp;gt;spark.connect.grpc.binding.port&amp;lt;/code&amp;gt;, which has existed since Spark 3.4.0.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/config/Connect.scala |title=Connect.scala (tag v4.3.0) |publisher=Apache Spark on GitHub |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Clients address the server with a connection string that starts with &amp;lt;code&amp;gt;sc://&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;sc://localhost:15002&amp;lt;/code&amp;gt;, given either in code or in the &amp;lt;code&amp;gt;SPARK_REMOTE&amp;lt;/code&amp;gt; environment variable.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Differences from classic Spark ==&lt;br /&gt;
Spark Connect changes what an application can reach, because the client runs outside the driver process:&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The client cannot access the driver JVM. In PySpark, the client does not use Py4J, so private fields such as &amp;lt;code&amp;gt;df._jdf&amp;lt;/code&amp;gt; are not available.&lt;br /&gt;
* The protocol describes work as logical plans, so it does not support every Spark execution API. Most importantly, RDDs are not supported.&lt;br /&gt;
* Each client gets its own session. The client cannot change cluster-wide settings, and it has no access to the static Spark configuration or to the &amp;lt;code&amp;gt;SparkContext&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The Spark documentation names stability, upgradability and debuggability as operational reasons for this split: an application that uses too much memory affects only its own process, the server can be upgraded independently of client applications, and applications can be debugged in a local IDE.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Spark Connect ==&lt;br /&gt;
A server is started from a Spark distribution with the &amp;lt;code&amp;gt;sbin/start-connect-server.sh&amp;lt;/code&amp;gt; script. A PySpark application then connects by passing a remote address when it builds the session:&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pyspark.sql import SparkSession&lt;br /&gt;
&lt;br /&gt;
spark = SparkSession.builder.remote(&amp;quot;sc://localhost:15002&amp;quot;).getOrCreate()&lt;br /&gt;
spark.range(10).filter(&amp;quot;id % 2 = 0&amp;quot;).show()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The shells accept the same address with &amp;lt;code&amp;gt;--remote&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;./bin/pyspark --remote &amp;quot;sc://localhost&amp;quot;&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt; Scala applications use the &amp;lt;code&amp;gt;spark-connect-client-jvm&amp;lt;/code&amp;gt; artifact and the same &amp;lt;code&amp;gt;remote&amp;lt;/code&amp;gt; builder method. Scala code that contains user-defined functions must upload its class files and JAR dependencies to the server, for example with &amp;lt;code&amp;gt;SparkSession#addArtifact&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Python, the &amp;lt;code&amp;gt;pyspark-client&amp;lt;/code&amp;gt; package on PyPI contains only the Spark Connect client, without the JVM parts of PySpark.&amp;lt;ref name=&amp;quot;overview&amp;quot; /&amp;gt; Its latest version on 22 November 2026 is 4.3.0.&amp;lt;ref&amp;gt;{{Cite web |url=https://pypi.org/project/pyspark-client/ |title=pyspark-client |publisher=Python Package Index |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Spark 4.0, the &amp;lt;code&amp;gt;spark.api.mode&amp;lt;/code&amp;gt; configuration (values &amp;lt;code&amp;gt;classic&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;connect&amp;lt;/code&amp;gt;, default &amp;lt;code&amp;gt;classic&amp;lt;/code&amp;gt;) lets an existing classic application run through Spark Connect without code changes, by starting a local Spark Connect server for it.&amp;lt;ref&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/app-dev-spark-connect.html |title=Application Development with Spark Connect (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/configuration.html |title=Spark Configuration (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Client !! Where it lives !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Python (PySpark) || apache/spark || First released in Spark 3.4.0&amp;lt;ref name=&amp;quot;r340&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-3-4-0.html |title=Spark Release 3.4.0 |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Scala || apache/spark || First released in Spark 3.5.0&amp;lt;ref name=&amp;quot;r350&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-3-5-0.html |title=Spark Release 3.5.0 |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Go || [https://github.com/apache/spark-connect-go apache/spark-connect-go] || Announced with Spark 3.5.0&amp;lt;ref name=&amp;quot;r350&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Swift || [https://github.com/apache/spark-connect-swift apache/spark-connect-swift] || Announced with Spark 4.0.0&amp;lt;ref name=&amp;quot;r400&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-4-0-0.html |title=Spark Release 4.0.0 |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Rust || [https://github.com/apache/spark-connect-rust apache/spark-connect-rust] || &amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark-connect-rust |title=apache/spark-connect-rust |publisher=GitHub |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Spark Connect was proposed in the Spark Project Improvement Proposal (SPIP) tracked as SPARK-39375, filed in June 2022.&amp;lt;ref&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-39375 |title=SPARK-39375: SPIP: Spark Connect - A client and server interface for Apache Spark |publisher=Apache Software Foundation JIRA |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Spark 3.4.0 shipped the Python client.&amp;lt;ref name=&amp;quot;r340&amp;quot; /&amp;gt; Spark 3.5.0 added the Scala client, Structured Streaming support in Python and Scala, and pandas API on Spark support for the Python client.&amp;lt;ref name=&amp;quot;r350&amp;quot; /&amp;gt; Spark 4.0.0 added the &amp;lt;code&amp;gt;pyspark-client&amp;lt;/code&amp;gt; package, an extra release tarball with Spark Connect enabled by default, the &amp;lt;code&amp;gt;spark.api.mode&amp;lt;/code&amp;gt; setting and machine learning on Spark Connect.&amp;lt;ref name=&amp;quot;r400&amp;quot; /&amp;gt; Spark 4.3.0 added REST endpoints for inspecting sessions and operations, operation IDs for request attribution, and a more complete JDBC driver.&amp;lt;ref&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-4-3-0.html |title=Spark Release 4.3.0 |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use in an open lakehouse ==&lt;br /&gt;
In an [[open lakehouse]], Spark Connect lets light clients such as notebooks, services and AI agents run queries on a shared Spark cluster that holds the catalog and table format configuration. [[Spark Declarative Pipelines]] depends on it: in Spark 4.3 the &amp;lt;code&amp;gt;spark-pipelines&amp;lt;/code&amp;gt; launcher requires &amp;lt;code&amp;gt;spark.api.mode&amp;lt;/code&amp;gt; to be &amp;lt;code&amp;gt;connect&amp;lt;/code&amp;gt; and rejects any other value.&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/scala/org/apache/spark/deploy/SparkPipelines.scala |title=SparkPipelines.scala (tag v4.3.0) |publisher=Apache Spark on GitHub |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Apache Spark]]&lt;br /&gt;
* [[Spark Declarative Pipelines]]&lt;br /&gt;
* [[Agentic lakehouse]]&lt;br /&gt;
* [[Open lakehouse]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Navbox open lakehouse}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Query engines]]&lt;br /&gt;
[[Category:Apache Spark]]&lt;/div&gt;</summary>
		<author><name>Open Lakehouse Wiki sync</name></author>
	</entry>
</feed>