Custom Task W/ Runtime User Interaction

Sep 14, 2007



I've been playing around with building custom components for SSIS. I've been doing workflow for years (using Java and Oracle). The company I worked for had a framework for publishing data that allowed for user interaction. That's something I'd love to be able to do in SSIS.

Is it possible to create a custom task that interacts with the user at runtime? So, the user starts the SSIS package. At some point, the process pops up a dialog (Windows Form) that asks the user to set a date using a calendar control.

Any thoughts?

View 4 Replies


ADVERTISEMENT

Custom Task + Connection Manager With Interaction To Visual Studio

Dec 18, 2007



Hi

I am running into issues with custom objects interaction with visual studio 2005.

1. Custom connection manager.
I am setting the name of the connection manager ( to standardize naming convention ) that user created, however when the CM is created, the name displayed in visual studio is still the default name even if the real name is the one i set. I have to do things like, edit it or save package - close - reopen, create another connection, ... etc in order to get it refreshed.

2. Custom Task
I am managing some variables in this custom task so that I will be adding and deleting variables in the package.
The challenge i am running into is, when I added 2 variables for example, even though the variables are successfully added to package, the Variable Window in visual studio designer will not reflect the new variables. I have to save package, close, and re-open in order for the variables to show up.

So this brings to my question - is there any way to tell Visual Studio programmatically to refresh the contents of these 2 sections, 1 is the Variable Window and the other is the panel containing the list of connection managers.

I have been searching around and found some clue about visual studio SDK but I still cannot find an exact way of doing it. Visual Studio SDK example tells you how you can access the Variable window as

framesList = new List<IVsWindowFrame>();

toolWindowNames = new List<string>();

// Get the UI Shell service

IVsUIShell uiShell = (IVsUIShell)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsUIShell));

// Get the tool windows enumerator

IEnumWindowFrames windowEnumerator;

ErrorHandler.ThrowOnFailure(uiShell.GetToolWindowEnum(out windowEnumerator));



IVsWindowFrame[] frame = new IVsWindowFrame[1];

uint fetched = 0;

int hr = VsConstants.S_OK;

// Note that we get S_FALSE when there is no more item, so only loop while we are getting S_OK

while (hr == VsConstants.S_OK)

{

// For each tool window, add it to the list

hr = windowEnumerator.Next(1, frame, out fetched);

ErrorHandler.ThrowOnFailure(hr);

if (fetched == 1)

{

// We successfully retrieved a window frame, update our lists

string caption = (string)GetProperty(frame[0], (int)__VSFPROPID.VSFPROPID_Caption);

toolWindowNames.Add(caption);

framesList.Add(frame[0]);



}

}

But i looked up the methods for IVsWindowFrame and it does not have anything to refresh the contents of the frame.

I thought about firing events but cannot find which one to fire.

Any help on this will be greatly appreciated.

Terry

View 14 Replies View Related

User Interaction In DTS

Jun 5, 2003

Does anyone know how you can write a script in DTS to ask the user for data through a prompt e.g. a date range?

View 7 Replies View Related

User Interaction With SQL

Jul 23, 2005

I am a Windows admin who knows how to administer SQL server, but I don'thave any experience in creating a data interface so that regular users, whodon't know anything about SQL commands, can manipulate the data.Any good books or suggestions? Basically I want to be able to createsomething possibly by users using a web browser. I have some Perl scriptingexperience if that helps.Thanks,CJ

View 2 Replies View Related

Transactions - With User Interaction

Aug 30, 2001

Hi folks

I have a complex tree control, which should allow a 'power' user to modify/add/delete information to a database. To simplify coding, I want to make any changes immediately, but within a transaction.

For example:
Begin transaction
Do some changes
Commit transaction

The idea is, at the end of the edit session, the 'power' user then clicks Save or Cancel. I can then commit or rollback as necessary. Sounds easy!

Whilst this is going on, I want other users to be able to read the same tables that are potentially being updated.

I find that the updates are written immediately to the database - rather than being stored in a temporary area. Hence, other users see these changes directly.

