?
Solved

SSIS 2008:  Conditional logic to use different sources in Data Flow Task

Posted on 2014-12-01
4
Medium Priority
?
221 Views
Last Modified: 2016-02-17
Hi All

I have an SSIS 2008 package with data flow task using Task Factory Salesforce.com source, and in the WHERE clause is the below statement, which works fine. conditional-source-load-all.jpg
I'd like to pull off a conditional 'IF @load_all_data=True THEN do not include the above WHERE clause, and if False then include it.  I've been told that this is not possible in Salesforce Object Query Language (SOQL) to include that logic in the WHERE clause of the above query, which means that I'll need two separate data sources:  one with the current WHERE.., and one without.

I'd prefer not to copy-paste each data flow task, and the only different being the WHERE clause, to pull this off.

Question:  What's the easiest way to pull off two sources based on logic with a parameter in a data flow task, using the same destination?  Preferably without a JOIN that requires sorting.

Thanks in advance.
Jim
0
Comment
Question by:Jim Horn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 35

Expert Comment

by:ste5an
ID: 40475472
Does a simple 1= <@BIT::import> not work?
0
 
LVL 66

Author Comment

by:Jim Horn
ID: 40476264
Not in SalesForce SOQL, as WHERE criteria has to be column = variable, and can't be variable = value.
See the link below the image.
0
 
LVL 15

Accepted Solution

by:
JimFive earned 2000 total points
ID: 40476356
I have two options:  Use a local Procedure variable and set it to 0 if @load_all_data = true, set it to @user::date_last_success if @load_all_data = false then use WHERE SystemModStamp = @localvar

Alternatively, set @user::date_last_success = 0 if @load_all_data = true before this step in the process.

Good Luck
0
 
LVL 66

Author Closing Comment

by:Jim Horn
ID: 40476406
That's a good workaround that doesn't alter any of my data flow tasks.  Thanks.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question