SSIS Aggregate ADO Net source into SQL Server database

Solution for SSIS Aggregate ADO Net source into SQL Server database
is Given Below:

I have an ADO .Net source that I’m attempting to insert a summary of the number of rows by date.

The source table has over a billion rows. I just want to summarize rowcount for the current month.

This query produces the output I want. What is the best approach to insert the 2 columns into the SQL Server database?

SELECT
    g.[ActivityDate], COUNT(*) RecCount
FROM 
    [lab10].[ADONETSource_Integrated] g
JOIN
    vPublic.DimDate AS D ON g.activityDate = d.FullDate
WHERE
    d.FullDate >= CAST(DATEADD(d, (DATEPART(d, DATEADD(m, 0, GETDATE())) * -1) + 1, DATEADD(m, -0, GETDATE())) AS DATE) 
GROUP BY
    g.[ActivityDate]
ORDER BY 
    g.[ActivityDate] DESC

INSERT INTO dbo.OLEDB_Inegrated (activityDate, RecCount)

You can directly connect source results to destination table insert data in SSIS.

I reproduced the package with sample data with below steps.

  1. Created a data flow with source and destination.

enter image description here

  1. Connect source to ADO.NET source table and build your query under SQL Command. (Preview the result for testing).

enter image description here

  1. Create destination table connection and map source to destination columns by connecting source and destination.

enter image description here

  1. Execute the data flow.

enter image description here

enter image description here

Reference: Load data into SQL Database