# Help importing text file split by |

**URL:** <https://discuss.elastic.co/t/help-importing-text-file-split-by/265951>\
**Category:** Logstash\
**Created:** [March 2, 2021, 11:56am UTC](https://discuss.elastic.co/t/help-importing-text-file-split-by/265951 "2021-03-02T11:56:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomrobbiebf](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@randomrobbiebf](https://discuss.elastic.co/u/randomrobbiebf)\
**Post date:** [March 2, 2021, 11:56am UTC](https://discuss.elastic.co/t/help-importing-text-file-split-by/265951/1 "2021-03-02T11:56:14Z")

</div>

Hey all,

I have multiple text files i am trying to import what i currently have imports the text files but ideally i need to split each line.

the lines of the text files i am importing look like

`aXsdA|http://someurl`

What i would like to do is import the text file have the bit before the `|` named as tag and the second part named as `url`

I tried as a CVS with the delimiter as | but no joy kept erroring out.

```auto
input {
file {
         type => "app"
         path => ["/home/u/archives/urlteam_2021-02-27-21-17-02/goo-gl/ ______.txt"]
         start_position => "beginning"
         sincedb_path => "/dev/null"
   } 
}

output {
stdout {
 codec => dots
}
elasticsearch { 
hosts => ["192.168.1.210:9200"] 
index => "urlhunter"
}

}

```

---

<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:** [March 2, 2021, 5:45pm UTC](https://discuss.elastic.co/t/help-importing-text-file-split-by/265951/2 "2021-03-02T17:45:32Z")

</div>

> [@randomrobbiebf](#):
>
> but no joy kept erroring out.

What configuration did you try and what error did you get?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 30, 2021, 5:45pm UTC](https://discuss.elastic.co/t/help-importing-text-file-split-by/265951/3 "2021-03-30T17:45:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
