You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Rusty Wright <ru...@gmail.com> on 2009/03/24 17:51:16 UTC

xml data file format?

Where is the documentation for the format of the data file that's used by the  writeDataToDatabase command?  I've looked on
http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.WriteDataToDatabaseCommand.html
and
http://db.apache.org/ddlutils/api/org/apache/ddlutils/task/WriteDataToDatabaseCommand.html
but I can't find it anywhere.  It seems to be cleverly hidden somewhere that I'm not looking.

Re: xml data file format?

Posted by Rusty Wright <ru...@gmail.com>.
Done; DDLUTILS-242 and DDLUTILS-243.

Thomas Dudziak wrote:
> On Tue, Mar 24, 2009 at 9:50 PM, Rusty Wright <ru...@gmail.com> wrote:
>> Thanks; I didn't see that.
>>
>> 1) I still think it would be nice if the format could be documented on the
>> ddlutils web site, obviously in a non-specific way but also with a specific
>> simple example.  It seems to me that it's very similar to DbUnit's
>> non-verbose format so you could use their explanation as a starting point.
> 
> Sure. Could you file a JIRA ticket for that ?
> 
>> 2) The documentation for writeDtdToFile says "This sub task does not require
>> a database connection, so the dataSource sub element of the enclosing task
>> can be omitted." which is incorrect, it does require a connection, and, to
>> split hairs over terminology, it should say "database sub element" instead
>> "dataSource sub element" since the xml tag it's referring to is <database>
>> and not <dataSource>.
> 
> The writeDtdToFile sub task is also available in the ddlToDatabase
> task and I think that task doesn't require a DB connection.
> 
> Tom

Re: xml data file format?

Posted by Thomas Dudziak <to...@gmail.com>.
On Tue, Mar 24, 2009 at 9:50 PM, Rusty Wright <ru...@gmail.com> wrote:
> Thanks; I didn't see that.
>
> 1) I still think it would be nice if the format could be documented on the
> ddlutils web site, obviously in a non-specific way but also with a specific
> simple example.  It seems to me that it's very similar to DbUnit's
> non-verbose format so you could use their explanation as a starting point.

Sure. Could you file a JIRA ticket for that ?

> 2) The documentation for writeDtdToFile says "This sub task does not require
> a database connection, so the dataSource sub element of the enclosing task
> can be omitted." which is incorrect, it does require a connection, and, to
> split hairs over terminology, it should say "database sub element" instead
> "dataSource sub element" since the xml tag it's referring to is <database>
> and not <dataSource>.

The writeDtdToFile sub task is also available in the ddlToDatabase
task and I think that task doesn't require a DB connection.

Tom

Re: xml data file format?

Posted by Rusty Wright <ru...@gmail.com>.
The dbUnit format I'm thinking of is their FlatXmlDataSet;

  http://dbunit.sourceforge.net/components.html

But it's not as similar as I thought, but their description still could provide a starting point.  (I much prefer their XmlDataSet format.)

Re-reading their documentation made me wonder, can you specify nulls with ddlUtils' data file format?


Rusty Wright wrote:
> Thanks; I didn't see that.
> 
> 1) I still think it would be nice if the format could be documented on 
> the ddlutils web site, obviously in a non-specific way but also with a 
> specific simple example.  It seems to me that it's very similar to 
> DbUnit's non-verbose format so you could use their explanation as a 
> starting point.
> 
> 2) The documentation for writeDtdToFile says "This sub task does not 
> require a database connection, so the dataSource sub element of the 
> enclosing task can be omitted." which is incorrect, it does require a 
> connection, and, to split hairs over terminology, it should say 
> "database sub element" instead "dataSource sub element" since the xml 
> tag it's referring to is <database> and not <dataSource>.
> 
> Thanks again.
> 
> 
> Thomas Dudziak wrote:
>> On Tue, Mar 24, 2009 at 1:26 PM, Rusty Wright <ru...@gmail.com> 
>> wrote:
>>
>>> No, sorry, that doesn't help.  I looked again on the torque site and 
>>> can't
>>> find the documentation for the data load file.
>>>
>>> The two urls you gave are for the database schema; I'm asking about 
>>> the data
>>> file where you load data into the database using the writeDataToDatabase
>>> tag, after it's created the tables.
>>>
>>> I managed to figure it out by searching the mailing list archives, 
>>> but it
>>> seems quite odd to me that it's apparently completely undocumented.
>>
>> The format for the data file is not fixed, it depends on the schema.
>> There is an Ant task that will generate a data file DTD for a
>> particular schema:
>>
>> http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.WriteDtdToFileCommand.html 
>>
>>
>> Tom

