does airbyte any group by at mongo db data source...
# ask-ai
r
does airbyte any group by at mongo db data source at CDC sync?
k
Airbyte does not perform any
GROUP BY
or aggregation operations at the MongoDB data source during a CDC (Change Data Capture) sync. Airbyte's CDC sync for MongoDB uses MongoDB's change streams to capture inserts, updates, and deletes, and then replicates these changes to the destination. The data is transferred as-is, without aggregation or grouping at the source level. If you need aggregated data, you would need to either create a view in MongoDB that performs the aggregation and sync from that view, or perform the aggregation as a transformation step after the data has landed in the destination system. This approach is consistent with Airbyte's ELT (Extract, Load, Transform) paradigm, where data is first extracted and loaded in its raw form, and any transformations (including aggregations) are performed after loading, typically in the destination system. If you want to be more selective about the data you sync (e.g., only sync aggregated data), you can create a view in MongoDB and configure Airbyte to sync from that view instead of the raw collection. However, Airbyte itself does not natively support pushing down
GROUP BY
or aggregation logic to the source during CDC syncs [Using dbt tranformation to aggregate data during a sync?](https://discuss.airbyte.io/t/3455) [MongoDB V2 Source Documentation](https://docs.airbyte.com/integrations/sources/mongodb-v2#replication-methods).
r
@kapa.ai maybe for counting records?
k
A message from kapa.ai
Airbyte does not perform any aggregation or counting (such as a SQL-style COUNT or GROUP BY) at the MongoDB data source during a CDC sync. The CDC process in Airbyte for MongoDB simply captures and transfers changes (inserts, updates, deletes) from the source to the destination. The only counting that occurs is for reporting purposes—Airbyte tracks and displays the number of records extracted and loaded during a sync, but this is for monitoring and logging, not as part of the data being synced or transformed [MongoDB V2 Source Documentation](https://docs.airbyte.com/integrations/sources/mongodb-v2#replication-methods). If you need to count records or perform aggregations, you would need to do this either: - By creating a view or aggregation pipeline in MongoDB and syncing from that, or - By performing the aggregation as a transformation step after the data has landed in the destination. There is no evidence in the knowledge sources that Airbyte performs any record counting or aggregation at the source level as part of the CDC sync itself.