Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Cannot cast a data profiling task object to DataProfilingTask in SSIS

$
0
0

Hi,

I am trying to programatically execute an SSIS package containing only a single data profiling task. 

var pkg = app.LoadPackage(@"c:\Package.dtsx", null);
                var task = pkg.Executables[0] as TaskHost;
                var dpt = task.InnerObject as DataProfilingTask;

The package is read properly and debugger shows that "task.InnerObject" is an object of DataProfilingTask.

But the dpt variable contains a null value instead.



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>