Hi,
I have a sql table with data and I attempted to dump the same data to a Flat file. I want the falt file data to be appended with different named files in the form of different DateTime files. In this regard, I was created variables and wrote expressions under the properties of Flat file connection manager. As soon as I hit OK (Closing Flat file connection manager pop up box), the Flat File destination shows cross mark (failed). I don’t know the reason; I pointed my mouse of that flat file showing “The file name property is not Valid. The File name is a device or contains invalid characters”.
When I tried to execute, the package was failed popping the below errors:
[Connection manager "Flat File Connection Manager"] Error: The file name "D:\SSDT\Destination\OutputText.txt" specified in the connection was not valid.
[Connection manager "Flat File Connection Manager"] Error: The file name property is not valid. The file name is a device or contains invalid characters.
The expression I have used,
@[User::OutputPath]+ @[User::FileName]+"_"+Substring((DT_STR,50,1252) GETDATE(),1,19)+".txt"
And I check the evaluation and this went good.
Variables used,
OutputPath String D:\SSDT\Destination
FileName String OutputText
I have tried to set Delay Validation to True but not worked. If I was running the package directly (Overwrite the File) without Variables or expressions, the file consists of data is overwriting. Hence I realised that my package is correct until the configure OLEDB source and Flat File Destination. But while configuring Flat file connection manager properties (Expressions), the package was failing.
Please help me out of this issue.
Thanks.