Posts

Showing posts from June, 2019

SSIS - Data profiling Task - Adding custom profile request

Problem: Is there any option to create a custom Profile Request for SSIS Data Profiling Task? At the moment there are 5 standard profile requests under SSIS Data Profiling task: Column Null Ratio Profile Request Column Statistics Profile Request Column Length Distribution Profile Request Column Value Distribution Profile Request Candidate Key Profile Request I need to add another one (Custom one) to get summary of all numeric values. Solution: Based on this  Microsoft Documentation , SSIS Data profiling Task has only 5 main profiles (listed on your question) and there is no option to add a custom profile. For a similar reason, i will create an  Execute SQL Task  to achieve that, you can use the aggregate functions you need and  ISNUMERIC  function in the where clause : SELECT MAX ( CAST ([ Column ] AS BIGINT )) -- Maximum value , MIN ( CAST ([ Column ] AS BIGINT )) -- Minimum value , COUNT ( Column ) -- Count values ...

SSIS - Query a database based on result of query from another database

Image
Problem: I am using SSIS in VS 2013. I need to get a list of IDs from 1 database, and with that list of IDs, I want to query another database, ie  SELECT ... from MySecondDB WHERE ID IN ({list of IDs from MyFirstDB}) Solution: There is 3 Methods to achieve this: 1st method - Using Lookup Transformation First you have to add a  Lookup Transformation  like @TheEsisia answered but there are more requirements: In the Lookup you Have to write the query that contains the ID list  (ex:  SELECT ID From MyFirstDB WHERE ... ) At least you have to select one column from the lookup table These will not filter rows , but this will add values from the second table To filter rows  WHERE ID IN ({list of IDs from MyFirstDB})  you have to do some work in the look up error output  Error case  there are 2 ways: set Error handling to  Ignore Row  so the added columns (from lookup) values will be null , so you have to add a...