Closed lyeesim988 closed 6 years ago
i have the same issue, I was debugging my conf, but in many case it will load the second row as the header. it is weird that if i add "convert" function, it alwasy messed up headers.
I've learned this from another thread, this is because the race issue for multiple workers. currently the workaround is to set "pipeline.workers: 1" in logstash.yml, it works for me.
It seems that when you have multiple workers, the order of lines could not be guaranteed, definitely this is a bug.
Hi siben168,
Thank you very much. By setting the worker value to 1 has solved my issue.
Duplicate of #65
in case you don't have a logstash.yml
, create a new one in settings/logstash.yml
and paste this inside: pipeline.workers: 1
Reference: https://www.elastic.co/guide/en/logstash/6.3/logstash-settings-file.html
Duplicate, closing.
autodetect_column_name for csv plugin not able to take first row of csv file as header, instead it takes the second row of data as the header. The first run it managed to get the first row as header but if continue with another few times of re-run, the second row of data values are taken as header.
Version: Logstash 6.2.3
Operating System: CentOs
Config File: input { file { path => "/home/data/file.csv" start_position => "beginning" sincedb_path => "/dev/null" } } filter { csv { separator => "," autodetect_column_names => "true" }
Sample Data: "manhatten" : "california" desired output: "city": " california"
Steps to Reproduce:
Similar issues: https://discuss.elastic.co/t/autodetect-columns-from-header-row-csv-ingest/92861 https://discuss.elastic.co/t/autodetect-column-is-taking-data-row-as-column-name-instead-of-header/126383