I also find that other users cannot always read the tables, as they are locked out pending the updates from the 'power' user. (This works for the first 4 or 5 reads, and then fails intermittently.)

I know this functionality works in Oracle, but the SQL Server documentation suggests this is simply not a supported function.

Any ideas/comments would be appreciated.

Thanks - Jen

View 1 Replies View Related

Data Flow Task Interaction Confusion

Oct 11, 2007

Hi everyone,
I have a question related to data flow task's block. Lets say i have a problem to solve that consist of 5 major transformation steps and each transformation step ends with a Result set, this result set of Step1 is required by Step2 and the Result set of step2 is required by 3 ....

now i can solve the the problem inside a single "data flow task" block but this is not my aim, since this is not clean aproach specially if the calculation and transformation requires a lof of task so since i would like to solve the problem in differnt block depending on the complexity and logic of the problem.

My Question is how can I pass Result set of a "data flow task" block from step a to the "data flow task" Block of Step B in the Controll flow view(tab) , i tried connecting both blocks as in the dataflow view(tab) by my connections does not show any metadata informations which mean the do not contains any afaik.



thanks in Advance
e. Yassine

View 11 Replies View Related

How To Configure A Dataflow Task Having A Runtime Source Table Name And A Runtime Destination Table Name

Apr 18, 2008

Hi,

I am having a Data flow task in For each loop which will gets 100 sourcetable names and 100 target table names...

am having a simpleData flow task which trasferes from OLEDBSource to OLEDBDestination.
I am repeating the Dataflow task which transfers from sourcetablename extracted from for loop to a destination table var.

The problem am gettting is for the first table it is able to transfer correcly because I did mapping for those tables at design time...but for the next coming sourcetable-desttable (which r having different no of cols,datatypes) its giving Validation failed...and...needs to refresh metadata....

is there any way to refresh the metadata of Data flow task (I set the property of OLEDBSource validate external meta to false then also same error is coming)

Thanks
Radhika

View 4 Replies View Related

Custom Task - Custom Property Expression

Aug 16, 2006

I am writing a custom task that has some custom properties. I would like to parameterize these properties i.e. read from a varaible, so I can change these variables from a config file during runtime.

I read the documentation and it says if we set the ExpressionType to CPET_NOTIFY, it should work, but it does not seem to work. Not sure if I am missing anything. Can someone please help me?

This is what I did in the custom task

customProperty.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;

In the Editor of my custom task, under custom properties section, I expected a button with 3 dots, to click & pop-up so we can specify the expression or at least so it evaluates the variables if we give @[User::VaraibleName]

Any help on this will be very much appreciated.

Thanks

View 3 Replies View Related

Disabling A Task At Runtime

Oct 1, 2007

Hi all,

Here is my situation. I need to disable a task at runtime. I have a script task that configures a boolean variable at runtime and sets its value to either true or false based on a condition. And also i have already set "disable" property of the component to get value from the boolean variable. The problem here is that the component gets the default value which we give during variable creation instead of getting the configured value.

Am i missing out anything. thanks in advance.



Regards,
Praveen

View 12 Replies View Related

Disable And Enable A Task At RunTime In SSIS

Apr 24, 2008



Hi,

I have a package with 3 different tasks.
Like:

1. Execute Sql Task
2. Execute Sql Task
3. Execute Sql Task
4. Execute Sql Task

ESQL1 will get max(id) from table and then based on the ID the remaining needs to be work.

Ex:
If the ID=AUS-Sdy-1
then ESQL2 will update the tbl1 and return one IDkey based on this return key the ESQL3 will
update a tbl2. ----------*( i want to disable ESQL4)
else
If the ID=AUS-Sdy-2
then ESQL3 will update the tbl1 and return one IDkey based on this return key the ESQL4 will
update a tbl2. ----------- *(i want to disable ESQL2)


Thanks
Thiru

View 5 Replies View Related

Is Task.WaitForMe Property Ignored By SSIS Runtime?

Mar 24, 2007

Can the WaitForMe Task property be used for building eventing based tasks (that is, "tasks with no defined execution lifecycle"), as Haselden's IS book terms it?

