Merge data and metadata csv file in logstash

When a translate filter loads a csv it only uses the first two columns.

[Treatment] is incorrect because in your dissect filter you are mapping [message], when you probably meant to map [@metadata][match].

If you change the metadata csv to be

Sample,Treatment,Code
S4444003,T_7896_D3;G10
S4444004,T_4516_D0t1h;G01

using semi-colon as the separator for the second and third columns you could use

dissect { mapping => { "[@metadata][match]" => "%{Treatment};%{Code}" } }

This thread discusses other options.