# Insert first lines as fields to each line

**URL:** https://discuss.elastic.co/t/insert-first-lines-as-fields-to-each-line/177385
**Category:** Logstash
**Created:** [April 18, 2019, 12:54am UTC](https://discuss.elastic.co/t/insert-first-lines-as-fields-to-each-line/177385 "2019-04-18T00:54:28Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 18, 2019, 2:01pm UTC](https://discuss.elastic.co/t/insert-first-lines-as-fields-to-each-line/177385/2 "2019-04-18T14:01:53Z")

</div>

[This](https://discuss.elastic.co/t/how-to-handle-metadata-in-file-headers/167544) thread might help you, but realize that this is fragile, and does not scale because you have to have '--pipeline.workers 1'

---

_[View the full topic](https://discuss.elastic.co/t/insert-first-lines-as-fields-to-each-line/177385)._