The SSIS run-time would appear to never interrogate this property.
I tried setting a breakpoint in a custom task on the WaitForMe
property. The breakpoint was never hit at run-time. Design-time only. It seems that the run-time ignores this property.


The documentation states that "On completion of any task, the runtime examines tasks that are still running in
the container, and if any of these tasks have WaitForMe set to
false, those tasks will be canceled." Well, the tasks with WaitForMe set to false are in fact not cancelled (e.g. System::CancelEvent is not signalled).


The intention of the WaitForMe Task property is to allow for event based tasks to not prevent a package (or other container) from finishing if the event never happens.

Tasks like the WMI Event Watcher, Message QueueTask set to receive, and third party tasks like file watchers, or service broker queue receivers would seem to fall in this category.

View 8 Replies View Related

Data Flow Task Is What In Microsoft.sqlserver.dts.runtime

Mar 3, 2006

when using the microsoft.sqlserver.dts.runtime to create packages programatically....

what object represents a data flow task?

View 1 Replies View Related

Unable To Reference Dts.Runtime.Wrapper From Script Task

May 11, 2007

Hi,



I am currently trying to create a Script Task which reads in a file containing meta-data which then dynamically creates a Flat File Connection Manager and configures it using this meta data. After perusing various newsgroups and articles, it seems that I need to be able to reference the Dts.Runtime.Wrapper to do this. I have tried using the Add Reference dialog, but it does not contain a reference to this namespace. I can reference this namespace from a "Script Component" but I am unable to reference it from a "Script Task". Is this a known issue or am I just not doing something correctly? If anyone could give me any pointers it would be greatly appreciated. Thanks!



Michael

View 7 Replies View Related

Dynamically Changing Web Service Task Parameters At Runtime?...

Aug 15, 2005

Okay, this one might stump you guys.

View 3 Replies View Related

Dynamic Filtering By User At Runtime?

Feb 3, 2008



I have a project where there are millions of records. For sake of example, let's use the White Pages.

One of the reports my client wants generated is a contact list. The contact list contains name, address, city, state, zip, phone, and several other key data elements.

Naturally, the client wants to be able to sort on each of those elements (easy to do.)

