py-hiverunner
Library provides python API for Klarna's HiveRunner.
Install
Install py-hiverunner package with pip:
$ python -m pip install py-hiverunner
Usage
Before using py-hiverunner you need start JVM with facade service based on original Klarna's HiveRunner -
java-hiverunner.
This repo provides docker container for Py4J Java Gateway for HiveRunner.
You can pull this:
$ docker pull la9ran9e/py-hiverunner
and then run the container:
$ docker run -ti -p 25333:25333 -p 25334:25334 la9ran9e/py-hiverunner
After that you will have working server with Java HiveRunner.
Try this:
from py_hiverunner import hiverunner
from pprint import pprint
with hiverunner() as hive:
hive.execute_query("create schema meh")
hive.execute_query("create table meh.nonsub(a int, b string, c array<string>)")
hive.execute_query("insert into meh.nonsub select 1, 'la9ran9e', array('1', 'a', 'b', '6')")
hive.execute_query("insert into meh.nonsub select 2, 'la9ran9e', array('1', 'b', 'b', '6')")
hive.execute_query("insert into meh.nonsub select 3, 'la9ran9e', array('1', 'c', 'b', '6')")
hive.execute_query("insert into meh.nonsub select 4, '', array('1', 'd', 'b', '6')")
hive.execute_query("create table meh.sub(a int, b string, c boolean)")
hive.execute_query("insert into meh.sub select 1, 'la9ran9e', true")
print("RESULT:")
pprint(hive.execute_query("""
select
*
from
meh.sub as sub
inner join
meh.nonsub as nonsub
on
sub.b = nonsub.b
"""))
Metadata
Release files for py-hiverunner 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py-hiverunner-0.1.3.tar.gz | 5.4 kB | Without provenance | Details for py-hiverunner-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_hiverunner-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for py_hiverunner-0.1.3-py3-none-any.whl |
Total release size: 12.1 kB
Release files / py-hiverunner-0.1.3.tar.gz
| Download URL | py-hiverunner-0.1.3.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c0f3fc01e716d9f231fd228723ee3fe027136a05a559019a69e1f28f7834a4d
|
|
BLAKE2b-256 checksum How to use checksums |
c96c9a3baa8b20ed27bbb9f019d2c31c712bc93d6b1d4139e9d8812ad52e5983
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.9 CPython/3.8.3 Darwin/19.2.0
|
Release files / py_hiverunner-0.1.3-py3-none-any.whl
| Download URL | py_hiverunner-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bcab220eed63fba651d121a66cf4677e8ff23d77042b9923dc40a9cb660335e
|
|
BLAKE2b-256 checksum How to use checksums |
6552953ce31dfcc777174accade2b480c8a2cf86d29176a78c1a9b51b48b861c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.9 CPython/3.8.3 Darwin/19.2.0
|
Security for py-hiverunner 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.