Forum Discussion
Data flow sink to Blob storage not writing to subfolder
This is expected with Name file as column data. In a mapping data-flow sink, the selected column is treated as the complete output path relative to the container, so it overrides the folder path configured on the dataset or sink. That also explains why the folder can be created but remains empty.
The simplest workaround is to build the folder into the filename column. Add a Derived Column such as outputPath:
concat('split/', toString(OBJ), '.json')
Then choose outputPath for Name file as column data. Do not start the value with a slash. You can include additional levels in the same expression if required.
If you actually want one folder per OBJ and Spark-generated filenames inside each folder, use Name folder as column data instead. For your stated requirement—one named file per OBJ—the derived full relative path is the better fit. Also watch for skew: this option reshuffles rows by filename value, so one very large OBJ group can become a performance bottleneck.