Aggregator Totals Mismatch
Posted: Fri May 04, 2007 6:11 am
Hi
Im pretty sure that this has been discussed before, but my searches arent showing any threads.
Im trying to aggregate a flat file column that has 8000+ records. This column is defined as FLOAT. (Business expects data with variable number of digits after decimal point).
The source data is a delimited ASCII file.
The data sample that I have could well be handled by DECIMAL(15,2), but due to the said constraint , i need to define it as FLOAT data. None of the input records has data that contains more than 2 digits after the decimal point.(When seen using an OS Editor or Data browser)
However if I sum up this column using the aggregator stage, the output sum contains 4 digits after the decimal point. ( Again i define the 'sum' column as FLOAT). Now the user group comes back to me and says precision is important, and those 2 extra digits in the sum are a cause for concern. Is there anything that i could do to avoid/bypass this problem?
Im pretty sure that this has been discussed before, but my searches arent showing any threads.
Im trying to aggregate a flat file column that has 8000+ records. This column is defined as FLOAT. (Business expects data with variable number of digits after decimal point).
The source data is a delimited ASCII file.
The data sample that I have could well be handled by DECIMAL(15,2), but due to the said constraint , i need to define it as FLOAT data. None of the input records has data that contains more than 2 digits after the decimal point.(When seen using an OS Editor or Data browser)
However if I sum up this column using the aggregator stage, the output sum contains 4 digits after the decimal point. ( Again i define the 'sum' column as FLOAT). Now the user group comes back to me and says precision is important, and those 2 extra digits in the sum are a cause for concern. Is there anything that i could do to avoid/bypass this problem?