Skip to main content
e6-spark-compat is a drop-in compatibility library that lets you run existing PySpark and Apache Sedona code on e6data. Update your import statements, configure the e6data connection, and your Spark code works as-is - no rewrites needed. DataFrame operations are lazily evaluated: transformations build a query-plan tree, and when an action (collect, show, count) is called, the plan is translated into optimized SQL and executed on e6data.

Key capabilities

  • Full PySpark DataFrame API - select, filter, join, groupBy, orderBy, union, pivot, and more.
  • 130+ SQL functions - string, math, aggregate, date/time, window, conditional.
  • Window functions with the complete Window specification API.
  • 70+ Apache Sedona-compatible spatial functions (ST_*).
  • File format support - Parquet, ORC, CSV, JSON, GeoParquet, Delta.
  • Read and write operations.
See Supported APIs and compatibility notes for the full list, and Limitations for what isn’t supported.

Prerequisites

  • An active e6data workspace and cluster.
  • A personal access token from the e6data Console (User settings → Access tokens).
  • Python 3.8+.

Installation

Getting started

Migrate a PySpark application to e6data in three steps: update imports, configure the connection, and run.

Step 1: Update imports

Replace your PySpark imports with e6-spark-compat equivalents. The API is identical.
For spatial (Sedona) operations, replace from sedona.register import SedonaRegistrator with from e6_spark_compat.sedona import SedonaRegistrator.

Step 2: Configure the connection

Create a SparkSession pointing to your e6data cluster.
Find your cluster hostname and connection details in the e6data Console under Clusters → Connection Info.
Don’t hardcode your access token in source code. Use environment variables or a secrets manager - for example, os.getenv("E6DATA_TOKEN").

Step 3: Run your code

Your existing PySpark logic works without modification:

Catalog operations

Discover databases, tables, and columns programmatically:
Close the session with spark.stop().

See also

Last modified on September 29, 2026