Re: [cx-oracle-users] Help with fetchraw
Brought to you by:
atuining
From: Leith P. <lei...@gm...> - 2005-05-14 02:48:40
|
Hi Chris, No worries. We have a very similair setup at work, transferring summarised data from oracle into MySQL. Depending on the database you are transferring too, couldnt you set a trigger, inserting NULL (eg, a python None from Oracle) into the table generates an empty string? Failing that, subclassing cx_Oracles cursor object to return a the empty string when the column type is textual and the value is null might be another option. Good luck, Leith On 5/13/05, Chris Dunscombe <cdu...@ya...> wrote: > Leith, >=20 > I didn't mention that for 1) the target table is in a separate database a= nd using database links > isn't an option (although I wish it was) due to reasons that are too leng= thy to go into here. > Hence PL/SQL isn't really viable. So I'd still like to look at cursor.fe= tchraw() >=20 > Now for 2) you maybe right that PL/SQL could be used but I'll still have = to write out to file > using Python as util_file can only write to files that the database serve= r can "see" which isn't > always the case for my app. >=20 > Thanks for the idea, >=20 > Chris >=20 >=20 > --- Leith Parkin <lei...@gm...> wrote: > > This sounds like something better done in PL/SQL? > > > > Regards, > > > > Leith > > On 5/13/05, Chris Dunscombe <cdu...@ya...> wrote: > > > I'm looking to use cursor.fetchraw to help improve performance in an = app I'm writing. I've > > looked > > > at CopyData from cx_OracleTools but I'm afraid I couldn't work it out= . > > > If possible I'd like a simple full example to show me the way. The co= ntext is: > > > > > > 1) Retrieve rows from source table and insert into a target table whi= ch has exactly the same > > > structure. > > > > > > 2) Retrieve rows from source table, add some column formatting and wr= ite out to a file. > > > > > > Thanks very much, > > > > > > Chris Dunscombe > > > > > > PS Thanks for all the input re my previous posting on Nulls and None.= I've still got some > > thinking > > > and work to do on which is best for performance and how best to cope = with different datatypes, > > > particularly Longs (what a pain they are!!) > > > > > > __________________________________ > > > Yahoo! Mail Mobile > > > Take Yahoo! Mail with you! Check email on your mobile phone. > > > http://mobile.yahoo.com/learn/mail > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by Oracle Space Sweepstakes > > > Want to be the first software developer in space? > > > Enter now for the Oracle Space Sweepstakes! > > > http://ads.osdn.com/?ad_id=3D7393&alloc_id=3D16281&op=3Dclick > > > _______________________________________________ > > > cx-oracle-users mailing list > > > cx-...@li... > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by Oracle Space Sweepstakes > > Want to be the first software developer in space? > > Enter now for the Oracle Space Sweepstakes! > > http://ads.osdn.com/?ad_ids93&alloc_id=16281&op=3Dclick > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > >=20 > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=3D7393&alloc_id=3D16281&op=3Dclick > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |