Dask connection with Elasticsearch
Project description
dask-elk
Use dask to fetch data from Elasticsearch in parallel by sending the request to each shard separatelly.
Table of Contents
Introduction
The library tries to imitate the functionality of the ES Hadoop plugin for spark. dask-elk
performs a parallel read across all the target indices shards.
In order to achieve that it uses Elasticsearch scrolling mechanism.
Usage
To use the library and read from an index:
from dask_elk.client import DaskElasticClient
# First create a client
client = DaskElasticClient() # localhost Elasticsearch
index = 'my-index'
df = client.read(index=index, doc_type='_doc')
You can even pass a query to push down to elasticsearch, so that any filtering can be done on the Elasticsearch side. Because dask-elk
uses scroll mechanism aggregations are not supported
from dask_elk.client import DaskElasticClient
# First create a client
client = DaskElasticClient() # localhost Elasticsearch
query = {
"query" : {
"term" : { "user" : "kimchy" }
}
}
index = 'my-index'
df = client.read(query=query, index=index, doc_type='_doc')
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
Built Distribution
File details
Details for the file dask_elk-0.4.0.tar.gz
.
File metadata
- Download URL: dask_elk-0.4.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8d858a1fc8071c329c6911567d030c47d208374a5662e5ccdc2830ec3f2a211 |
|
MD5 | 1ad288dc7d312363968f3b88422d9ced |
|
BLAKE2b-256 | 13a676c69efc35506b266f179d3e9d8c5f45ee295c1e5b45438f008a237b0fe6 |
File details
Details for the file dask_elk-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: dask_elk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 264b89348800ce3816e0529675968746e3a1e16db8d92f7795cb785108a8fc5e |
|
MD5 | 5358367e17045295db589f3cfaeaf83e |
|
BLAKE2b-256 | f7e7cc4933f99b62d60d9ce7c4bc2e9b8345057ada4c6f6a339e79d5a953877d |