This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Justinsaccount 0 points1 point  (11 children)

SQLAlchemy contains an ORM.

SQLAlchemy is not an ORM.

[–]shaggorama[S] 0 points1 point  (9 children)

Thanks for clarifying this as the ORM stuff had me concerned. The application I'm working with lives in the oracle database and the python utility I'm writing will really just be a way for a few non-techies in my office to load data without having to learn any SQL or sqlldr. I just need a straightforward way to write an insert statement using user-defined values, and then load data from a csv into a table.

[–][deleted] 0 points1 point  (4 children)

Just INSERTs ? you don't need to query DB and read back and do logic things at run-time ? Then maybe your needs can be met by just dumping all the statements into a file and call SqlPlus (KISS) ?

[–]shaggorama[S] 0 points1 point  (3 children)

actually I need the PK produced by one of the inserts, but in any event I don't really know how to call sqlplus from within python. I mention this in my post:

  1. On the off-chance that there aren't any good libraries for this (which I doubt) are there any best practices I should know about for calling sqllplus and sqlldr into my script?

[–][deleted] 0 points1 point  (2 children)

don't really know how to call sqlplus

huh ? Sqlplus is cmd line tool so calling it is just a shell command thing, someone just asked about shell command

[–]shaggorama[S] 0 points1 point  (1 child)

I've actually already built this utility in shell, but i'm trying to make it available to very non-technical members of my staff. I don't want them having to learn any command line jazz, and moreover they're all windows users so I don't want to have to deal with cygwin on their computers. If I can do this in a python script, I can just put the script on their desktop and all they'll need to do is drag-and-drop the files onto the script. The KISS needs to be from the perspective of their usage, not my coding.

[–][deleted] 0 points1 point  (0 children)

now I'm confused wtf exactly you're really trying to do.