I have this Field "dAList" : "8~275273~273586~1687~20181209|23~2660000~2660000~0~20181209"
each part separated by "|" is a Da Number i want to split it first to display for example Da_1,Da_2 inside the dAList and the values separated by "~" to be nested inside each Da number for example:
dAList is separated to other fields
and each filed has DA_1 {
DA_a : 8
DA_b : 275273
DA_c : 273586
DA_d : 1687
DA_e : 20181209
}
DA_2{
DA_ID: 23
etc
}
I tried to use this ruby filter but gave me exception
ruby {
code => "
event['DAnumbers'] = event['dAList'].split('|').collect { |t|
c = t.split '~'
{
'DA_ID' => c[0],
'DA_Before' => c[1],
'DA_After' => c[2],
'DA_Change' => c[3],
'DA_ExpDate' => c[4],
}
}
"
}
Hello, Thank you so much for your reply! it fixed my problem, I also wanted to how to convert the type of the nested fields like DA_ExpDate to a date type or DA_Before to integer
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.