[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Testing for records and if found execute next task using SSIS

I use SSIS to perform ETL process and some times the client sends new or unknown files.  I do have a table that captures the unknown file information and have a SP that checks the table at the conclusion of the process.  How can I execute the previous package only if there is a unknown file?  I thought that I would execute a SQL TASK basically doing a coun(*) for any files that appeared today and if > 0 it would flow through the SSIS package that sends me the list of file.  If the value is = 0 then don't execute the next package.

Have I confused you enough?
0
wdbates
Asked:
wdbates
  • 3
  • 2
1 Solution
 
ValentinoVBI ConsultantCommented:
"Have I confused you enough?"

Yes you have...  Could you say that with an image please?

Using the SQL task with a SELECT COUNT(*) is indeed an option.  You could have the single-value result set assigned to a package variable and then use that variable on the precedence constraint (the green connector).  That's for Control Flow.

In case you're in a Data Flow I'd advise to use the Lookup component.  With that you can look up any existing records and split the incoming data according to what's found or not.

Now, did I manage to get you confused? :)
0
 
ValentinoVBI ConsultantCommented:
In addition to previous msg: to edit the precendence constraints, double-click the green connector.  Now change the Evaluation operation to Expression and Constraint.  That allows you to enter an expression like @[MyVariable] == 0
0
 
wdbatesAuthor Commented:
Sorry for the delay, but been out of the country.  Will check later today if I have time.
0
 
wdbatesAuthor Commented:
Sorry for the delay, but the solution work!
0
 
ValentinoVBI ConsultantCommented:
Cool! :)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now