Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

parse copy.out output as plain text?

 
   Database Forums (Home) -> Ingres RSS
Next:  SIS: Lets talk about geospatial vs geodetic  
Author Message
Zhiliang Hu

External


Since: Aug 22, 2008
Posts: 4



(Msg. 1) Posted: Fri Aug 22, 2008 7:04 pm
Post subject: parse copy.out output as plain text?
Archived from groups: comp>databases>ingres (more info?)

I wish to parse out an Ingres data copy (with sql db_name < copy.out
> file; where "copy.out" is generated with "copydb" command). I
wonder could someone advice what's the delimiter and line breaks used
in such Ingres copy
file, so I can write a perl script to convert data into plain text
file?

I see irregular "^A" and spaces but can't match up where the line
breaks should be, or tell what they are. Or the unix terminal is
fooling my eyes Wink

Thanks in advance!

Zhiliang

 >> Stay informed about: parse copy.out output as plain text? 
Back to top
Login to vote
ghingres

External


Since: Mar 04, 2005
Posts: 11



(Msg. 2) Posted: Sun Aug 24, 2008 11:38 am
Post subject: Re: parse copy.out output as plain text? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Zhiliang

You should use the copydb command with a -c switch. This way you
will have an open format file (tab delimited) which is easy to parse.
Read the "command & reference" guide for the copydb command and the
SQL guide (copy statement) for figuring out what the copy.out file
contains (and the text file it builds - especially varchar types
etc..)

Hope this helps.

Gary

 >> Stay informed about: parse copy.out output as plain text? 
Back to top
Login to vote
Zhiliang Hu

External


Since: Aug 22, 2008
Posts: 4



(Msg. 3) Posted: Thu Aug 28, 2008 1:42 pm
Post subject: Re: parse copy.out output as plain text? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 24, 1:38 pm, ghing....TakeThisOut@yahoo.co.uk wrote:
> HiZhiliang
>
> You should use the copydb command with a -c switch. This way you
> will have an open format file (tab delimited) which is easy to parse.
> Read the "command & reference" guide for the copydb command and the
> SQL guide (copy statement) for figuring out what the copy.out file
> contains (and the text file it builds - especially varchar types
> etc..)
>
> Hope this helps.
>
> Gary

Thanks Gary, that is useful.
However in our case we only have a backup copy from a time point that
were saved with copydb without -c switch, and I wish to recover data
out of it by parsing it out. I know another way might be that I can
create a temporary db and load it with copy.in script, then export
again ...

Zhiliang
 >> Stay informed about: parse copy.out output as plain text? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Problem with copy.in - I am trying to reload some data that I exported with a modified copy.out script. But I get the following error: E_US14E4 Invalid options have been specified for a non fast-load COPY. Invalid options are: FILLFACTOR, MINPAGES, MAXPAGES,..

[Info-ingres] Try this copy in - Hi Everyone, Try this simple copy in....Be warned this may crash your server, so only do on a test installation you are prepared to have downtime on. createdb bowtest sql bowtest << SQLEND create table copy_test( an_int integer not null not defa...

Copy table options ? - Hello, where can I find a reference manual for "COPY TABLE" which lists all possible options ? Is it possible to retrieve the column names on the first row of the output file ? Thanks

[Info-ingres] Huge copy out/in - Hi guys, I'm still working of my iietab problem from a few days ago. My table copy out finally finished after 51 hours. Now I'd like to copy in (fast copy) and although it does create an entry in the transaction log, I need to avoid a log loopback...

copy and refresh the errlog.log while ingres is up - I would like to be able to, on a weekly basis, copy out the errlog.log to errlog.log.yyyy.mm.dd and refresh the errlog.log. Is there a safe way to do this without crashing ingres ? I'm a beginner when it comes to Unix commands. Could I: cp errlog.log...
   Database Forums (Home) -> Ingres All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]