Solved

custom execute sql ssis task

Posted on 2014-03-13
7
712 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Closing Comment

by:MRS
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Glad I could help!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In couple weeks ago, I encountered an extremely difficult problem while deploying 2008 SSIS packages to a new environment (SQL Server 2014 standard).  My scenario is: We have one C# application that is calling 2008R2 SSIS packages to load text fi…
Here's a requirements document template for an integration project (also known as Extract-Transform-Load or ETL) based on my development experience as an SQL Server Information Services (SSIS) developer over the years.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now