jDbSync jDBSync
Core Tasks

SourceForge.net Logo

Compare task

This task is used to compare two XML files which have been exported with Export task.

This task creates another XML file with missing data. To create SQLs from this file <createSql> task should be used.

Java class is org.chur.ant.db.jdbsynch.compare.CompareTask

Parameters

Attribute nameDescriptionRequiredDefault
pattern xml file which is used as pattern in comparison Yes – 
compareTo xml file which is used to compare. Yes – 
out XML file with differencies between "pattern" and "compareTo". Yes – 

Examples

<taskdef name="compare" classname="org.chur.ant.db.jdbsynch.compare.CompareTask"/>
<compare
	pattern="ideal.xml"
	compareTo="wrong.xml"
	out="suspicious.xml"/>
			

Where:

  • ideal.xml - data from database DB1 which we want to have in another database (DB2)
  • wrong.xml - data which currently present in database DB2
  • suspicious.xml - missing in database DB2 data

Compare two exported data sets and save data which should be added/updated/inserted into database.