Skip to main content

# HiveQL Kernel

### Requirements

If you are going to connect using kerberos:

` sudo apt-get install python3-dev libsasl2-dev libsasl2-2 libsasl2-modules-gssapi-mit `

### Installation

To install the kernel:

` pip install --upgrade hiveqlKernel jupyter hiveql install --user `

### Connection configuration

Two methods are available to connect to a Hive server:

  • Directly inside the notebook

  • Using a configuration file

If the configuration file is present, everytime you run a new HiveQL kernel it uses it, else you must configure your connection inside the notebook. The configuration in the notebook overwrites the one in the configuration file if present.

#### Configure directly in the notebook cells

Inside a Notebook cell, copy&paste this, change the configuration to match your needs, and run it.

` $$ url=hive://<kerberos-username>@<hive-host>:<hive-port>/<db-name> $$ connect_args={"auth": "KERBEROS", "kerberos_service_name": "hive", "configuration": {"tez.queue.name": "myqueue"}} $$ pool_size=5 $$ max_overflow=10 `

These args are passed to sqlalchemy, who registered pyHive as the ‘hive’ SQL back-end. See [github.com/dropbox/PyHive](https://github.com/dropbox/PyHive/#sqlalchemy).

#### Configure using a configuration file

The HiveQL kernel is looking for the configuration file at ~/.hiveql_kernel.conf by default. You can specify another path using HIVE_KERNEL_CONF_FILE.

The contents must be like this (in json format):

` { "url": "hive://<kerberos-username>@<hive-host>:<hive-port>/<db-name>", "connect_args" : { "auth": "KERBEROS", "kerberos_service_name":"hive", "configuration": {"tez.queue.name": "myqueue"}}, "pool_size": 5, "max_overflow": 10, "default_limit": 20, "display_mode": "be" } `

### Usage

Inside a HiveQL kernel you can type HiveQL directly in the cells and it displays a HTML table with the results.

You also have other options, like changing the default display limit (=20) like this :

` $$ default_limit=50 `

Some hive functions are extended. They allow to filter with some patterns.

` SHOW TABLES <pattern> SHOW DATABASES <pattern> `

### Run tests

` python -m pytest `

Have fun!

Metadata

Release files for hiveqlKernel 1.0.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hiveqlKernel 1.0.20
File Size Uploaded
hiveqlKernel-1.0.20.tar.gz 24.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hiveqlKernel 1.0.20
File Interpreter ABI Platform
hiveqlKernel-1.0.20-py3-none-any.whl Python 3 none any Details

Total release size: 53.4 kB

Release files / hiveqlKernel-1.0.20.tar.gz

Download URL hiveqlKernel-1.0.20.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4d4d21d27ee7e8385c194408cd86c054bc03b3edd2b8b02177c72cc30be0abed
BLAKE2b-256 checksum
How to use checksums
d5909ae1c1861f667021c6a7959cda69558f869239ae68c5f0664eb5633670c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

Release files / hiveqlKernel-1.0.20-py3-none-any.whl

Download URL hiveqlKernel-1.0.20-py3-none-any.whl
Size 28.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
179cb0a8758eec655db86a9d1686e1042aebbc2b5570ee0e140a32458e612e13
BLAKE2b-256 checksum
How to use checksums
16d3226396faf605bcfd5f02eba9b6d8094228fdb1d085f98bac9661890f8223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.0.20 This release

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.5

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page