SQL Server Integration Services Tutorial -Check If File Exists in a Folder in SSIS Package

  Рет қаралды 37,783

TechBrothersIT

TechBrothersIT

Күн бұрын

Пікірлер: 41
@krismaly6300
@krismaly6300 8 жыл бұрын
I enjoyed watching this video and recommend others to watch. Thanks for educating the community and appreciate your volunteership.
@BrianEvansracer
@BrianEvansracer 4 жыл бұрын
Thanks for sharing this simple tutorial. Your formatting in the C# code was a little off as the IF condition is generally all on one line between the outer parenthesis...In C# you CAN have a single indented line below the IF condition and without the use of { ...}
@krismaly6300
@krismaly6300 8 жыл бұрын
I enjoyed watching this video. I would suggest you that try to use variable notations as per industry standard or your own method which makes sense. I am expressing this when you go to variables displaying dialog you have User and System to identify easily I would suggest Use vFileName, vFolderPath, and vFileExistsFlag instead FileName, FolderPath, and FileExistsFlag This help while writing code or picking variables. It's only suggestion not comment/criticism. You are doing good please proceed. As per video I created package and it works fine.
@TechBrothersIT
@TechBrothersIT 8 жыл бұрын
+Kris Maly Hi Kris. Thanks for feed back. I agree with you. Will try next time. Thanks for watching.
@enigma_mysterium
@enigma_mysterium 3 жыл бұрын
Hi @TechBrothersIT, I was wondering how to specify in the Script Task if a file exists that was created on certain date and time. Hopefully you can guide me through. Thanks in advance!
@apeethasrinivasan3712
@apeethasrinivasan3712 5 жыл бұрын
Hi educator, I have done as you have said, but i am getting the below error. could you please help with this? Failed to load the package "Exception deserializing the package "Specified part does not exist in the package.".".
@krismaly6300
@krismaly6300 8 жыл бұрын
I enjoyed watching this video and recommend others. Thanks for educating the community.
@abdulqayoomvalizada872
@abdulqayoomvalizada872 4 жыл бұрын
I faced this error during run time, [Exception has been thrown by the target of an invocation.] I appreciate your idea?
@alirezazare5224
@alirezazare5224 4 жыл бұрын
I followed the step but I received this error: 'string' does not contain a definition for 'filefullpath'. Any idea what I'm doing wrong ?
@bbrocks5530
@bbrocks5530 5 жыл бұрын
Hello, can we get a video on downloading specific PDF files based on filename column from SharePoint ?
@brinisoumaima2816
@brinisoumaima2816 4 жыл бұрын
Hi, thanks a lot for this video; it helped me a lot but i have a question , i want to run this package not manualy using windows service can you help me ! thanks
@Haditheveryyday
@Haditheveryyday Жыл бұрын
hello yall how do i can check my file header using script task but my data flow task is in a foreach loop container?
@nibedey
@nibedey 5 жыл бұрын
Please help I am getting this error Exception has been thrown by the target of an invocation.
@ArpanKarmakar
@ArpanKarmakar 4 жыл бұрын
Helpful video. In this example you created the package which will look for one specific file, I want to check if there are any .xlsx or .csv file exists then only the data flow task should proceed. How do I achieve this?
@periwinters8912
@periwinters8912 4 жыл бұрын
That is what I watched this video for, what I did (and it's working) is followed his instructions completely EXCEPT I put it in foreach loop and I left the File name blank
@ArpanKarmakar
@ArpanKarmakar 4 жыл бұрын
@@periwinters8912 I have a SSIS package which I want to schedule for regular refresh. I tried with a batch file but it failed. Can you help me, thanks
@periwinters8912
@periwinters8912 4 жыл бұрын
@@ArpanKarmakar what error did you get? did you make sure you put both readonlyvariables in the script task editor? did you add System.io to the namespace? and in the script, did you use the same case for the variables? it's hard to know what else to ask without knowing the error.
@ArpanKarmakar
@ArpanKarmakar 4 жыл бұрын
@@periwinters8912 Its working now. I created a SSIS Package and then created a batch file to execute the package. Then I scheduled the batch file from Windows task scheduler. In the task scheduler under the actions tab I selected the program (batch file) and on the options textbox I have put the path of the batch file. Now everything works fine.
@ArpanKarmakar
@ArpanKarmakar 4 жыл бұрын
@@periwinters8912 I have mentioned the variable name in the expression of flat file conntion and in the loop container *.CSV
@MuCh1510
@MuCh1510 4 жыл бұрын
Hi tech brothers, Thanks a million, I have one doubt, what if we have multiple files of same format and different names and we have to check all the files are present if present then only others tasks should perform, Kindly advice me.
@periwinters8912
@periwinters8912 4 жыл бұрын
That is what I watched this video for, what I did (and it's working) is followed his instructions completely EXCEPT I put it in foreach loop and I left the File name blank
@pokhreis
@pokhreis 9 жыл бұрын
Hi Amir, i guess the value for FileExistsFlag should be 1 instead of 0 under variable window. Coz if we are checking if File exists, i believe it has to 1 instead of 0. what do you think about it ?
@TechBrothersIT
@TechBrothersIT 9 жыл бұрын
Ishwar Pokhrel In variable window you can have 0 or anything else beside 1. As we are setting the value in Script task to Flag =1 when file exists. You don't want to have in variable window to 1 otherwise the Data Flow Task will always run as expression will be true in precedence constraint. you want to set the value in Variable window to anything but not 1. Hope this answer your question.
@Raghavendra258
@Raghavendra258 3 жыл бұрын
@@TechBrothersIT I have same steps , its working in visual studio 2017 and its not working SSDT end, when I deploy packages into server . Its not working... my server version is 2016, Visual studio version is 2017.. can you please suggest me here
@oscarbolanos87
@oscarbolanos87 4 жыл бұрын
This solution worked great!!!! Thanks for sharing!
@devr266
@devr266 5 жыл бұрын
I am getting an " Exception has been thrown by the target of an invocation".
@arlmcl6083
@arlmcl6083 3 жыл бұрын
Hi Dev just wondering if you got a reply on this? I am getting an exception as well
@krismaly1231
@krismaly1231 9 жыл бұрын
Dear Amir, I enjoyed watching this video and recommend others to watch. Thanks for educating the community and appreciate your efforts in publishing this series of videos. May I know what percentage of time you spent on writing the script for Packages? Thanks a lot
@avikjain1286
@avikjain1286 2 жыл бұрын
HELP!! For me file.exists always returns false even if the file exists
@kavi54321
@kavi54321 6 жыл бұрын
My Foreach loop container did not run after the script task, its just got stopped. But the files are present in the folder
@TechBrothersIT
@TechBrothersIT 6 жыл бұрын
your path could be wrong. check the path of folder.
@randolphvargas1118
@randolphvargas1118 6 жыл бұрын
Thanks. Helped me a lot.
@prasaddavange3837
@prasaddavange3837 8 жыл бұрын
Hello i followed the same as you giuded but i am facing runtime error while executing the scirpt task
@krismaly1231
@krismaly1231 8 жыл бұрын
What kind of errors. please share
@arlmcl6083
@arlmcl6083 3 жыл бұрын
@@krismaly1231 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
@TOMRYANLUKE
@TOMRYANLUKE 3 жыл бұрын
Thank you sir for this video....
@PitangusSulphuratus
@PitangusSulphuratus 3 жыл бұрын
Thanks it was usefull
@nguyenhaithanh8694
@nguyenhaithanh8694 9 жыл бұрын
thanks for shared
@TechBrothersIT
@TechBrothersIT 9 жыл бұрын
+Nguyen Hai Thanh You are welcome and thanks for watching!
06 How do I archive files in SSIS
20:10
Learn SSIS
Рет қаралды 12 М.
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 28 МЛН
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 11 МЛН
How I Turned a Lolipop Into A New One 🤯🍭
00:19
Wian
Рет қаралды 13 МЛН
SQL Server Integration Services (SSIS) Part 11 - Looping Over Files
21:44
59 Breakpoints in SSIS | how to use breakpoints in ssis
20:13
Learn SSIS
Рет қаралды 15 М.
SSIS - Script Task - Check for File Existence
21:35
Learn at Knowstar
Рет қаралды 4,2 М.
If File EXISTS - Load Data (SSIS)
8:08
Keshav Singh
Рет қаралды 23 М.
57 Checkpoints in SSIS with example
11:58
Learn SSIS
Рет қаралды 30 М.
111 How to export data to new excel file every time in ssis
14:35
SSIS - How to  check if File Exists Or Not || Script Task
7:03
Mukesh Singh
Рет қаралды 9 М.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 83 М.
145 How to deploy ssis package in ssis catalog and schedule it
23:25
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 28 МЛН