They also want to be able to filter the resultset the report shows, dynamically, at runtime (not so easy, I'm finding).

So, for example, one person may want to run the report and have the results only show people in PA. Another person may run a report and show all the people who are in Boston, MA. Yet another person may want everyone with the last name of "Smith".

Ultimately, the client wants to be able to filter results by virtually every day field displayed on the report (and some fields which are not!)

I've dug around the documentation for Reporting Services, and I readily admit I am a newbie. I cannot see any way to dynamically filter the resultset used to generate the report, other than using "Report Parameters".

The problem with Report Parameters, from what I can tell, is they also require me to have scalar expressions in a WHERE clause in the dataset. So, for example, if I wanted to let people filter on lastname, I would need a "WHERE LASTNAME LIKE @LastNameReportParameter" -- which works ok, as long as the parameter isn't null, of course, so I really have to do something like 'WHERE LastName LIKE ISNULL(@LastNameReportParameter, '%')"

With, literally, a dozen different fields on this report, I don't see where that is a real option -- I literally have to program a WHERE clause that has a dozen elements, some of which are numeric (not alpha), and thus LIKE doesn't work (AGE = 37) unless I get into completed gyrations (WHERE ISNULL(CAST(AGE AS VARCHAR), '') LIKE ISNULL(@AgeParameter, '%')

This seems to be incredibly complicated, and I cannot imagine there isn't an easier way to allow users to filter the resultsets on the reports generated by Report Server. Is there something I am missing?

Also, it has to be something I can address programatically, since the client wants a fairly 'seamless' front end (in C#) where users can simply click a radio button (to select a field to filter by) and type in a value (to filter on) prior to displaying the report in a reportviewer control.

Is there a way to dynamically program a filter expression and pass it to the report server, something akin to a filter expression on a BindingSource?


Any thoughts on this matter would be helpful, or pointers to online documentation, as I'm sort of out of ideas and cannot find anything in the docs. Thanks!

View 6 Replies View Related

Runtime Errors In Send Mail Task - Properties With Expressions Failing

Nov 26, 2005

I'm programmatically loading a package that was created with VS 2005. The last task in the package is a Send Mail Task. It has two properties, FileAttachments and ToLine, which are set to expressions whose values come directly from package variables. The package runs in debug and non-debug (under VS) correctly.

View 3 Replies View Related

Integration Services :: SSIS Script Task - Adding Dataset File To Runtime Folder

Aug 17, 2015

I have an SSIS script task using c#. i need to refere an .xsd dataset in the c# code. i tried to set property below.Build action to Content or Compile Copy to output directory Copy always But still i m unable to use the dataset in my code.

View 4 Replies View Related

DTS Custom Task

Jul 5, 2002

I've created a custom task in VB6 and compiled the DLL. wHen I run the task in DTS designer as a step it runs ok, however when I try to exectue the whole package nothing happens??

View 1 Replies View Related

SSIS Custom Task

Nov 19, 2007

Hi there,
I'm still pretty new to SSIS, what I am really battling with is getting a custom task to work.
I have developed a custom task, digitally signed it added it to the Global Assembly Cache, written the UI for it - Pretty much as it is done here: http://technet.microsoft.com/en-us/library/ms136080.aspx
but my problem is that when I drag it from the tool box into the control flow pane, I get this message: "The task user interface specified by type name 'XXXXXXXXXXXXXXXXXXX' could not be loaded.
(Microsoft.DatatransformationServices.Design).

Does anybody have an idea of what I am doing wrong here?


Duane.

View 2 Replies View Related

Custom Task Deployment

Nov 20, 2006

Hello All,

We have developed some custom tasks which we currently deploy the standard way. That is, we install the custom task assemblies in the DTSTasks folder and we also install the assemblies in the GAC. Due to some deployment practices we are trying to implement we would like to be able to remove the assemblies from the GAC and install them in some other location. I have tried installing the assemblies in the DTSBinn folder, but this does not appear to be working. When I drop the custom control flow tasks onto the package's control flow tab I get the "Cannot create a task with the name ..." error.

Is it possible to not have the custom task assemblies in the GAC? Are there any tricks to getting it to work?

FYI, our assemblies are signed. I'm not sure if that has anything to do with our troubles.

Thanks,

Rob

View 4 Replies View Related

Custom Task UI And Propertygrid

Jan 27, 2008

Hi,

Had anyone code a custom task UI and used the propertygrid like most of the SSIS components do?

I am having an issue while trying to get the connections from my UI FORM.

They way i did was to get the parent of the form (The package) and then get the connections but that will only work for the FORM if i use the property from the properties panel i throws an error because obviously i dont have the FORM neither the parent...

I now i should use the service provider and get the IDTSconnection... but somehow it always comes = "Nothing"....

Regards

View 13 Replies View Related

Cannot Create A Custom Task

Apr 23, 2007

I've gone through all the steps, and when I finally drag the custom task I've made into the control flow, I get the error

"Failed to create the task. ... Cannot create a task with the name "SSISExportToExcel.ExcelExport.ExcelExport, SSISExcelExport, ... Verify the name is correct"

Here's the beginning of my class... any help would be appreciated...


Namespace ExcelExport
<DtsTask(DisplayName:="Excel Export Task", _
Description:="Exports a SQL query results to an Excel Document")> _
Public Class ExcelExport
Inherits Task
....

View 11 Replies View Related

Referencing A CLR DLL In A Custom Task

Jul 24, 2006

Is there a way you can reference a prebuilt CLR function in a custom dataflow task?

The CLR and the custom dataflow task are one in the same. The reason that I'm designing the custom task is that I find that it's time consuming to make a call to the database to retrieve a function to work on something that's already in memory. Also, another reason is that if the code needs to be updated, it doesn't have to be done in 2 places allowing for less confusion.

I tried adding a reference to the CLR function in my SSIS dataflow task, but when I try running it in SSIS, I get the error saying it cannot use a SQL CLR defined task in the package which I believe is due to this reference in the CLR code:

[Microsoft.SqlServer.Server.SqlFunction]
public static string toCase(string text, string caseType)

Is there a way to circumvent the [...SqlFunction] line of code when the DLL is referenced by an SSIS dataflow task, or do I just have to deal with having 2 copies of the same code?

Thanks in advance!

View 1 Replies View Related

Custom Task Deployment

Mar 19, 2007

Hi all,

I'm having a nightmare trying to test my custom task.

I get the following error message when trying to add the task from the toolbox...



Cannot create a task with the name "myTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b8e53511af163eb7". Verify that the name is correct.
(Package)

------------------------------
Program Location:

at Microsoft.SqlServer.Dts.Runtime.Executables.Add(String moniker)
at Microsoft.DataTransformationServices.Design.DtsBasePackageDesigner.CreateExecutable(String moniker, IDTSSequence container, String name)



Any ideas?

Cheers.

View 4 Replies View Related

Help - DTS Custom Task To Handle Job Failuer

Feb 4, 2005

I need to find a better way to handle DTS Job Failure issue. Currently, we have about 50 jobs which executed through DTS packages. Everytime when sources were not there or came in late, the DTS sent out an email to my page which I carried every day. Some those came in during the holidays even though I know the source party won’t generate the source files at that day.

Trying to avoid to get beep everytime when job was failed. Someone suggested that it is possible to add kind of executable file within the Custom task and let it trigger the DTS packages. If, for example, a holiday then don’t run the package so I won’t get the page.

Any hints suggestions would be greatly appreciated

J827

View 5 Replies View Related

Problem Updating A Custom Task

May 24, 2007

I've created a custom task, and now I want to upgrade it. There's actually no change in the task itself, but I've changed the assembly version number, and now I need to upgrade all the tasks that reference the old version number.

So I rebuilt the task, and I created a policy assembly with a bindingRedirect that forwards to my new assembly. I removed the old version of the assembly from the GAC. All good so far - I've even run the task through the debugger, I open the package as "Reload with Upgrade", and the breakpoints in my CanUpdate, Update and Version overrides are being hit fine. This approach works fine in my custom pipeline components, and the PerformUpgrade override updates the UserComponentTypeName to reflect the new assembly version number (see Milen's post in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=893641&SiteID=1).

But the task itself won't upgrade, or at least, it seems to require the old assembly version number. I get an error message:




Code SnippetThe task with the name "My Task" and the creation name "xx.xxx.MyTask, xxx.xxx, Version=0.1.0.0, Culture=neutral, PublicKeyToken=xxxx" is not registered for use on this computer.



Has anyone got any ideas what I'm doing wrong? I've got 40 or so packages with 2 tasks in each, and I don't really want to have to delete and add them to each one ...

View 2 Replies View Related

I Am Getting The Error When I Installed Custom Task

Mar 19, 2008

i am getting below error when i installed custom task

Cannot create a task with the name "Application.SendMail, SendMail, Version=4.2.0.400, Culture=neutral, PublicKeyToken=bf6c37fa78f5a648". Verify that the name is correct.
(Package2)
Please help me

View 5 Replies View Related

Implementing A Custom Task UI Problem...

Jan 23, 2008



Hello,

Anyone experienced in creating custom tasks?

I am currently having problems while trying to use a UI form within my task.

This is the way i am coding it:

In the same project i have two classes and one Form: A CustomTaskExample, a CustomTaskExampleUI and a CustomTaskForm

Class: CustomTaskExample



Code Snippet
< FONT>"CustomTaskExample", _
UITypeName:="CustomTaskExampleUI," & _
"Version=1.0.0.0,Culture=Neutral," & _
"PublicKeyToken=b853fe59589b971f", _
TaskType:="PackageControl", _
TaskContact:="CustomTaskExample; Testing", _
RequiredProductLevel:=DTSProductLevel.Enterprise)> _
....




Class: CustomTaskExampleUI



Code Snippet
Public Function GetView() As ContainerControl _
Implements IDtsTaskUI.GetView


Return New CustomTaskForm(Me.taskHost, Me.connections)

End Function


When i try to drag the task to a new Package i get the following error:

TITLE: Microsoft Visual Studio
------------------------------
Failed to create the task.
------------------------------
ADDITIONAL INFORMATION:
The task user interface specified by type name 'CustomTaskExampleUI,Version=1.0.0.0,Culture=Neutral,PublicKeyToken=b853fe59589b971f' could not be loaded. (Microsoft.DataTransformationServices.Design)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.762&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=CouldNotLoadTaskUIForType&LinkId=20476
------------------------------
The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) (mscorlib)
------------------------------
BUTTONS:
OK
------------------------------


