I am unable to display columns in data table visualization

input {
file {
path => "C:/Users/zondol/data/example.csv.csv"
start_position => "beginning"
sincedb_path => "NUL"

}

}

filter {

    csv {

       separator => ";"

       columns => ["Jan","Feb","March","April"]
    }   

}

output {

elasticsearch{

 hosts => "http://localhost:9200"
 index => "months"
 document_type => "output_input_log"
}


stdout{codec => rubydebug}

}

Seems like it's not parsing your CSV input correctly. Your data looks like it's just one field named message and every line in the CSV is just dumped into that field.

What do you see if you look at the data in Elasticsearch directly, either via the REST api, or even in the Discover tab?

Hi Joe,

Thanks for replying.

Yeah i think you are correct but how can i sort this out, I am new to this.
I want the column names to be months and each column field has a number allocated.

Please see this screenshot if you can help,

Joe ,

Can you please help on this if you can.

I want the column names to be months and each column field has a number allocated.

I think this might be a misunderstanding of how the data model in Elasticsearch works here. Since it's just a document store, you end up structuring your data differently than if this were a relational thing (like SQL, for example). Every column you see in that table maps to a field in your documents, so you'd end up indexing a single document with fields for each month, and a value for each one. But that seems wrong... what you probably want to do it store information with a "month" field and some other field for the value, kind of like this:

{
  "month": "January",
  "value": 1
}

Then you'd let Elasticsearch do its thing and aggregate that into the data you want to look at.

Can you give me some sample of the original CSV data (even if you have to abstract it, I just want to understand the structure and what it means) and tell me what you're trying to visualize here? That would help me explain how you'd index the data and look at it in Kibana.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.