Metadata-Version: 2.1
Name: sparksql-magic
Version: 0.0.1
Summary: Spark SQL magic command for Jupyter notebooks
Home-page: https://github.com/cryeo/sparksql-magic
Author: Chaerim Yeo
Author-email: yeochaerim@gmail.com
License: MIT License
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: pyspark (>=2.3.0)
Requires-Dist: ipython (>=7.4.0)

# sparksql-magic

Spark SQL magic command for Jupyter notebooks.

![Example](screenshots/example.png)

## Prerequisites
- Python >= 3.6
- PySpark >= 2.3.0 
- IPython >= 7.4.0

## Install
```
pip install sparksql-magic
```

## Usage

### Load
```ba
%load_ext sparksql_magic
```

### Config
```
%config SparkSql.max_num_rows=<INT>
```

|Option|Default|Description|
|---|---|---|
|`SparkSql.max_num_rows`|20|The maximum number of rows to display|

### Parameter
```
%%sparksql [-c] [-v VIEW] [variable]
<QUERY>
```

|Parameter|Description|
|---|---|
|`-c` `--cache`|Cache dataframe|
|`-v VIEW` `--view VIEW`|Create or replace temporary view|
|`variable`|Capture dataframe in a local variable|





