Share via

Columns needed after Aggregate Function

neilsja 141 Reputation points
2021-07-29T09:40:52.88+00:00

Hi All

I have flat file of financial data that is on a .csv file.

I have had to group the data by: CompanyID, EmployeeID and JournalAccount using the aggregate function. I am using the sum on Journal Net of Total Adjusted Reclaim Tax and Report Entry Tax Reclaim Trans Adjusted Amount

That is working great but I have a number of other columns I need to output to the export file, but it seems when using an aggregate function, you are limited to just those columns, which means I cannot do a corrected output file.

Initial Import File:
Employee ID
Company
Lakeview Journal
CORP C/CARD
Journal Account Code
Report Name
Journal Net of Total Adjusted Reclaim Tax
Report Entry Tax Reclaim Trans Adjusted Amount
Report Entry Expense Type Name
Report Entry Description

After the aggregate, the only columns I can output are:
EmployeeID
Company
JournalAccount
Journal Net of Total Adjusted Reclaim Tax
Report Entry Tax Reclaim Trans Adjusted Amount

SQL Server Integration Services
0 comments No comments

Answer accepted by question author

neilsja 141 Reputation points
2021-08-04T15:13:39.683+00:00

I resolved the issue by moving the data in to a SQL table, and then manipulated the data as required and pushed it to a flat file.

Thank you for the help.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. ZoeHui-MSFT 41,551 Reputation points
    2021-07-30T07:03:22.3+00:00

    Hi @neilsja ,

    Why not add the other data columns first and then use Aggregate Transformation.

    Regards,

    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October

    Was this answer helpful?

    0 comments No comments

  2. Ryan Abbey 1,186 Reputation points
    2021-07-29T23:23:50.02+00:00

    Do a merge join post aggregation to bring the other columns back in

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.