Question

I have a KTR, which has Table input with some query. The output from this step is given to JSONOut Step.

My problem is that in some case, Table input will return 0 rows, In that scenario JSONOutput step will show error.

Is there any way I can manage this, by adding some filter or some other method

Was it helpful?

Solution

It depends on what you want to do with your JSON Output. If you still want it generated, but with an empty row to show there was no data, use the Detect Empty Stream step. You will have to have one stream for when there really is data from the table and another for generating an empty data set.

The alternative would be to use a filter rows step that only passes data to the JSON output step if it exists.

OTHER TIPS

use filter rows after table input step, and put condition, if not null then only pass values to json output other wise assign it to dummy step..

so in this way you will not get such errors.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top