Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

custom execute sql ssis task

Posted on 2014-03-13
7
729 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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

789 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