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

added header option #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gmoskovicz
Copy link

@gmoskovicz gmoskovicz commented Aug 3, 2016

Added header option for the output.

Fixes #8

@ph
Copy link
Contributor

ph commented Aug 8, 2016

@andrewvc Can I ping you with that? I think to make it work we need to make this plugin threadsafe.

@gmoskovicz
Copy link
Author

FYI: @GlenRSmith

@gmoskovicz
Copy link
Author

@andrewvc @ph any news on this?

end

public
def receive(event)

path = event.sprintf(@path)

@csv_options[:write_headers] = !File.exist?(path) || File.zero?(path)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will add the header before each record in the csv. Example
A,B,C
1,2,3
A,B,C
4,5,6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants