<arc:set attr="db.driver" value="cdata.jdbc.mysql.MySQLDriver" />
<arc:set attr="db.conn" value="jdbc:cdata:mysql:server=localhost;port=3306;database=sakila;user=root;password=Password123;"/>
<arc:set attr="db.query" value="SELECT * FROM `film` WHERE rating = @max_rating"/>
<arc:set attr="db.paramname#1" value="max_rating" />
<arc:set attr="db.paramvalue#1" value="PG-13" />
<arc:call op="dbQuery" in="db" out="results" >
<!-- optional logging step to see the output of the query in the application log -->
<arc:set attr="_log.info" value="[results.*]" />
<!-- setting the data of each output file to be the description of the film -->
<arc:set attr="output.data" value="[results.db:description]" />
<!-- setting the output filename to be the title of each film -->
<arc:set attr="output.filename" value="[results.db:title].txt" />
<arc:push item="output" />
</arc:call>