Forum Discussion
Have you checked out the documentation on Triggered Pipeline Access Control? Let us know if there are gaps or more details that we could provide.
I don’t think it’s possible to configure the CSV Formatter to do this at the moment. You might need to do something like the following to detect when there is no data:
So, on the ‘No Data’ branch, you can have a Mapper that defines the headers and a CSVFormatter that writes the document to the file. Not great, I wish I had a better answer.
Thanks tstack. That’s what we ended up implementing. Agreed, it is not great, especially for a document with dozens of header columns.
For others whom happen to search for this as I just did. The router approach is still required as far as I can tell for the “No Data” condition, but, an easier way to write a header only file is to parse your JSON and use a Constant with a File Writer. For example, the following will get a list of Keys from your JSON (headers) as an array, turn it into a string, then, remove the opening and closing brackets.
JSON.stringify(Object.keys($)).replace(“[”,“”).replace(“]”,“”)
You can drop that into a Constant Snap and write to file. Works well for this case.