The pipeline involves a file landing in an SFTP Blob container, which is decrypted by a .Net application. After the decryption and movement to a designated folder, a pipeline is triggered to load the file into a SQL table.
A Get Metadata activity successfully retrieves the FileName ChildItems into a variable activity. The "FileNameVariable" extracts the "FileName" and passes it to a Switch expression as follows:
-
@activity('Get Metadata1').output.childItems[0].name
The Switch expression uses "Contains" logic:
-
@{if(contains(variables('FileNameVariable'), 'ExampleCase1'),'ExampleCase1', 'Default')}
During debugging, the filename in "FileNameVariable" correctly holds the full filename. However, the expression in the switch evaluates the "FileNameVariable" with unexpected characters like "ExampleCase1 /n/n:", which causes the switch to revert to the default case instead of matching properly.
What could be the reason for the addition of the /n/n or /t/n characters to the end of the filename? Any insights would be appreciated.