112 How to import the most recent file from folder using ssis

Поділитися
Вставка
  • Опубліковано 20 жов 2024

КОМЕНТАРІ • 38

  • @oguzolgun7609
    @oguzolgun7609 Рік тому +1

    Hi Aqil, thank you very much. I did not expect such a quick response. you're really amazing and helpful. I hope your channel will get deserved interaction.

    • @learnssis
      @learnssis  Рік тому

      No problem. I had some free time, and this was one of the important scenario in SSIS on which I had not created a video, thus I thought to make a video on it ASAP.

  • @Acito1411
    @Acito1411 Рік тому

    All of your videos is impactly resourceful

    • @learnssis
      @learnssis  Рік тому

      Thank you so much for supporting and liking the videos.

  • @NanduHSN
    @NanduHSN 7 місяців тому

    Hi Aquil, thanks for the nice explanation, I do have question , when I try to open script task to write c# code application throws an error as "cannot show visual studios 2015 tools for Application editor.When I searched found that I might be missing Microsoft Visual Studio Tools for Applications x64 Runtime 3.0" was the issue. This was installed corporate account , dont have permission to install any missing software ..And also the above solutions can be done without using script transformation ??

    • @learnssis
      @learnssis  7 місяців тому

      Hi Nanda, unfortunately for this requirement to get the most recent date of a file, I don't think of a solution to do this without using the script task.

  • @murthymamidi6639
    @murthymamidi6639 5 місяців тому

    Hi Aqil,
    Good Morning!!
    Thank you very much for sharing wonderful videos.
    I have one scenario like, i have a file with datetime in a folder and every time we will get files with datetime and we have to process the recent file with date time and pull data from the file into sql server.so,shall i use this package for my reference .if not can u please help me.
    Thanks.

    • @learnssis
      @learnssis  5 місяців тому

      Yes you can use this package as a reference for your scenario. thanks

  • @1217895
    @1217895 Рік тому

    Hi Aqil, Thanks again for the video. Additionally, can you please show us how to check if the record count > 0 (excluding header) for the last modified file? Ideally, i wouldn't want to import the file if the last modified fille has 0 records in it,thanks

  • @gracec6427
    @gracec6427 11 місяців тому

    will the package execute as soon as a new file is in the folder? or would i have to set up like a job to execute the package at given times?

    • @learnssis
      @learnssis  11 місяців тому

      The package can not start by itself. You would need to schedule it from sql agent job.

  • @deandrechisolm8638
    @deandrechisolm8638 Рік тому

    Thanks for the tutorial! Any reason why everything gets deleted in the Script Task after running the job once?

    • @learnssis
      @learnssis  Рік тому +1

      Yeah this is kind of bug in that version of Visual Studio, if you find the latest updates for Visual Studio then pls install the latest updates.

  • @sureshgpr
    @sureshgpr Рік тому

    Hi, i have a files with dsteand time like ac_20230314084452, like, 3 or 4 files in a folder different date and time so how to load most recent file in dstabase table

  • @AhmedHassan-wt6lv
    @AhmedHassan-wt6lv Рік тому

    as usual amazing video thanks a lot it will help a lot

  • @chandrasekhar-rf6bg
    @chandrasekhar-rf6bg Рік тому

    Very much impressed with the presentation. I want to know the detailed job roles of SSIS developer and SSIS support. Please compare the roles between them with examples. Thank you. 🎉

    • @learnssis
      @learnssis  Рік тому +1

      Hi Chandra Shekhar,
      SSIS developers are responsible for designing, building, testing, and deploying ETL solutions using SSIS. This typically involves designing data integration workflows, creating data transformation logic using SSIS tasks and components, and testing and debugging the ETL process. SSIS developers may also be responsible for optimizing the performance of ETL processes, as well as maintaining and troubleshooting existing ETL solutions.
      SSIS support personnel are responsible for providing technical support for ETL solutions built using SSIS. This may involve troubleshooting and fixing issues with existing ETL processes, as well as providing support for new ETL development projects. SSIS support personnel may also be responsible for monitoring and maintaining the overall health of the ETL environment, as well as ensuring that ETL processes are running smoothly and efficiently.

    • @chandrasekhar-rf6bg
      @chandrasekhar-rf6bg Рік тому

      @@learnssis Thank you Aaqil for your time and help. 🙏🙏

    • @learnssis
      @learnssis  Рік тому

      ​@@chandrasekhar-rf6bg No problem.

  • @kiranshetty-xb8mn
    @kiranshetty-xb8mn Рік тому

    Hi, thanks for the video. Can u please let me know how to get the file from nework location or shared drive instead of local folder. Can u pls help me

    • @learnssis
      @learnssis  Рік тому +1

      The method to copy file from shared drive or network location will be same. Either you can use the File System task (copy method) or you can use File.Copy method inside script task.

    • @kiranshetty-xb8mn
      @kiranshetty-xb8mn Рік тому

      @@learnssis yes it was working but the file ,it is not picking the latest file. When we give file location we need to give the file name right. Whatever file we are selecting it's getting picked. Can you please let me know how to resolve this.I want that to pick latest file

    • @learnssis
      @learnssis  Рік тому

      @@kiranshetty-xb8mn I think we are getting the most recent file from this video. If you have the file location and want to get the file name, then you can get it by either using below expression inside FileName variable
      ua-cam.com/video/MwqJ2cKnC-8/v-deo.html
      Or inside the script task you can get FileName from file path using below syntax
      string FileName = System.IO.Path.GetFileName(FilePath);

  • @amarnadh9272
    @amarnadh9272 4 місяці тому

    Hi How to import last modified multiple files from one folder
    If i give, start like the file name it has to import all files what ever starting with that name

    • @learnssis
      @learnssis  4 місяці тому

      If you want to import files those starts with specific name then you can configure it in the foreach loop container in the Files option. For example if you want to import files starting with customer then in the files option in foreach loop container with file enumerator you can write
      customer%

    • @amarnadh9272
      @amarnadh9272 4 місяці тому

      @learnssis if you are possible, can you make one video for this topic. It would be great for us.

    • @learnssis
      @learnssis  4 місяці тому +1

      @@amarnadh9272 This is shown in foreach loop container videos
      ua-cam.com/video/Y69bmI455uA/v-deo.html

  • @1217895
    @1217895 Рік тому

    Hi Aqil, don't bother - I figured ot out by viewinhg '36 Load a file only if it contains more than 0 records using SSIS' , thanks bud

  • @samderrty123
    @samderrty123 6 місяців тому

    will this work for Excel?

    • @learnssis
      @learnssis  6 місяців тому

      Yeah sure, it will work for any type of file.

  • @dhirendramaurya5361
    @dhirendramaurya5361 Рік тому

    👌👌👌💐

  • @priyankakini8680
    @priyankakini8680 Рік тому

    Very Useful. Thanks. But I'm getting error and unable to solve. Could you please help.
    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()

    • @learnssis
      @learnssis  Рік тому

      Can you try to log the error message from script task so that we can take a look at the error message. The error message that you shared it is a generic message and shows no details about the reason of failure.
      Take a look at this video and try to log the error message
      ua-cam.com/video/r7Gr3q9zXZQ/v-deo.html

    • @priyankakini8680
      @priyankakini8680 Рік тому

      for anyone getting same error , I was able to solve this by using [user::variablename]… thanks for this video so helpful

    • @learnssis
      @learnssis  Рік тому

      @@priyankakini8680 Glad you figured it out.