Apache Druid querying client library
Project description
Apache Druid Query Library
A simple library for creating and executing queries with Apache Druid.
Usage
SQL Queries
from druid_query import Client
from druid_query.queries import Sql
client = Client(sql_endpoint='localhost:8082/druid/v2/sql/')
query = Sql('SELECT * FROM wikipedia LIMIT 10')
result = client.execute(query)
print(result)
Native Queries
from druid_query import Client
from druid_query.components import *
from druid_query.queries import Timeseries
client = Client(native_endpoint='localhost:8082/druid/v2/')
query = Timeseries('wikipedia', [intervals.Interval('2015-09-11', '2015-09-13')], granularities.Period('PT2H'), aggregations=[aggregations.Count('num_records')])
result = client.execute(client, query)
print(result)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
druid_query-0.1.0.tar.gz
(8.8 kB
view details)
Built Distribution
File details
Details for the file druid_query-0.1.0.tar.gz
.
File metadata
- Download URL: druid_query-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69761c3312d2ad76a926a5f2a24b882131b5c7907567dd45362b07e3ac0c819d |
|
MD5 | 18c7f2d9f0da123f8a6d5289ce846628 |
|
BLAKE2b-256 | 93929c0156613b055827676fcbdd6e727b0e23e9a2c5518f62ae0f8d9a92f19d |
File details
Details for the file druid_query-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: druid_query-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d23d803a8dd498d01ecbb1a70268730d26d29172cd75f2d2a0b425fac6ed36e9 |
|
MD5 | 52c73ad22e5fd0068d55fd64e5a8e131 |
|
BLAKE2b-256 | 84302e31b75f5e7dd09317c009530f9d97a40404ba7f0cb3ec8d500f3fe336c3 |