Click here to Skip to main content
15,885,278 members
Articles / Operating Systems / Windows
Article

UI architecture for managing DTS packages

,
Rate me:
Please Sign up or sign in to vote.
4.42/5 (7 votes)
3 Aug 20058 min read 71.9K   33   5
This articles details a UI architecture for managing DTS packages.

Problem Description

Many organizations rely heavily upon the data sent by their vendors/customers/branches for planning purposes. Organizations depend on various templates for capturing day today operational and other business related data. This data most often is stored and shared in MS Excel/flat file/ CSV formats. The templates specify the format of the Excel files/flat files/ CSV files and the required fields, the data types, etc. that should be in the file. Most often, an automated Report Generator (using Data Transformation Services) is employed to process these files and give the required analysis output to, say, the business stake holders. The system is supposed to work perfectly every time but it rarely happens, the Excel files/flat files/CSV files do not adhere to the data mapping specifications, resulting in processing failures by the automated Report Generator. The common errors observed are:

  • Filenames of the MS Excel spreadsheets are not in conformance with the specifications.
  • Worksheet names within the MS Excel files are not in compliance with the specifications.
  • Date fields are not uniform (clients/branches use different date formats).
  • Data in one or more of the mandatory fields are absent or partially filled.
  • Data mismatches occur within fields (E.g. Numeric fields contain string data).

The Report Generator will naturally raise an error when it encounters these small exceptions as it is not configured to monitor and manage them. The process stops and modifications to the input data have to be made manually for the process to resume. This greatly reduces the efficiency of an automated process. Ironically, the automated system now involves intensive manual error-detection and correction. This seemingly time-saving automated process now becomes a time-consuming one, involving the intervention of a development team to find out the errors and rectifying them. In a real business scenario, new clients/branches are being added to the list all the time. The Report Generator has to be configured to process the data from the new clients as well, thus involving development team intervention again.

Manipulating the input files or adding/modifying client details involves working with Data Transformation Services (DTS) which can be efficiently performed only by Database Administrators and seasoned professionals. Instead, a new system can be introduced wherein a normal user can work on it and make the same changes on the DTS packages without actually working directly on the DTS packages. This increases the overall operational ease and the efficiency of the report generation process.

Proposed Solution Design

The process would be a lot more streamlined if the development team is almost entirely bypassed and the operations team is able to handle these situations. A person from the operations team can be given control of the proposed system, which will consist of a User Interface (UI) that works directly on top of the Data Transformation Services (DTS). The UI will facilitate indirect handling of the DTS packages without having to go through the hassles of manual creation/modification of the DTS design. This makes the report generation system more user-friendly and controllable. The main aim of the UI is to achieve the following:

  • Decrease the Turnaround Time
  • Cost reduction
  • Increase the overall maintainability
  • Increase operational ease

On successful implementation, the operations team will be able to easily handle the various report generation processes greatly minimizing the need for developer intervention. Efficiency of the system is considerably increased as it removes the involvement of an external team to manage and troubleshoot it. This, in turn, brings down the cost involved as the number of teams working on it has been cut down.

Solution Description - General

The UI can be designed using the Active Template Library (ATL) custom task basic template provided by Microsoft. Active Template Library is a set of template classes provided by Microsoft that allows the programmer to build Component Object Models (COM) that can be invoked programmatically. The time taken to write COM components is greatly reduced if the ATL framework is used. The objects that are built using ATL include a whole array of controls like Web controls, property pages, dialog boxes, etc.

The ATL provides a way to create User Interfaces for any custom Data Transformation Service (DTS) tasks that are created. This will give direct access to the DTS packages and enables easy manipulation and addition of Data Pump tasks to the existing packages. The Operations Team will be working on the UI, providing it with the required data such as Client/Branch details, file name/worksheet name changes, ignore/discard inconsistent data, etc. The following diagrams show the proposed solution in action:

Image 1

Currently (see diagram above), the Development Team plays a vital role in maintaining the automated system. Even minor modifications have to be performed by them, hence resulting in increased turnaround time and cost. The proposed system (see following diagram) almost completely eliminates Development Team intervention, thus removing the delay. The Operations Team monitors and manages the process and has complete control over the troubleshooting too. They can specify the changes that have to be performed on the DTS and the UI will accomplish it using the COM component designed using the ATL.

Image 2

UI – Details

The following diagram shows the functions that the UI allows to be performed without the intervention of the development team. The operations team will control the UI and provide inputs to it for performing tasks like adding/modifying client/branch details, changing the file names, ignoring/discarding unnecessary data, etc.

Image 3

Technologies that can be used

The proposed UI can be built with VB/ASP/C# or ASP.NET using the MS Excel Object Model/ Active Template Library (ATL). Visual Studio .NET 2003 can be used for this project development.

Techniques to achieve the solution

Technique 1

This solution makes use of the Active Template Library (ATL) and the Excel Object Model (EOM). The ATL is used for the creation of UI-based custom DTS tasks while the EOM is used for the creation of components performing direct MS Excel file manipulation. The ATL-based component acts as an interface between the Operations Team and the DTS package, while the EOM-based component forms part of the former, performing the required corrections/additions to the Excel files.

Active Template Library (ATL)

The Active Template Library helps in the creation of custom DTS tasks which are UI-based. The custom task framework is designed using the TaskUISupp and UserIF class files. Users can provide inputs to these custom tasks and indirectly create or modify new data pumps. This process almost completely eliminates the intervention by the Development Team.

MS Excel Object Model

Using MS Excel Object Model (Visual Studio tools for the MS Office System), components can be designed to manipulate MS Excel files. The Object Model provides several objects such as:

  • Application Object
  • Workbook Object
  • Worksheet Object
  • Range Object

