Search code examples
ssisdynamics-crmdata-migrationkingswaysoft

How to merge source rows using SSIS Kingswaysoft without using a temp table


I have a source table with multiple rows of data but with no header row. I need to migrate this data to D365 CRM as two entities; A header entity and the corresponding content/rows entity.

Is there any way to create the header entity in Kingswaysoft / SSIS where the header would represent all the rows with the same batch number and their total payment?

Preferably without a temp table? (If its not possible without a temp table).

Thanks in advance!!!

This is what i get when i add the multicast: enter image description here

What do I do here? there are no options.

Sample Data This is the SQL I wrote to merge the rows.

SELECT [business]
  ,[payment]
  ,[batch],
   SUM(CASE WHEN payment >= 0  THEN payment ELSE 0 END) pay,
   SUM(CASE WHEN payment >= 420  THEN 21.72 ELSE 0 END) 
   TransactionAmount1,
   SUM(CASE WHEN payment <= 299.99 AND payment >= 260 THEN 15.35 ELSE 0 
   END) TransactionAmount2,

   FROM [Payments]
   Group By batch, business_num

Solution

  • This is what your data flow will look like:

    enter image description here

    In the aggregate group by batch,business and sum(payments). There is no need to create a headerID. Batch is your link.