summaryrefslogtreecommitdiff
path: root/python-sparksql-magic.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-sparksql-magic.spec')
-rw-r--r--python-sparksql-magic.spec224
1 files changed, 224 insertions, 0 deletions
diff --git a/python-sparksql-magic.spec b/python-sparksql-magic.spec
new file mode 100644
index 0000000..335b5a3
--- /dev/null
+++ b/python-sparksql-magic.spec
@@ -0,0 +1,224 @@
+%global _empty_manifest_terminate_build 0
+Name: python-sparksql-magic
+Version: 0.0.3
+Release: 1
+Summary: Spark SQL magic command for Jupyter notebooks
+License: MIT License
+URL: https://github.com/cryeo/sparksql-magic
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/13/7a/50cb4b79e86bafb530c392efd1d439dcf0b662679f05e7fef2f649fa70c0/sparksql-magic-0.0.3.tar.gz
+BuildArch: noarch
+
+Requires: python3-pyspark
+Requires: python3-ipython
+
+%description
+# 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
+```
+%load_ext sparksql_magic
+```
+
+### 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] [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|
+
+
+
+
+
+
+
+%package -n python3-sparksql-magic
+Summary: Spark SQL magic command for Jupyter notebooks
+Provides: python-sparksql-magic
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-sparksql-magic
+# 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
+```
+%load_ext sparksql_magic
+```
+
+### 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] [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|
+
+
+
+
+
+
+
+%package help
+Summary: Development documents and examples for sparksql-magic
+Provides: python3-sparksql-magic-doc
+%description help
+# 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
+```
+%load_ext sparksql_magic
+```
+
+### 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] [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|
+
+
+
+
+
+
+
+%prep
+%autosetup -n sparksql-magic-0.0.3
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-sparksql-magic -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.3-1
+- Package Spec generated