csv-elasticsearch
v1.1.3
Published
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blueviolet.svg)](http://unlicense.org/) [![Version](https://img.shields.io/npm/v/csv-elasticsearch.svg)](https://npmjs.org/package/csv-elasticsearch) [![CodeQL](https://github.com/rap2h
Downloads
13
Readme
Csv ElasticSearch
Import a CSV file into ElasticSearch.
Installation
npm i --save csv-elasticsearch
# or
yarn add csv-elasticsearch
Usage
You need a CSV file and ElasticSearch.
import { importCsv } from "csv-elasticsearch";
import { Client } from "@elastic/elasticsearch";
(async () => {
const result = await importCsv({
client: new Client({ node: "http://localhost:9200" }),
index: "my_index",
filePath: "./data.csv",
});
console.log(result);
})();