Skip to Content
0

Blank File with empty tags

Aug 03, 2017 at 08:29 PM

60

avatar image

Hi SDNites,

I have a sceanrio where 3rd party is producing a file with no data but it has header empty tag like,

</field1>

Please advise how can I stop PI from processing it and if required raising appropriate alerts.

Regards,

Abhi

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Raghuraman S Aug 04, 2017 at 07:50 AM
0

Hello Abhishek,

Why do you make the target field which is mapped to this field as mandatory and make the mapping fail if this field has no value.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

With errors on every instance will add overhead to the application support team. Is there any way that file is not processed via PI but can be archived and file name changed for monitoring.

My understanding is it can be done via Module bean / OS commands / writing a standalone script. Please let me know if this is correct or there is any other better way to do it.

0
Rudra Singh Aug 08, 2017 at 06:25 AM
0
Share
10 |10000 characters needed characters left characters exceeded
Rudra Singh Aug 08, 2017 at 06:25 AM
0
Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Aug 04, 2017 at 08:09 AM
0

Hello Abhishek!

You could use schema validation in sender adapter.

Another option is to check the message content in Receiver Determination and generate error if no receiver is found. Further you can use Message Alerting to raise alerts for those messages.

Regards, Evgeniy.

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi Evgeniy.

Thanks for response.

Can you please let me know an example of schema validation for the above scenario as in my data type, no fields are mandatory. How can I put this in schema validation to eliminate processing of blank file?

Regards,

Abhi

0

Hi Abhishek!

1. Why the schema with no mandatory fields is used? What is the meaning?

2. Why the sender initiates the empty file transfer at all?

In the case you're talking about I see the decision to verify message structure at Receiver Determination step and drop such messages with errors or send it to some file location along with alerting about empty message contents.

Regards, Evgeniy.

0

Hi Evgeniy,

1. We have received XSD and it does not have any fields as mandatory.

2. Sender has some SQL query execution system which generates the file even if has blank file (with empty tags). We do not have flexibility to get external system modified.

Regards,

Abhi

0

In this case use Receiver Determination step to drop empty messages.

Regards, Evgeniy.

0