0

I'm trying to upload some csv files in elastic search. I don't want to mess it up , so I'm writing for some guidance. Can someone help with a video/tutorial/documentation , of how to index a document in elastic search? I've read the official documentation, but I feel a bit lost as a begginer. It will be fine If you'll recommend me a video tutorial , or you'll describe me some steps. Hope you are all doing well! Thank you for your time !

1 Answer 1

1

The best way is to use Logstash, which is official and very fast pipeline for elastic ,you can download it from here

First of all create a configuration file as below example and save it as logstashExample.conf in bin directory of logstash. With assuming that elastic server and kibana console are up and running , run the configuration file with this command "./logstash -f logstashExample.conf" .

I've also added a suitable example of related configuration file for Logstash , please change the index name in output and your file path in input with respect of your need, you can also disable filtering by removing csv components in below example.

input {
  file {
    path => "/home/timo/bitcoin-data/*.csv"
    start_position => "beginning"
   sincedb_path => "/dev/null"
  }
}
filter {
  csv {
      separator => ","
#Date,Open,High,Low,Close,Volume (BTC),Volume (Currency),Weighted Price
     columns => ["Date","Open","High","Low","Close","Volume (BTC)", "Volume (Currency)" ,"Weighted Price"]
  }
}
output {
   elasticsearch {
     hosts => "http://localhost:9200"
     index => "bitcoin-prices"
  }
stdout {}
}

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.