# How to escape row separator is there in the data

**URL:** <https://discuss.elastic.co/t/how-to-escape-row-separator-is-there-in-the-data/52953>\
**Category:** Logstash\
**Created:** [June 16, 2016, 5:54am UTC](https://discuss.elastic.co/t/how-to-escape-row-separator-is-there-in-the-data/52953 "2016-06-16T05:54:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![baneshbanna](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@baneshbanna](https://discuss.elastic.co/u/baneshbanna)\
**Post date:** [June 16, 2016, 5:54am UTC](https://discuss.elastic.co/t/how-to-escape-row-separator-is-there-in-the-data/52953/1 "2016-06-16T05:54:55Z")

</div>

How to escape if row separator is there in the data.Field is enclosed.

245544007,247794,6/15/2016 11:46,Your Account is verified with Pan Card. Now you can make payments and do more with your account. Thank you! for verifying your account.,1,0,0,,INFOGN,124132,106.220.26.57,0,1  
245543992,274603,6/15/2016 11:46,"We provide  
Corporate Identity, Logo, Brochures, Website, E-Commerce, Android Application development & Bulk email Marketing Service.  
Regards,  
Ashok Mathur  
Gdesign Studioo  
9166335222",2,0,0,,,p245543950,115.252.210.248,0,1

input{  
file{  
delimiter=\>"  
"  
path =\> ["/apps/samplelogs/EMPTY/tl\_sent/\*"]  
start\_position =\> "beginning"  
type=\>"\_SENT"  
close\_older=\>"300"  
max\_open\_files=\>"5000"  
discover\_interval=\>5  
ignore\_older=\>172800  
sincedb\_path=\>"/apps/sincedb/sin.log"  
}  
}

filter{  
if [message] =~ /^\s\*$/ {  
drop { }  
}

```
csv { quote_char => '"'    
       separator=>","
       autogenerate_column_names=>"false"               
       columns=>["id","userid","date","message_str","howmany","groupid","totalcredits","sched","origin","url","ipaddress","processing","groupMemberCount"]
    }
  if[date] and [date]!='null' and [date]!='NULL'{
       date {
           match => ["date", "MM/dd/yyyy HH:mm"]
           target =>"date"
           timezone=>"Asia/Kolkata"
     }
      grok {
           match => { "date" => "(?<txttlsentindexdate>[0-9]{4}\-[0-9]{2})"}
           }
    }
       if![date] or [date]=='null' or [date]=='NULL'{
       grok {               
           match => { "@timestamp" => "(?<txttlsentindexdate>[0-9]{4}\-[0-9]{2})"}
          }
       ruby {
              code => "event['date'] = nil"
            }       
    }
  mutate {
        convert => { "id" => "integer" }
        convert => { "userid" => "integer" }
        convert => { "howmany" => "integer" }
        convert => { "groupid" => "integer" }
        convert => { "totalcredits" => "integer" }
     }

```

}  
output{  
stdout{codec=\>rubydebug}  
}

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 16, 2016, 8:14am UTC](https://discuss.elastic.co/t/how-to-escape-row-separator-is-there-in-the-data/52953/2 "2016-06-16T08:14:25Z")

</div>

Please give an example of the kind of line you're talking about.

---

<div class="post-metadata">

**Author:** ![baneshbanna](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@baneshbanna](https://discuss.elastic.co/u/baneshbanna)\
**Post date:** [June 16, 2016, 8:36am UTC](https://discuss.elastic.co/t/how-to-escape-row-separator-is-there-in-the-data/52953/3 "2016-06-16T08:36:35Z")

</div>

Please find the sample record.row delimiter is \r\n and \r\n is included in data in second record

.  
Please suggest how to escape

---

<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:** [July 6, 2017, 4:52am UTC](https://discuss.elastic.co/t/how-to-escape-row-separator-is-there-in-the-data/52953/4 "2017-07-06T04:52:31Z")

</div>