What am i doing wrong?

Regards


<>

View 6 Replies View Related

Unpivot Or Custom Script Task?

Feb 18, 2008

Hi there,

I have an issue that feels like it requires an Unpivot task, but I'm struggling to visualise the best way to do it. I'd be grateful for any advice on this.


I have this dataset in my pipeline











moduleid
startdate
modenddate




Revenue
MonthsOnModule

800091
05/09/2007
30/12/2007
150
3

800094
05/09/2007
30/11/2007
148
2

800095
05/09/2007
30/12/2007
300
3


Basically, each module has a start date and an end date. Therefore, with a simple datediff, we can get to MonthsOnModule.

Each module attracts an amount of revenue, which need to be allocated equally to each month over which the module runs.

In the example above, Module 800091 lasts 3 months, generates £150 revenue, so in September 2007, it attracts £50, in October 2007 It attracts £50, In November 2007 it attracts £50.

I'm using this package to populate a fact table in an OLAP Data Warehouse. The destination table needs to hold the data like this:










moduleid
Month
value

800091
200709
50

800091
200710
50

800091
200711
50

800094
200709
74

800094
200710
74

800095
200709
100

800095
200710
100

800095
200711
100


Now that looks like a pretty straight unpivot, but in order to unpivot, you have to have columns to unpivot into rows. In this case, I would need one column for each month that the module lasted. Modules can last any number of months. Some last 40 months, and there is no reason why one couldn't last 100 months or more.

