As usual when replying from here, replies prefixed with PM:
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
> > (as well as ascii text files) to PostgreSQL. I'm open to
> suggestions if
> > anyone feels there are improvements worth making....
>
> Firstly I have to say its a great bit of work (pgAdmin),
Thanks...
> however it'd be
> nice to see an open source tool mirroring the functionality
> of the DTS. I
> especially liked the way you could script the mappings
> between fields, as
> well as the GUI builder for complex transforms (in fact I
> absolutely loved
> that (when it worked :), I had too long on the beta). As well
> as being able
> to use pre- and post- conditional actions upon
> success/failure of certain
> parts, like emailing, calling other programs etc.
Thats an interesting idea. What exactly do you script though? Things
like
(pseudo-code of course):
If SOURCETYPE = "AutoNumber" Then DESTTYPE = "int4" DESTDEFAULT = "nextval('record_id')" EXECSQL "CREATE SEQUENCE
record_id"
End If
or have I got the wrong end of the stick completely?
PM: -------------
The scripting is used to convert one or more columns in the source into
a single column in the destination. You have one for each column.
ie:
Source Destination
id ---copy---> id
date -\________\ datetime
time -/
name ---copy---> name
The copy bits aren't scripted but the middle one is.
Here, there's a script handling the conversion of date & time into a
single value.
I have a case of this here, where I use DTS to run dumpacl on our domain
controllers to return the security logs, and pipes the output through a
transform into a table. NT Events have two fields for the date, but I
need one, so the script for the above case is:
Function Main()DTSDestination("datetime") = DTSSource("date")+"
"+DTSSource("time")Main = DTSTransformStat_OK
End Function
Now that was a little bit of VB Script, but it could easily be Perl,
Javascript etc.