Solved

custom execute sql ssis task

Posted on 2014-03-13
7
718 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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.

895 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

15 Experts available now in Live!

Get 1:1 Help Now