Compare
The compare tag is used to compare events from different event files that contain related data. Such as the event file from writing data to a service and the event file from reading that same data from the service. There has to be a way to relate the data from both event files, either with a sequence id, record id, etc. Once you're able to identify that two events are relevant to the same data then you can use the validate child tag of compare to validate what needs to be similar or equal in order for these two events to be correct.

Be aware that this tag is still experimental and is going to suffer some changes soon. These will be focused on making the tag more efficient but may require more drastic changes to the way the tag is used.

Children Tags
query . where . validate
Usage Examples
Example #1
<compare>
   
<query cursor="c1" event="write.event" uri="storage://OUTPUT/compare_write_data.txt">
      
<select>
         
<field name="recordid" />
         
<field name="data" />
      
</select>
   
</query>
   
<query cursor="c2" event="read.event" uri="storage://OUTPUT/compare_read_data.txt">
      
<select>
         
<field name="recordid" />
         
<field name="data" />
      
</select>
   
</query>
   
<where>
      
<eq op1="${c1.recordid}" op2="${c2.recordid}" />
   
</where>
   
<validate>
      
<assert>
         
<eq op1="${c1.data}" op2="${c2.data}" />
      
</assert>
   
</validate>
</compare>
Example #2
<compare>
   
<query cursor="c1" event="write.event" uri="storage://OUTPUT/read_data.txt" />
   
<validate>
      
<if>
         
<neq op1="${c1.data}" op2="${dtf.stream(random,${c1.size},${c1.recordid})}" />
         
<then>
            
<log level="warn">
                Data was not equal!!! For recordid [${recordid}]
                
</log>
         
</then>
      
</if>
   
</validate>
</compare>