Skip to main content

Spark SQL magic command for Jupyter notebooks

Project description

sparksql-jupyter

Spark SQL magic command for Jupyter notebooks.

Example

Prerequisites

  • Python >= 3.6
  • PySpark >= 2.3.0
  • IPython >= 7.4.0
  • Jinja2 >= 3.0.0

Install

pip install sparksql-jupyter

Usage

Load

%load_ext sparksql_jupyter

Config

%config SparkSql.limit=<INT>
Option Default Description
SparkSql.limit 20 The maximum number of rows to display

Parameter

%%sparksql [-c|--cache] [-e|--eager] [-v|--view VIEW] [-l|--limit LIMIT] [-j|--jinja] [variable]
<QUERY>
Parameter Description
-c --cache Cache dataframe
-e --eager Cache dataframe with eager load
-v VIEW --view VIEW Create or replace temporary view
-l LIMIT --limit LIMIT The maximum number of rows to display (Default: SparkSql.limit)
variable Capture dataframe in a local variable
-j --jinja Capture dataframe in a local variable in jinja2 template

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

sparksql-jupyter-0.0.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

sparksql_jupyter-0.0.4-py36-none-any.whl (4.3 kB view details)

Uploaded Python 3.6

File details

Details for the file sparksql-jupyter-0.0.4.tar.gz.

File metadata

  • Download URL: sparksql-jupyter-0.0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for sparksql-jupyter-0.0.4.tar.gz
Algorithm Hash digest
SHA256 54bda2273c8bac897aa3ff31df24d0d667b613f808bda9cff461c238710fbaae
MD5 cbf4566cd206a0a4bf84943c30ee59cb
BLAKE2b-256 fe6d211624572c89d129b2c1b737a09e6430cdb501e3e1341fef6c0e6762505d

See more details on using hashes here.

File details

Details for the file sparksql_jupyter-0.0.4-py36-none-any.whl.

File metadata

File hashes

Hashes for sparksql_jupyter-0.0.4-py36-none-any.whl
Algorithm Hash digest
SHA256 8ba897bac42e0cb11163ae3c6fbca580b9106d096ea22baa5429af527e355d8c
MD5 dc13193e7abce65f9acda74ceb83f5d3
BLAKE2b-256 0a6c7dbdb58d745efa8eeb6589f103148592937848664279b37e23d782fd701e

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