Skip to content
+1-888-319-3663

COMMUNITY FORUM

Task Run Map if the previous Map has no data

Brenda Hopkins asked 3 years ago
I have several Maps created, each map has a task that will run the next map.  So map 1 will kickoff map 2, map 2 will kickoff map 3,etc…
This is not working if Map 2 has no data, the whole process stops.  Is there a way around this?
 
thanks
 
Brenda replied 3 years ago

This works as long as there is data on MAP 1, but just found out this is not always the case. So what magic and can I add to run if Map 1 has no data?

Map1 runs
Map2
Map3
Map4
So map1 drives all the other maps.
set both On Fail and On Success events to “continue”

Patrick Roth Staff replied 3 years ago

Then make a Map0.
In the Map0 the source is a sql query:
select 1 as idx

the output is to a text file set to overwrite

Map0 then runs all the other maps as above. And you’ll never NOT have data due to the query.

Otherwise, make sure “if not data” then “success” is marked which should also work.

Brenda replied 3 years ago

So I setup a new map, this is setup as a Bulk Data load / SQL Querry
This part seems to work correctly giving me the idx = 1
So for the Destination I selected: Export to File, but it will not save, ‘must have a node’ error.

Brenda replied 3 years ago

never mind I did not map the IDX file

Answers
Patrick Roth Staff answered 3 years ago
Several ways but the easiest is instead of
Map1->Map2->Map3->Map4
as a daisy chain, instead set as:
Map1 runs
   Map2
   Map3
   Map4
So map1 drives all the other maps.
set both On Fail and On Success events to “continue”
Anonymous replied 3 years ago

Thanks that fixed it….way too simple.

Terry Angel replied 2 years ago

in the options of the map, mark “if no data returned” as “success”


If you would like to submit an answer or comment, please sign in to the eOne portal.