blob: 743902084e6d48f9382719ee80afa822e9852fe5 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001import itertools
2import string
3import json
4from datetime import datetime
5from elasticsearch import Elasticsearch
6import elasticsearch
7import elasticsearch.helpers
8from elasticsearch.client import IndicesClient
9import sys, os
10
11def readFileToJson(fileName):
12 print "read file ", fileName
13 fo=open(fileName)
14 try:
15 json_mapping=json.load(fo)
16 fo.close()
17 except ValueError:
18 print "error in reading file " , fileName
19 fo.close()
20 raise
21 return json_mapping