Don't do aggregations within the ingestion process, other than with aggregating indexes.
Typically we don’t recommend aggregation over external tables, as it can be slow, and also very inefficient. Aggregation requires a merge before writing which occurs on a single node, whereas aggregating indexes have intermediate persists that occur in parallel. We will instead ingest the data to a raw stage, and then can aggregate into another table.
While it is possible to perform aggregations within the ingestion process, and there may be needs to do so, most of the time there is a better and more performant way/stage to do the aggregation. The same applies to other transformations too, e.g. joins to enrich data.