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

Support getting headers from csv #123

Open
jdarling opened this issue Jul 7, 2016 · 8 comments
Open

Support getting headers from csv #123

jdarling opened this issue Jul 7, 2016 · 8 comments

Comments

@jdarling
Copy link

jdarling commented Jul 7, 2016

Generally when I setup a CSV the first row is the column headers. How about an option to use the first row as the fields map? Or an option to ignore the first row in the CSV input file?

@jdarling
Copy link
Author

jdarling commented Jul 7, 2016

Also it would be great to have some type of comment line. So you can do things like mark users types in blocks.

@hassy
Copy link
Member

hassy commented Jul 8, 2016

Good idea on the CSV headers @jdarling.

With comment lines - do you mean comments inside the CSV file? If so, you could add a comment column for that (and not use it in the script)?

@jdarling
Copy link
Author

jdarling commented Jul 8, 2016

Not sure... So for us we have multiple user account types; instructor, validated-instructor, student, etc... I'd like to keep them separate (for management) yet run them all at the same time. One thought would be to use multiple CSV files, the other would be to have some type of comment line that could be set in the CSV. Maybe something like if the line begins with # it gets ignored.

Actually thinking about it now, it would be nicer to have named CSV sources. That way you could do something like {{ instructors.username }}. Maybe a way to do multiple sources per name.

Really needs more thought, and I'm rambling quite a bit :D.

@jdarling
Copy link
Author

jdarling commented Jul 8, 2016

Looking at the code I figured out I can put my data into multiple files and make payload an array. This worked well for the global data.

@danielo515
Copy link

Ideally, if the CSV includes headers we can omit the fields declarations and made all the headers available automatically.

@dbb613
Copy link

dbb613 commented Jan 8, 2018

Further this would be helpful so that Artillery can skip the header row rather than treat it like data, forcing me to manually remove headers or write custom logic to skip it in my custom code.

@Limess
Copy link

Limess commented Aug 7, 2018

If this isn't the case, can you add a note on this do this docs page:

https://artillery.io/docs/examples/#using-csv-files

There's no indication that headers are not supported and that they will be included in the first request.

@chrc
Copy link

chrc commented Aug 17, 2021

cf.

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

No branches or pull requests

6 participants