filterdml Ant Wrapper - Generate DML from Ant


Return to main dbmstools documentation page.


filterdml-ant is a wrapper script to enable filterdml to be executed as a task in Apache ant (a Java build tool - if that means nothing to you, you can safely skip this section). It works in tandem with the Jython Ant task provided with dbmstools, which provides much more functionality than the standard Ant script task.

See the filterdml page for further details.


As with all the Ant wrappers, this script uses Jython. See the installation page for details of the requirements to get any of the Ant tasks working.

You must also taskdef the Jython task somewhere in your build script (or in something it includes).

Build Script should be executed using the jython task mentioned above. It requires that the script attribute be set to dbmstoolsjar/

<jython script="dbmstoolsjar/">

The script supports the following arguments:

Argument Example Details
dmlFilePath ${db.scripts.dir}/testdata.xml The path to the DML script to use as input. Mandatory
outputDir ${output.dir}/${ddl.scripts.dir} Directory where DDL scripts should be created. Mandatory
dbmsList postgres8, oracle CSV list of DBMS's for which to generate scripts. Mandatory, must contain at least one entry
utf8 Y If set, DML is read and written as UTF-8 unicode. Optional, defaults to 'N' (which outputs as ISO-8859-1, aka Latin 1).


<jython script="dbmstoolsjar/">
    <argument name="dmlFilePath" value="test/data/insertTestData.xml"/>
    <argument name="outputDir" value="${output-dir}"/>
    <argument name="dbmsList" value="oracle, postgres8, mssql"/>