Spark SQL magic command for Jupyter notebooks
Project description
sparksql-jupyter
Spark SQL magic command for Jupyter notebooks.
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 |
Release Note
- 2024/05/09
- stringify timestamp with timezone columns before seriealization
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sparksql-jupyter-0.0.5.tar.gz.
File metadata
- Download URL: sparksql-jupyter-0.0.5.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a923d23cf9e7e823713fd81bc30fc0d5cd5274823ddd945677e10381fbf2dcf7
|
|
| MD5 |
357ebc1096b7555d3566a57382ef61b4
|
|
| BLAKE2b-256 |
02662ee17cbdc2534c01ec0c11897b91ac29a9ac03a98b5bb8e75805d486c6bf
|
File details
Details for the file sparksql_jupyter-0.0.5-py36-none-any.whl.
File metadata
- Download URL: sparksql_jupyter-0.0.5-py36-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3.6
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e88d3ac7ead0f73535aa11c3cd82e532d6fc1455a920fb03b7fd35f34679a0
|
|
| MD5 |
34d69777911eb5e96a8e9ea66cd2ceff
|
|
| BLAKE2b-256 |
91ffdab5f2c08c6937f39f76e6f0295b4a80bbce0ab205f99fda1d87839ebb8f
|