Forum Discussion

PrasoonSur's avatar
PrasoonSur
New Member
1 year ago
Solved

MS Fabric Data Pipeline Copy Data Activity Additional Column Value automatic change error

I had created an MS Fabric Data Pipeline which includes Delete -> Copy -> Dataflow -> Semantic Model refresh activities.   After running for a few times, I realised that I wanted to extract the fil...
  • v-achippa's avatar
    v-achippa
    1 year ago

    Hi PrasoonSur,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you nilendraFabric for the prompt response.

     

    Here the use of $$FILENAME in the Additional columns section of the Copy activity in Microsoft Fabric pipelines is currently not supported the same way it is in Azure Data Factory. This is why you are seeing the value change to Custom with an error.

    Fabric’s pipeline UI blocks reserved tokens like $$FILENAME from being used in custom fields. Even if accepted, they are not passed correctly downstream especially to Dataflows.

    • Since you have many files, using ForEach will slow down over time. Instead use a single Copy Activity that loads all files into a Staging Lakehouse table.
    • Dynamically add the filename by adjusting your source/file path logic
    • After loading, use a Dataflow to read from the staging table and apply any mapping or transformations required using the filename column.

    PySpark notebook can also ingest large number of files in parallel with filenames included, if performance is critical and you are ingesting many files, use PySpark.

     

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thanks and regards,

    Anjan Kumar Chippa