dbTalk Databases Forums  

Re: How to list DataPumpTask source columns collection in ActiveXScript

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: How to list DataPumpTask source columns collection in ActiveXScript in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: How to list DataPumpTask source columns collection in ActiveXScript - 06-06-2005 , 02:03 PM






Remember that each transformation has a SourceColumns property so you
may need to iterate over those also.

Here is some code to get you started

Function Main()

dim tformTask, tform,col

set tformTask =
DTSGlobalVariables.Parent.Tasks("DTSTask_DTSDataPu mpTask_1").CustomTask

FOR EACH tform in tformTask.Transformations
FOR EACH col in tform.SourceColumns
MsgBox col.Name
NEXT
NEXT


Main = DTSTaskExecResult_Success
End Function


Allan




"Rafał J. Dumański" <rafal.dumanski (AT) kruk-inkaso (DOT) com.pl> wrote


Quote:
Hi

I have text file as a source and I need to write a script
(ActiveXScript) which will check
which columns from this input file aren't used in transformations.
I know how to get columns which are used in transformations, but I don't
know
how to get source columns list to compare these two lists and get what I
want.
In "DataPumpTasks" object there is only "DestinationColumnDefinition"
property,
I can't find "SourceColumnDefinition" property.

Is is possible to get DataPumpTask source columns collection?

Thanks,

Rafał J. Dumański


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.