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
Solved

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

Posted on 2014-12-01
4
197 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
  • 2
4 Comments
 
LVL 33

Expert Comment

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

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 500 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 65

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

839 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