Forum Discussion

robertozsr's avatar
robertozsr
Helper II
4 months ago
Solved

Copy activity - Mapping column from source to destination

Hi everyone, I have a copy activity that dynamically ingests different tables from PostgreSQL using a ForEach loop driven by a lookup table. In the Source tab I also define an additional column call...
  • v-karpurapud's avatar
    4 months ago

    Hi robertozsr 

    Thank you for contacting the Microsoft Fabric community forum.

    When using a metadata-driven Copy Activity where table names and schemas change dynamically, such as in a ForEach loop, it's best to use the default (auto) mapping by leaving the Mapping tab empty. This lets Copy Activity automatically map all source columns by name, supports schema drift, and ensures columns added under Source → Additional columns (like ingestion_time_utc = @utcnow()) are written to the destination without needing explicit mapping. Adding explicit mapping switches to explicit mapping mode, which only writes mapped columns and requires full schema maintenance, disrupting dynamic behavior. If ingestion_time_utc is not updating as expected, it's usually due to the write operation: append updates the timestamp only for new rows, while overwrite or truncate-and-load refreshes the timestamp for all rows.

    Here is the reference: Schema and data type mapping in copy activity - Azure Data Factory & Azure Synapse | Microsoft Learn

     If you have any further questions, feel free to reach out and we'll be glad to assist.
     

    Regards,

    Microsoft Fabric Community Support Team.