S2K DTS and Python

Phil Runciman philr at aspexconsulting.co.nz
Wed Jul 11 16:41:53 EDT 2007


                                                  

-----Original Message-----
From: Tim Golden [mailto:mail at timgolden.me.uk] 
Sent: Tuesday, 10 July 2007 7:58 p.m.
Cc: python-list at python.org
Subject: Re: S2K DTS and Python

Phil Runciman wrote:
> I am a Python newbie so please be gentle on me.


Tim Golden replied:
Welcome to Python.

> I have created a program that takes text files within a directory and
it
> successfully parses the information from them to create 3 CSV files.


Tim Golden replied:
Good so far.

> However, I now want to update some tables in MSAccess, and it occurred
> to me that because Sequel Server 2000 DTS can interface with scripting
> languages that maybe I could call my first Python program from within
> DTS and then update the tables using DTS. (I am learning DTS hence the
> idea).


Tim Golden replied:
Unless you *really* wanted to learn DTS (and I don't find it
that useful myself) then simply do this through Python... and
have some fun at the same time :)

> My questions are:
> 
> Has anyone used Python within DTS?


Tim Golden replied:
Haven't, but I wouldn't even try. Unless I were constrained
by some kind of contractual binding, I wouldn't even *start*
using DTS if I could use Python. I find it far too opaque.



Thanks for your welcome Tim. 

I share your views and would much prefer to develop my Python expertise.
:)

However, I am tasked with learning DTS. It is OK, but really lacks
conceptual clarity. IMHO I think it is a bit of a kludge, but better
than nothing. It does get rid of a lot of donkey-work even if its
diagrams are more of an aide-de-memoir than anything else. 
 




























> Am I off the wall trying such a thing?

No, but I think it's easier to use the csv module, pyodbc [1]
and either code the SQL directly, which is what I tend to do, or
use one of the several SQL-ORM-style wrappers around: SQLObject[2],
sqlalchemy[3] and its friend Elixir[4], or the newly-advertised
Storm[5] from Canonical.

Feel free to post back with questions or progress.

TJG

[1] http://pyodbc.sf.net
[2] http://www.sqlobject.org/
[3] http://sqlalchemy.org
[4] http://elixir.ematia.de/
[5] https://storm.canonical.com/




More information about the Python-list mailing list