Solved

custom execute sql ssis task

Posted on 2014-03-13
7
725 Views
Last Modified: 2016-02-10
I need to get data from a non ODBC database into SQL for various reporting processes.  The non ODBC database does have a way to query the data via VB.NET code, but my report writer isn't familiar enough with .NET coding to get at the data that way.

I am thinking the best solution is to create an custom "Execute SQL Tasks" for SSIS that others can use to pull data from the proprietary database into SQL to do their work.  

Does anyone have any good example of how to create a custom SSIS task.  Specifically in mimicking the current "Execute SQL Task" that current exists.  Can I inherit directly from that object?

Thanks in advance...
0
Comment
Question by:MRS
  • 4
  • 3
7 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39929072
I wouldn't go down the custom SSIS task road, too much maintenance!  However, you can achieve something similar by using the Script Transformation as Source in a Data Flow.  This allows you to write your code to access the data using either VB.NET or C# and it will work just like any other source in the data flow.

This should help you to get started with it: Creating a Source with the Script Component [TechNet]
0
 

Author Comment

by:MRS
ID: 39929556
Valentino,

Thanks for the reply.  I was looking at that object, but I was concerned that the end users would need to understand C# or VB.NET in order to re-use the component in another SSIS packages.  Can I set up a Script Transformation object with the query as a parameter or something so it could easily be copied and changed?
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 39933682
I was concerned that the end users would need to understand C# or VB.NET in order to re-use the component in another SSIS packages.

Hang on, those "end users", are they technical or business people?  If they are creating SSIS packages I assume they're technical, right?  But just don't have the programming skills?

Can I set up a Script Transformation object with the query as a parameter or something so it could easily be copied and changed?

Sure, that should be possible.  Variable parts such as server names can be passed into the script using the ReadOnlyVariables property.  So your SSIS developers can just copy/paste the component and set up the package variables as expected for the component, they won't need to write .NET code because you've already written it...
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Closing Comment

by:MRS
ID: 39934055
Thanks for all the info.

The end users are "report writers", so they are knowledgeable about writing SQL queries, but don't necessarily have a working knowledge of .NET.  So they know enough to read some code, but not make major changes or start from scratch every time they want to create a new SSIS package.

I will give it a shot with the Scripting Object.  Sounds like that might do the trick...  Knowing that they can just copy it to new SSIS packages once we get it set up should give them what they need.

One last question if you don't mind.  What is the normal result of a process like querying from an out side datasource?  Should I load the resulting data into a temp table for them to work with, or can I return it in memory for them to work with?
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39936198
Should I load the resulting data into a temp table for them to work with, or can I return it in memory for them to work with?

I usually load the data first into a data warehouse which also has a more interesting model for reporting: fact and dimension tables.  But that does take some time to set up.  In your situation it might be sufficient to make the data available in a local SQL Server database without the remodeling.  That should maker it easier for them so use in reports, as connecting to a SQL DB is standard procedure.

Just wondering: are you using SSIS as data source for SSRS? (ref Configuring Reporting Services to Use SSIS Package Data
0
 

Author Comment

by:MRS
ID: 39936626
Not necessarily.  We might go that way in the future, but our more immediate solution will be to generate specific Excel sheet reports, crystal reports, ext...

Thanks again for all the advice.  It was very helpful
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39937131
Glad I could help!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question