ELK/elasticsearch
python + bulk + insert + code
파아랑새
2019. 4. 24. 17:10
from elasticsearch import helpers, Elasticsearch
import csv
es = Elasticsearch(hosts="192.168.2.10")
with open(r"C:\Users\user\Desktop\comm_kkc.csv") as f:
reader = csv.DictReader(f)
helpers.bulk(es, reader, index="tb_frip_srch_tour", doc_type="doc")
f.close()