How to Avoid an Error File that is Empty in SSIS Package - Handling Empty Files in SSIS Package

 How to Avoid an Error File that is Empty in SSIS Package - Handling Empty Files in SSIS Package

In this video tutorial, I am going to show you that how you can check if the source file is empty and you can move to some folder and load the files which have the data.

We will use script task and constraints to handle this logic. At the end of Package we move the files to achieve folder after loading them.


C# code used in Scrip Task

Dts.Variables["IsEmpty"].Value = 0;


if (new FileInfo(Dts.Variables["FilePath"].Value.ToString()).Length == 0)

            {

                Dts.Variables["IsEmpty"].Value = 1;

            }



Constraints

@[User::IsEmpty]==1 -- file is empty

@[User::IsEmpty]==0 file is not empty




20 comments:

  1. Thank you so much for providing information about SSIS and some other utilities that are widely known as well as utilised to put a shape over formations.

    SSIS Postgresql Write

    ReplyDelete
  2. The product and functionality delivered satisfied all project requirements and was finished on time and in-budget.
    San Francisco design firms

    ReplyDelete
  3. This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. Web Design Cheltenham

    ReplyDelete
  4. This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. 토토사이트

    ReplyDelete
  5. Their expertise in software engineering and staff augmentation is unmatched.
    best UI designers

    ReplyDelete
  6. I looked on the internet for additional information about the issue and found most individuals will go along with your views 토토사이트

    ReplyDelete
  7. This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work 먹튀검증

    ReplyDelete
  8. This is a great post, I am very happy with this information 파워볼사이트

    ReplyDelete
  9. additional information about the issue and found most individuals will go along with your views 안전놀이터

    ReplyDelete
  10. Do you need Personal Finance?
    Business Cash Finance?
    Unsecured Finance
    Fast and Simple Finance?
    Quick Application Process?
    Finance. Services Rendered include,
    *Debt Consolidation Finance
    *Business Finance Services
    *Personal Finance services Help
    contact us today and get the best lending service
    personal cash business cash just email us below
    Contact Us: financialserviceoffer876@gmail.com
    call or add us on what's app +918929509036

    ReplyDelete
  11. If you are looking for Mature Housewife Escorts in Gurgaon,
    or an attractive Nepali Escorts in Gurgaon
    or Busty Escorts Service in Agra or a foreigner all this variety
    of Russian Call Girls in Indore are there for you in Indore
    to make all of your dreams come true, their beauty and outfit steals your heart, and when you get the
    Russian Call Girls in Haridwar into your room you'll go beyond
    the limits only because of her attractive beauty. So what you'll do is leave a call, and rest happens as the way you
    wish that means the Russian Call Girls in Goa
    once you booked, will be near you in just about 30 to 40 minutes.

    ReplyDelete
  12. Do you need a software spy someone? You can visit site and use it.You can spy on other people’s chats, call logs, and multimedia files without letting them know.So, what do these iPhone spy apps do? Normally, iPhone spying apps are popular among couples who are doubtful of their spouse cheating on them.

    ReplyDelete
  13. As a parent, however, allowing your kid to own a smartphone comes with a lot of mixed feelings and responsibility. See, the internet opens a window of infinite content that can be accessed with ease on our phones. Some of this content is not good for kids.
    There is, therefore, a need for a good spy app. So where do you get a good spy app and what are some of the best spy apps available? you can view more at here and research it.

    ReplyDelete
  14. They provide technical insights and encourage collaboration to support a successful partnership.
    top app design agency

    ReplyDelete
  15. 카지노사이트 I need to thank you for this excellent article!! I absolutely enjoyed every bit of it. I have got you bookmarked to check out new things and you can also add business related topic like startup incubation support. Keep sharing!

    ReplyDelete
  16. 바카라사이트 these websites are really needed, you can learn a lot.

    ReplyDelete
  17. 먹튀검증 This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.

    ReplyDelete
  18. 먹튀검증 Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people.

    ReplyDelete