Rupsa1234 commented on issue #34188:
URL: https://github.com/apache/beam/issues/34188#issuecomment-2704418286

   Thanks for reporting this issue! I have also encountered the same problem 
where `WriteToCsv` does not respect the `num_shards` parameter, causing all 
data to be written to a single file instead of multiple shards.
   
   I tested this with Apache Beam Python SDK 2.49.0 on Google Dataflow Runner 
and observed:
   - Expected: `output-00000-of-00005.csv`, `output-00001-of-00005.csv`, etc.
   - Actual: Only one `output.csv` file is generated.
   
   Workaround:
   Using WriteToText instead solves the issue:
   p | "Write to Text" >> beam.io.WriteToText("output", 
file_name_suffix=".csv", num_shards=5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to