Showing posts with label transform. Show all posts
Showing posts with label transform. Show all posts

Monday, March 19, 2012

Aggregator Transform bug or feature

Hi,

I have two input columns (both DT_I4) in a column collection to a Aggregator transform. Now I am doing a group by to one and Count to another column.

To my surprise the output's column datatype is changed for Count Transform (DT_UI8) and I have to put extra Data Conversion Transfrom to get my DT_I4 datatype back.

Is this a bug or feature.

Dharmbir

Dharmbir wrote:

Hi,

I have two input columns (both DT_I4) in a column collection to a Aggregator transform. Now I am doing a group by to one and Count to another column.

To my surprise the output's column datatype is changed for Count Transform (DT_UI8) and I have to put extra Data Conversion Transfrom to get my DT_I4 datatype back.

Is this a bug or feature.

Dharmbir

Feature. The aggregated columns are "new" to the dataflow, and a count can't be negative so they use the unsigned-integer datatype. I know, I hate it too, but that's the way it goes.

Saturday, February 25, 2012

Aggragate transform with "WHERE" condition

Hello, I am new in SSIS.

I have to Load a table with aggregate data, I can do it using Aggragate transformation, but other the "GROUP BY" I need to make a filter on input records with "WHERE" condition.

In TSQL it should be:

SELECT col1, SUM(col2) FROM T

GROUP BY col1

WHERE col3 = value.

But in SSIS ?

How can I do it?

Thank

If it is in the Where clause and not Having, I would just place the Where in the Data Source that feeds into the Aggregate Transformation.|||

I need more details... I dont know if I understood...

You can add the where condition in your SQL statment in the datasource, or you can use the ConditionSplit transform to filter the data... you more other options...

give more details...

helped?

regards

|||Use a conditional split before the aggregation to filter your data.|||

csi_hugh wrote:

If it is in the Where clause and not Having, I would just place the Where in the Data Source that feeds into the Aggregate Transformation.

So would I. If you have the option to, always filter the data at source rather than use a Conditional Split.

-Jamie