Hello,
I'm trying to parse all the columns of a CSV file (except the first one, obviously).
The plugin only get the second column as result of the filter.
All the other column are ignored.
It should be possible, according to this sentence getting from the documentation :
When using a CSV dictionary, multiple values in the translation must be extracted with another filter e.g. Dissect or KV. Note that the
fallback
is a string so on no match the fallback setting needs to formatted so that a filter can extract the multiple values to the correct fields.
Here is my logstash code :
translate {
field => "idBatch"
dictionary_path => "D:\idBatch-description.csv"
refresh_interval => 500
destination => "donneesDictionnaireExterne"
# Données par défaut en l'absence de correspondance
fallback => "Aucune correspondance trouvée,10000"
add_tag => [ "import_CSV_ok"]
}
# Mapper des données du dictionnaire externe
dissect {
mapping => {
"donneesDictionnaireExterne" => "%{descriptionBatch},%{maxDuration}"
# EXEMPLE pour GAR01B0 : Batch d'injection Archive;86408
}
}
Here is a sample of my CSV file :
"GDA08A0_SupPdc","Batch de Suppression de PDC","9999"
"GDI01A0_Parsing","Moteur de parsing des etats internes","9999"
Does anyone know why it doesn't work ?
Edit : this is how it's supposed to be
"GDA08A0_SupPdc","Batch de Suppression de PDC"|"9999"
"GDI01A0_Parsing","Moteur de parsing des etats internes"|"9999"
or
"GDA08A0_SupPdc","Batch de Suppression de PDC";"9999"
"GDI01A0_Parsing","Moteur de parsing des etats internes";"9999"