Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Suppressing empty (0 byte) file on File send port...

154 views
Skip to first unread message

Adman

unread,
Aug 20, 2009, 12:23:05 PM8/20/09
to
I pick up a file, run a map on the message, and write the contents do
a different directory.

Sometimes, the map will create an empty message because all the input
rows are filtered out. In this case, a 0 byte file is created.

Is there an easy way to suppress this 0 byte file from being created?
If there isn't an easy way, is there a hard way?

Thanks!
Adman

Adman

unread,
Aug 20, 2009, 1:26:57 PM8/20/09
to

FWIW, I can get around this by using a temporary dropoff location.
Write the file, and then using a separate Receive Location, pick it
back up again. BizTalk will throw a warning and then ignore 0 byte
files. Still looking for a cleaner solution, though.

Adman

nbusy

unread,
Aug 21, 2009, 2:17:01 AM8/21/09
to
Hi Adman,

We had similar sort of issue in our environment. In our case, we wanted to
get rid of empty flat-files created as a result of filtering out rows.
First thought was like yours - using temporary folder but I didn't want to
add unnecessary round passing data through BizTalk.
The second was a standalone script removing 0-bytes files.
What I've ended with was a pipeline component to check the resulting message
and return null if we didn't need it. In fact, there already was a pipeline
component I used for custom file naming at run-time based on context
properties and/or message body. I've just made a change to the component to
allow configuration to omit messages I don't want.

Regards,
Nick

Adman

unread,
Aug 21, 2009, 11:57:03 AM8/21/09
to
> What I've ended with was a pipeline component to check the resulting message
> and return null if we didn't need it. In fact, there already was a pipeline

Thanks Nick. For such a simple little project, I didn't want to do a
custom pipeline component, but it's good to know that is an option.

Thanks for your thoughts!
Adman

0 new messages