Skip to main content

Python wrapper for Spark logical plan capture extension

Project description

spark-logical-plan-capture

Python package for connecting the Spark extension io.github.mt.logicplan.LogicalPlanCaptureExtension via spark-submit or from PySpark code.

Install

pip install spark-logical-plan-capture

Usage in PySpark

from pyspark.sql import SparkSession
from spark_logical_plan_capture import get_spark_conf, get_jar_path

conf = get_spark_conf()

spark = (
    SparkSession.builder
    .config("spark.sql.extensions", conf["spark.sql.extensions"])
    .config("spark.jars", conf["spark.jars"])
    .getOrCreate()
)

Usage with spark-submit

spark-submit \
  --conf "spark.sql.extensions=io.github.mt.logicplan.LogicalPlanCaptureExtension" \
  --jars "$(python -c 'from spark_logical_plan_capture import get_jar_path; print(get_jar_path())')" \
  your_job.py

Current package line is built for Spark 3.5.2, Scala 2.13.8, JVM 11.0.25.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spark_logical_plan_capture-0.2.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spark_logical_plan_capture-0.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file spark_logical_plan_capture-0.2.0.tar.gz.

File metadata

File hashes

Hashes for spark_logical_plan_capture-0.2.0.tar.gz
Algorithm Hash digest
SHA256 06ce141356218d234fe5c29a5d868ea5095ef9f304488307e81dac527b4743f2
MD5 323d0edd04b466fa98dfbfc773f48015
BLAKE2b-256 6ac59762123decd92ae9bdf87f38930ea257bd8fe361b9aa958a52e658d13ef4

See more details on using hashes here.

File details

Details for the file spark_logical_plan_capture-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spark_logical_plan_capture-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4a158d1ad8449038c6647a0b2e5d40120da3fed65e5faa54b21590972e9a3f9
MD5 d58ca3c976c5c230ae6d74744cc2a413
BLAKE2b-256 8d455a2f6adf8494a18d3505ca1832713b2cf285d5fffdca13689e3c83c2ee1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page