These objects can be used to manipulate Excel files. Filenames can be altered, worksheets within the MS Excel file can be changed, Date formats can be changed, data can be removed or added to existing fields in the worksheet, etc.

Technique 2

Another feasible solution would be to directly handle Package Events from Visual Studio .NET using C#. The CustomTaskUI method (referenced from Microsoft.SQLServer.DTSPkg80.dll) can be employed for this purpose. This solution will result in an UI which works directly with the Package events and can be used for complex Package event handling. The EOM model will be employed in this solution for Excel file manipulation.

Technique 3

Another feasible solution would be to employ the use of a Stored Procedure to create new data pumps in existing DTS packages. The Operations Team will feed the Client’s details into the UI and this will then be stored into a table in the database. After this, the Stored Procedure will be called from the UI and it will use those details for creating/modifying the data pumps. Again, an EOM-component is incorporated into the solution for Excel File Manipulation.

Comparison of Techniques

Technique 1 involves the design of two separate components - the ATL and EOM-component, thus requiring more development time. Nevertheless, this model is highly modularized, hence, easily maintainable.

Technique 2 involves the design of only the EOM-Component with the UI and the Package-handling components incorporated into it. This is an ideal solution with an efficient and quick implementation, but may require minor Development Team intervention.

Technique 3 is similar to technique 2 with the exception that the system interacts with stored procedures to handle packages. After implementation, the Development Team may still be required to collaborate with the system in case of failed stored procedure executions. It follows a very direct way of handling the DTS packages as the stored procedures work directly on them, thus removing the need for indirect code-level manipulation of packages.

Conclusion

This solution will serve as a very good utility that can be used by the organizations facing problems managing their periodic reporting needs. In addition to the operational ease that it brings to the teams, it also reduces the turnaround time and achieves cost reduction involved in the maintenance of the reporting process. It will be a highly efficient supplement to the already existing Report Generator System in the sense that, the amount of manual intervention is dramatically brought down, hence, resulting in a truly automated system. Developer intervention may still be needed, but only at times when core components need to be modified or added. Security will not be compromised as all the three techniques discussed can be made to strictly enforce security policies. To conclude, this solution will greatly aid in converting the existing system into a failure-free, highly-manageable, time & cost-saving and an easily operable automated system.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
Narayana Rao Surapaneni is a Microsoft Certified Solution Developer for .NET, Microsoft Certified Solution Developer and a Sun Certified Java Professional.

He has received international acclaim for authoring dozens of industry papers on .NET and other Microsoft technologies for leading web sites and magazines. He is on the panel of contributors for IT magazine.

He has delivered many public seminars on the .NET framework, C#, web services, Service Oriented architecture and ASP.NET. Surapaneni lead Microsoft.NET & Web Services Center of Excellence.

His priorities include:

• Track technology/product releases
• Develop a strategy for each specific technology/product
• Develop methodologies/frameworks
• Develop prototypes and proof-of-concepts
• Microsoft.NET Framework 2.0/ASP.NET 2.0/ VS.NET 2005
• Integration and collaboration services
• Web Services and Service Oriented Orchitectures

He is the co-author of the following books:

1. Java & .NET: A Developer Guide to Interoperability and Migration (ISBN: 81-203-2444-7, http://www.prenticehallindia.com/)

2. Migrating to .Net: A Pragmatic Path to Visual Basic .Net, Visual C++ .Net and ASP .Net (ISBN: 0-13-100962-1, www.amazon.com)

3. Microsoft.NET Tutorial for beginners
(http://download.microsoft.com/download/8/e/7/8e725d96-7ec3-498b-9fa7-86779aed101f/dotNET%20Tutorial%20for%20Beginners.pdf)


Narayana Rao Surapaneni is a recipient of the world wide Most Valuable Professional Award by Microsoft (2002-2004). He was also awarded the Asia Most Valuable Professional by Microsoft. He is one of the charter members of MCSD.NET

When it comes to the suggesting a solution he emphasizes on the importance of well thought architectures and design principles. It is no surprise that many clients see him as the person whom they can approach to arrive at a right technology solution!

Written By
Web Developer
United States United States
Pradeep Rathinamuthu is a Microsoft certified Solution Developer and a CompTIA A+ Certified Associate. He has worked on numerous projects that involved developing, maintaining and implementing applications in VB, C++ and C#. He is currently working as a Programmer Analyst at the Microsoft.NET Center of Excellence at Ramco Systems Corporation, San Jose, CA. His current focus is on analyzing and developing solutions using the cutting-edge Dot Net technologies. Pradeep holds an MS in Computer Science from Illinois Institute of Technology, Chicago.

Comments and Discussions

 
GeneralGood work Pin
sreejith ss nair25-Sep-05 23:04
sreejith ss nair25-Sep-05 23:04 
Questionwhich DLL the DTS refers to manipulate the excel file? Pin
hustsay2312-Sep-05 18:05
hustsay2312-Sep-05 18:05 
QuestionWhy ATL and EMO?? Pin
jpazgier11-Aug-05 2:31
jpazgier11-Aug-05 2:31 
AnswerRe: Why ATL and EMO?? Pin
Narayana Rao Surapaneni16-Aug-05 10:02
Narayana Rao Surapaneni16-Aug-05 10:02 
GeneralRe: Why ATL and EMO?? Pin
jpazgier27-Jan-06 0:15
jpazgier27-Jan-06 0:15 
You can use any .Net language but inside DTS package in ActiveX script, if you would like to use it, you have to use old VB. Currently in new SQL 2005 SSIS which replaced DTS you can use any .Net language inside package and as I noticed you can do almost everything with your data and even modify package functionality inside it based on data. SSIS is also very very fast.

jpazgier

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.