xml data file format?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

xml data file format?

Rusty Wright-2
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.
Reply | Threaded
Open this post in threaded view
|

Re: xml data file format?

Rijk van Haaften
2009/3/24 Rusty Wright <[hidden email]>:
> 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
Reply | Threaded
Open this post in threaded view
|

Re: xml data file format?

Rusty Wright-2
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 <[hidden email]>:
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: xml data file format?

Thomas Dudziak
On Tue, Mar 24, 2009 at 1:26 PM, Rusty Wright <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: xml data file format?

Rusty Wright-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: xml data file format?

Rusty Wright-2
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 <[hidden email]>
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: xml data file format?

Thomas Dudziak
In reply to this post by Rusty Wright-2
On Tue, Mar 24, 2009 at 9:50 PM, Rusty Wright <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: xml data file format?

Rusty Wright-2
Done; DDLUTILS-242 and DDLUTILS-243.

Thomas Dudziak wrote:

> On Tue, Mar 24, 2009 at 9:50 PM, Rusty Wright <[hidden email]> 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