Skip to main content
Solved

create custom text file


I need to output an SQL script created with SQL Creator in a custom text file. The file is essentially a csv file but with '|' as the seperator, the header row prefixed with a 'H|' the rows of data prefixed with 'B|' and a footer containing F|<file_id>|<datetime_stamp>|<number_of_rows>

creating a csv file using '|' is easy enough but I haven't found a way to do the prefixes or footer. I was looking at using XML Templater but not sure if I'm barking up the wrong tree.

 

Any guidance would be greatly appreciated.

Best answer by takashi

Another thought. Create a CSV file without footer line using the FeatureWrite (Format: CSV), then create and append footer line to the file aftterward.

View original
Did this help you find an answer to your question?

2 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • June 11, 2018

I would be tempted to use a Creator and AttributeCreators, along with a StatisticsCalculator or Aggregator to get the Feature count and send them all to a text writer.

 

 

 


takashi
Evangelist
  • Best Answer
  • June 11, 2018

Another thought. Create a CSV file without footer line using the FeatureWrite (Format: CSV), then create and append footer line to the file aftterward.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings