Forum Discussion
Warning When Attempting to Dynamically Name the Destination File During Export
- 7 months ago
In Fabric pipelines Copy activity currently does not support building a single dynamic file name directly in the File Name box, because that field expects an object, not a raw string expression. The supported pattern is to write into a dynamically named subfolder and let copy activity create the default file name or use a ForEach with a Set Variable plus a Dataflow/Notebook as the sink to write a fully custom name. If you must control the file name, the practical approach today is to push the naming logic into a Notebook (df.write.csv with your generated name) or into a DataflowGen2 because Copy activity does not yet allow explicit dynamic file naming.
- 7 months ago
Hi Jher12
The File Share sink uses a fixed path, so this won't work. Either use Dataflow Gen2 to write to on-premise or write to OneLake and make files available using OneLake Explorer.
In Fabric pipelines Copy activity currently does not support building a single dynamic file name directly in the File Name box, because that field expects an object, not a raw string expression. The supported pattern is to write into a dynamically named subfolder and let copy activity create the default file name or use a ForEach with a Set Variable plus a Dataflow/Notebook as the sink to write a fully custom name. If you must control the file name, the practical approach today is to push the naming logic into a Notebook (df.write.csv with your generated name) or into a DataflowGen2 because Copy activity does not yet allow explicit dynamic file naming.