Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: make no CDF when no data rows ingested #11

Open
aizuchi0 opened this issue Jul 3, 2024 · 1 comment
Open

Request: make no CDF when no data rows ingested #11

aizuchi0 opened this issue Jul 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@aizuchi0
Copy link

aizuchi0 commented Jul 3, 2024

Produce an INFO message and do not create an output file when the only code ingested by das3_cdf is metadata, not data. Or possibly add a flag for this?

@cpiker
Copy link
Member

cpiker commented Jul 3, 2024

Good call. Yep, it is certainly possible to do this.

Getting into implementation details, since CDFs aren't streamable and since libcdf.so does not have a stdio FILE* interface (for RAM files), output is always written to a file, even when using das3_cdf as a UNIX filter in a command pipeline. Thus, if no data records are written the permanent (or temporary) file can just be deleted.

Sometimes for diagnostic purposes it's good to keep them around so instead of changing the default behavior I'll add an "auto-cleanup" option for empty CDFs.

@cpiker cpiker added the enhancement New feature or request label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants