apache / apache/beam

Add ability to configure empty file behavior in IOs

Open
#20,956 0 comments 0 reactions 0 assignees View on GitHub
files io java new feature P3 python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

This is a general feature request based on frequent questions I see on Stack Overflow. I often see questions about how to get an empty file instead of no file when a PCollection is empty, or vice versa for IOs that create empty files. In other words, whichever approach is taken, there's users that will want the opposite approach.

It seems the best approach here would be to add some kind of common code (FileIO maybe?) that could either open files for writing in Setup or lazily in ProcessElements.

Regardless of the approach taken, this bug is basically for investigating this feature for feasibility and maybe holding sub-tasks/blocking bugs for tracking implementation.

Imported from Jira [BEAM-12211](https://issues.apache.org/jira/browse/BEAM-12211). Original Jira may contain additional context.
Reported by: danoliveira.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.