Script Task SSIS Example C# | Read File Extensions using Script Task C#
ฝัง
- เผยแพร่เมื่อ 21 เม.ย. 2021
- #SSISScriptTask #ScriptTask
In this video we have demonstrated multiple files in a folder having like "Text" and "Excel" and for ETL process we created to Data Flow Task, One for Excel and One for Text File with Flat file Connection and Excel Source Connection.
Now to get each file from a folder we implemented For-Each Loop Container and each file with Full Qualified Name is been passed to Script Task and by using variables and by using Microsoft C# Code System.IO namespace we read the particular file extension and by expression we redirected file to its respected Data Flow Task and further we did ETL process.
Thank you so much please upload such videos they are really helpful
Sure Thanks and Happy Learning
Very nice video, i was struggling with same requirement in previous story i was working, thank you very much
Great example 👍
Thanks and happy learning!!!👍🙏
PERFECT
Thanks and Happy Learning!!!🙏
@@gurunathad13 bro can you share your number pls. I have huge dought in ssis
@@thandasooruu181 kindly mail me your doubt will help you ...Thanks
@@gurunathad13 mail I'd??
@@thandasooruu181 gurumatrix2004@gmail.com
apart from using the c# code in script task to extract the file extension, we can also use the ssis expressions which are going to be the combination of ssis functions with literals symbols and operators that we can use to extract the file extension from filepath or filename using the below code..
REVERSE(SUBSTRING(REVERSE(@[User::FileName]), 1, FINDSTRING(REVERSE(@[User::FileName]), ".", 1) - 1))
we can use the precedence constraints and evaluate the expressions and based on the file extension we can move the files to different data flow loads
Agree yes we can do that for these type of scenarios... but what if we want to do more customization ... then that time we require code support.. Thanks
Hello sir kindly share ur contact