0

I am trying to create a new field during indexing however the fields become columns instead of values when i try to concat. What am i doing wrong ? I have looked in the docs and seems according ..

Would appreciate some help on this.

e.g.

.csv file

**Header1**, **Header2**
  Value1   ,121244

transform.config

[test_transformstanza]
SOURCE_KEY = fields:Header1,Header2
REGEX =^(\w+\s+)(\d+)
FORMAT = 
testresult::$1.$2  
WRITE_META = true

fields.config

[testresult]
INDEXED = True

The regex is good, creates two groups from the data, but why is it creating a new field instead of assigning the value to result?. If i was to do ... testresult::$1 or testresult::$2 it works fine, but when concatenating it creates multiple headers with the value as headername. Is there an easier way to concat fields , e.g. if you have a csv file with header names can you just not refer to the header names? (i know how to do these using calculated fields but want to do it during indexing)

Thanks

Mark
  • 11
  • 3
  • The `REGEX` value doesn't match your example data. Perhaps it's a typo, but `REGEX = ^(\w+)\s+,(\d+)` would match better and would omit the trailing spaces from Value1. Also, the `FORMAT` setting should be on a single line. – RichG Dec 23 '18 at 18:03
  • Sorry made mistake in my post. But the regex works, selects two groups. If i flip though the assigment $1 and $2 it shows the correct values. .... :[ – Mark Dec 23 '18 at 18:29

0 Answers0