Re: xml data file format?

Posted by Rusty Wright <ru...@gmail.com>.
Thanks; I didn't see that.

1) I still think it would be nice if the format could be documented on the ddlutils web site, obviously in a non-specific way but also with a specific simple example.  It seems to me that it's very similar to DbUnit's non-verbose format so you could use their explanation as a starting point.

2) The documentation for writeDtdToFile says "This sub task does not require a database connection, so the dataSource sub element of the enclosing task can be omitted." which is incorrect, it does require a connection, and, to split hairs over terminology, it should say "database sub element" instead "dataSource sub element" since the xml tag it's referring to is <database> and not <dataSource>.

Thanks again.


Thomas Dudziak wrote:
> On Tue, Mar 24, 2009 at 1:26 PM, Rusty Wright <ru...@gmail.com> wrote:
> 
>> No, sorry, that doesn't help.  I looked again on the torque site and can't
>> find the documentation for the data load file.
>>
>> The two urls you gave are for the database schema; I'm asking about the data
>> file where you load data into the database using the writeDataToDatabase
>> tag, after it's created the tables.
>>
>> I managed to figure it out by searching the mailing list archives, but it
>> seems quite odd to me that it's apparently completely undocumented.
> 
> The format for the data file is not fixed, it depends on the schema.
> There is an Ant task that will generate a data file DTD for a
> particular schema:
> 
> http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.WriteDtdToFileCommand.html
> 
> Tom

Re: xml data file format?

Posted by Thomas Dudziak <to...@gmail.com>.
On Tue, Mar 24, 2009 at 1:26 PM, Rusty Wright <ru...@gmail.com> wrote:

> No, sorry, that doesn't help.  I looked again on the torque site and can't
> find the documentation for the data load file.
>
> The two urls you gave are for the database schema; I'm asking about the data
> file where you load data into the database using the writeDataToDatabase
> tag, after it's created the tables.
>
> I managed to figure it out by searching the mailing list archives, but it
> seems quite odd to me that it's apparently completely undocumented.

The format for the data file is not fixed, it depends on the schema.
There is an Ant task that will generate a data file DTD for a
particular schema:

http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.WriteDtdToFileCommand.html

Tom

Re: xml data file format?

Posted by Rusty Wright <ru...@gmail.com>.
No, sorry, that doesn't help.  I looked again on the torque site and can't find the documentation for the data load file.

The two urls you gave are for the database schema; I'm asking about the data file where you load data into the database using the writeDataToDatabase tag, after it's created the tables.

I managed to figure it out by searching the mailing list archives, but it seems quite odd to me that it's apparently completely undocumented.


Rijk van Haaften wrote:
> 2009/3/24 Rusty Wright <ru...@gmail.com>:
>> Where is the documentation for the format of the data file that's used by
>> the  writeDataToDatabase command?
> In the menu, I see "The XML schema format", leading to
>     http://db.apache.org/ddlutils/schema/database.dtd.html
> and
>     http://db.apache.org/ddlutils/schema/database.dtd.org.html
> ?
> 
> Moreover, from the documentation on the main page
> (http://db.apache.org/ddlutils/),
> "DdlUtils uses the Turbine XML format, which is shared by Torque and OJB."
> You can look in the documentation of those projects for information about
> the xml format too.
> 
> Does that help enough?
> 
> Rijk van Haaften

Re: xml data file format?

Posted by Rijk van Haaften <r....@gmail.com>.
2009/3/24 Rusty Wright <ru...@gmail.com>:
> Where is the documentation for the format of the data file that's used by
> the  writeDataToDatabase command?
In the menu, I see "The XML schema format", leading to
    http://db.apache.org/ddlutils/schema/database.dtd.html
and
    http://db.apache.org/ddlutils/schema/database.dtd.org.html
?

Moreover, from the documentation on the main page
(http://db.apache.org/ddlutils/),
"DdlUtils uses the Turbine XML format, which is shared by Torque and OJB."
You can look in the documentation of those projects for information about
the xml format too.

Does that help enough?

Rijk van Haaften