You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Dan Tran <da...@hotmail.com> on 2002/12/15 22:32:53 UTC
how to set up torque to fill in initial data
Hi, is there a way to instruct torque to fill some data into DB after
insert-sql call?
Your advice is greatly appreciated.
-Dan
Re: how to set up torque to fill in initial data
Posted by Dan Tran <da...@hotmail.com>.
that is it!!!!!
Thanks
But int the long time, we can have torque's ant build process to add a
<target> for this task which is needed any how every time we recreate
database.
-Dan
----- Original Message -----
From: "Eric Emminger" <er...@ericemminger.com>
To: "Turbine Torque Users List" <tu...@jakarta.apache.org>
Sent: Tuesday, December 17, 2002 12:53 PM
Subject: Re: how to set up torque to fill in initial data
> Dan
>
> > but I am looking for a more automated way.
>
> Maybe you could solve this by simply adding a line in your Ant build
> script to insert-sql your sql file. Would that work?
>
> Eric
>
> --
> Eric Emminger
> eric@ericemminger.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
Re: how to set up torque to fill in initial data
Posted by Eric Emminger <er...@ericemminger.com>.
Dan
> but I am looking for a more automated way.
Maybe you could solve this by simply adding a line in your Ant build
script to insert-sql your sql file. Would that work?
Eric
--
Eric Emminger
eric@ericemminger.com
Re: how to set up torque to fill in initial data
Posted by Dan Tran <da...@hotmail.com>.
Hi Eric, thank you for the response.
Here is my scenario:
1. Use ant to create DB
2. Use ant to create tables via insert-sql
3. Use ant to import initial data for ID_TABLE and other my tables
I am looking for way to do step 3 by using Ant and external data file. Does
torque has
a format to build the external file? In this case it is your suggestion #2.
At this moment, I use my object model to import initial data into my table.
But ID_TABLE
does not have an object and I end up to fill it by hand (via sql script).
The work around is ok for now,
but I am looking for a more automated way.
Your advice is greatly appreciated.
-D
----- Original Message -----
From: "Eric Emminger" <er...@ericemminger.com>
To: "Turbine Torque Users List" <tu...@jakarta.apache.org>
Sent: Monday, December 16, 2002 11:11 AM
Subject: Re: how to set up torque to fill in initial data
> Dan
>
> Are you asking how to import data? I guess it depends on the format of
> your data. Here's a few ideas.
>
> 1. Use insert-sql to insert SQL data files.
> 2. For XML data, use datasql, then insert-sql
> 3. In a Java class, use your object model.
>
> Does that help?
>
> Eric
>
> On Sun, 2002-12-15 at 16:32, Dan Tran wrote:
> > Hi, is there a way to instruct torque to fill some data into DB after
> > insert-sql call?
> >
> > Your advice is greatly appreciated.
> >
> > -Dan
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> --
> Eric Emminger
> eric@ericemminger.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
Re: how to set up torque to fill in initial data
Posted by Eric Emminger <er...@ericemminger.com>.
Dan
Are you asking how to import data? I guess it depends on the format of
your data. Here's a few ideas.
1. Use insert-sql to insert SQL data files.
2. For XML data, use datasql, then insert-sql
3. In a Java class, use your object model.
Does that help?
Eric
On Sun, 2002-12-15 at 16:32, Dan Tran wrote:
> Hi, is there a way to instruct torque to fill some data into DB after
> insert-sql call?
>
> Your advice is greatly appreciated.
>
> -Dan
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Eric Emminger
eric@ericemminger.com