on 04-07-2014 9:52 AM
I want to verify my Source Counts. only if count is greater than 0 , i would like to continue with DF, which will load the dat ainto my destination.
How can i accomplish this in BODS
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Samuel,
You can allow a job to execute which will basically feed data to your variable .
Use conditional Data flow logic based on your variable value.
If variable_value>0 than Actual DF else a script with message no data in the source.
Your job will always execute but the DF having the actual logic will be skipped based on your variable value.
Thanks
Gaurav
By using Conditional Workflow you can achieve this please follow the below screen shorts.
Create a Global Variable and Data Type as int. Take a Conditional Work Flow and connect a Script (S_Count) in-front of the Conditional Work Flow as mentioned in the above Screenshot..
Write Script initiating the Global Variable with the count of the table as above mentioned screen short.
Open Conditional Workflow. Write a Statement if Global Variable = 0.
Then it will run the S_Stop script as a Print statement 'Table is empty'
The S_Stop Script as follows.
In Else Workspace am taking my Data flow. Which is should be Executed if the source table is not empty.
Output:
If Source table is Empty.
If Source Table is having data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
You can achieve this by using a script before the dataflow.
In the script use a variable which will be 1,based on data returned from the sql function.
i.e. if count() >0 than 1 else 0.
Now use this variable's value to execute or skip the Dataflow in the sequence based on he value it has..
You can use SCRIPT--> IF ELSE-->DF1 or DF2....
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.