Skip to main content
Question

limit CSV writer size

  • October 13, 2014
  • 2 replies
  • 120 views

bubblebeb
Contributor
Forum|alt.badge.img+6
I have a CSV output file which is currently 54mb. 

 

I need to upload it in a system which has a limit of 5mb. 

 

 

Is there a way of limiting the writer to 5mb limit and then write to another CSV. 

 

 

i.e. I want to get 11 csv's of the same data. Ideally with a counter in the name i.e. upload1, upload2, etc.

 

 

Is there a way of either setting a writter parameter or a transformer to do this? 

 

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • October 13, 2014
Hi,

 

 

one way to do it:
  • find out approximately how many lines it takes to get 5MB
  • use a ModuloCounter set to this number (or slightly lower to be conservative)
  • use _modulo_count as a basis for a feature fanout

 

David

bubblebeb
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 13, 2014
Many thanks.