Force_error Function

How does force_error function work ? If we set never abort in reformat , will force_error stop the graph or will it continue to process the next set of records ?

Questions by mhero

Showing Answers 1 - 24 of 24 Answers

I think it depends what you want to do with force_error fuction , it can used to fail the plan if there are data quality issue for example if you want a plan to fail if they are duplicate records in input file , here what you can do is you check for duplicate records in input and put a force error function to fail if there are duplicates in input file.

About the other question regarding the reformat , I think if you have a log port and log port is connect to a flow , the conponents treats malformed delimited records as rejects events and if you set never abort parameter then reformat will not fail. if you set the other option like  abort on first reject , the reformat component will fail.

I not sure from what context you want to use the force_error function. But this function is very useful when you want to fail any plan for data integrity issue which is very important in Data warehosue.

I hope it make sense.

  Was this answer useful?  Yes

force_error, as the name suggests it works on as to force an error in case of not meeting of any conditions mentioned.

The function can be used as per the requirment.Viz.,

1. If you want to stop execution of graph in case of not meeting a specific condition,say,you have to compare the input and out put records reconcilation and the graph should fail if the input record count is not same as output record count,
"THEN  set the reject-threshold to Abort on first reject" so that the graph stops.

N.B - force_error directs all the records meeting the condition to reject port with the error message to error port.

2.In certain special circumstances, you can also use to treat the reject port as an additional data flow path leaving the component. When using force_error to direct valid records to the reject port for separate processing, you must remember that invalid records will also be sent there. When using force_error for this purpose, "set the reject-threshold to Never Abort" so that the graph doesnot fails and meets the purpose.

Njoi!!
Abhi - fresh as dew!

  Was this answer useful?  Yes

Here you can set the two conditions for the reformat component
1. If you want to fail, set the reject thresold to fail on first reject
2. If don't want to fail , you set never to abort.

Force_error is used to abort any graph if the conditions are not met and you write the error errors records in file and then abort the graphs , this can done in different ways.

  Was this answer useful?  Yes

It will not stop the execution of graph,it will continue with the next records.
It will used especially to send to send the data to an error port when it does not meet the specified condition with error message given in this function. To abort the graph use force_abort function.

  Was this answer useful?  Yes

shan

  • Oct 11th, 2012
 

Forces error and writes the error note..

  Was this answer useful?  Yes

raja

  • Feb 9th, 2015
 

force_error function will not throw any error when we keep the reject threshold as never abort. but it will reject all unwanted records per requirement and will provide you the message.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions