I have searched a lot regarding this issue and now I am posting this problem.
here is my configuration file.
input {
file {
path => "/home/Kunden2.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
columns => [
"Kunden_Id",
"Kunden_Gueltig_Ab",
"Kunden_geultig_Bis",
"Kunden_Vorname",
"Kunden_Nachname",
"Kundenname",
"Kunden_Othername",
"Kundenanschrift, Strasse und Hausnummer",
"Kundenanschrift Postleitzahl",
"Kunden_Telephon",
"Kunden_Fax",
"Kundenanschrift Ort",
"Kunden_Arzt_Type",
"Kunden_Gpid",
"IK-NR.: = Instituationskennzeichen",
"Instituationskennzeichen_Activeab",
"Instituationskennzeichen_Activebis"
]
}
mutate {
convert => {
"Kunden_Gueltig_Ab"=> "string"
"Kunden_geultig_Bis"=> "string"
"Instituationskennzeichen_Activeab"=> "string"
"Instituationskennzeichen_Activebis" => "string"
}
}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "Kunden_lexica2"
}
stdout {}
}
I am trying to convert date into string using logstash configuration files. Data loads successfully but the data type is not changing.
I know the other way [map date type manually] like
PUT temp_index2
{
"mappings": {
"doc": {
"properties": {
"Kunden_Id": { "type": "text" },
"Kunden_Gueltig_Ab": { "type": "text" },
"Kunden_geultig_Bis": { "type": "text" },
"Kunden_Vorname": { "type": "text" },
"Kunden_Nachname": { "type": "text" },
"Kundenname": { "type": "text" },
"Kunden_Othername": { "type": "text" },
"Kundenanschrift, Strasse und Hausnummer": { "type": "text" },
"Kundenanschrift Postleitzahl": { "type": "text" },
"Kunden_Telephon": { "type": "text" },
"Kunden_Fax": { "type": "text" },
"Kundenanschrift Ort": { "type": "text" },
"Kunden_Arzt_Type": { "type": "text" },
"Kunden_Gpid": { "type": "text" },
"IK-NR.: = Instituationskennzeichen": { "type": "text" },
"Instituationskennzeichen_Activeab": { "type": "text" },
"Instituationskennzeichen_Activebis": { "type": "text" }
}
}
}
}
Kindly help me out, I want to do it by first method. Thank you in advance