I just can't really seem to visualise my approach to this transform. Anyone got any ideas?

Thank you


View 3 Replies View Related

Custom SSIS Task Deployment

Oct 4, 2006

I've written several custom Control Flow and Data Flow components for SSIS. I'm trying to deploy a new Control Flow Task, however it will not show up in the "Choose Toolbox Items" window.

I have my dll's all in the right place. Because of other painful issues we have not used the GAC, and instead have put our DLL's that are referenced in the following directory: C:program filesMicrosoft SQL Server90DTSBinn. This has worked fine for other custom tasks, but not for this one.

The only things that are different about this transform are the following:

1. Not only does the task inherit from Task, it also implements two interfaces that I wrote.

2. One of the assembly references is actualy an executable instead of a dll. This is unusual, but I've done it with other .NET projects and not had any trouble.

I could move the code I need from the EXE out to a DLL. If somebody knows what could be causing this please respond?

View 4 Replies View Related

Errors With Custom Task (Could Not Get Value For Property ...)

Jul 5, 2007

I wrote a custom task following the outline on MSDN. I signed it and installed it into the Tasks folder and in the GAC.

When I go to an SSIS project and add my task, the properties window shows "Could not get value for property 'd61935d9-430b-4c93-9f3e-a29f720d8659'. Specified cast is not valid." (where the guid is different obviously) for many of the properties.

What have I done wrong?

Update: I know this isn't my code because I tried a simple task that just returns success and doesn't do anything. I get the exact same errors, so I must be installing it incorrectly.

View 3 Replies View Related

Selecting Connection In Custom Task UI

Nov 2, 2005

Hi there,

View 1 Replies View Related

Mmc.exe Application Error When Deleting DTS Custom Task

Aug 28, 2001

Hi,

I made my own DTS custom task with Visual Basic 6.0.
The DTS custom task work but when i delete it from the DTS package
a mmc.exe application error occur about written memory.

I trie an other DTS custom task that i dowloaded from this site, the
same error occur.

My SQL Server version is the 7.0 with Service Pack 1.

Many thank's for advance

Stephane

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved