Skip to content

Instantly share code, notes, and snippets.

View maozza's full-sized avatar

Maoz Zadok maozza

View GitHub Profile
@maozza
maozza / elasticsearch2csv.py
Last active December 26, 2017 15:51
Tool for exporting elasticsearch query to CSV file assumption: the response document is not multidimensional(nested) document. it will execute elasticsearch query_string, for example query_string: this AND that OR thus
#!/usr/bin/python3
import elasticsearch
import argparse
import csv
from elasticsearch import helpers
import json
'''
Tool for exporting elasticsearch query to CSV file
assumption: the response document is not multidimensional(nested) document.