If you are unable to create a new account, please email support@bspsoftware.com

 

How to get 'Text File Delivery' to output an empty file?

Started by PeterGL, 18 Jun 2014 02:24:27 PM

Previous topic - Next topic

PeterGL

Quick question -- I am using the 'Text Output Delivery' node in a fact build to output a *.csv file with a header row of column names. Everything works great but I can't get the process to output a blank file with *just* the header row of column names... or any blank file in general when there is no output data. Any tips? I am familiar with using the SQLTEXT method for also outputing to a flat file but that doesn't meet some of my other needs, even though that process *does* create an empty file like we need.

The receivers of this data want an empty file to process so that they know processes are running normally. Any help would be appreciated.

MFGF

Hi,

If there are no rows to deliver, Data Manager won't go to the trouble of creating a delivery file or table, because it assumes it's unnecessary. Something you might try is having a single row passing through the build with one of the column values populated with a single space. I'm a few thousand miles from my Data Manager instance right now so I can't test this, sorry!

Cheers!

MF.

Sent from my iPad using Tapatalk HD
Meep!

elealos

I think if the fact build will deliver at least one row, then it will create the file, and you can filter it out of the file by putting a filter on the fact delivery that will ensure that it is empty. For example, you could have a static row in the build (as a separate data source, for example) that is always filtered out in the fact delivery. That way if the other data source is empty, then only the static row will make it to the fact delivery, where it is filtered.

PeterGL

Good to know, thank you. I was able to solve this with a different, and less elegant approach. I set up a jobstream to look for file creation, and if no file is found, an empty file is copied into my target directory.

Thanks for the help!