Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: stonysmithAdd a filter and paste in the code below. It should do what you need.
Explaining this code will take a bit of doing. It uses a feature of brainscript called DO OUTPUT where you can write out any number of output records from each input record. Please check the Help files for more information.
#########
f1 = 'Field1'.split("�") #convert to array
f2 = 'Field2'.split("�") #convert to array
oField1="" #initial value
oField2="" #initial value
output 1 { #dummy output statement
emit oField1
emit oField2
where false #must be false
}
i=0 #setup loop counter
while i < len(f1) { #step thru items of the array
oField1 = f1.getItem(i)
oField2 = f2.getItem(i)
do output 1 { #output one record for each item of the array
emit oField1
emit oField2
}
i=i+1 #index the loop
}