# Webhdfs output not replacing placeholders for empty value

**URL:** <https://discuss.elastic.co/t/webhdfs-output-not-replacing-placeholders-for-empty-value/117626>\
**Category:** Logstash\
**Created:** [January 30, 2018, 1:32pm UTC](https://discuss.elastic.co/t/webhdfs-output-not-replacing-placeholders-for-empty-value/117626 "2018-01-30T13:32:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![parthkdas](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@parthkdas](https://discuss.elastic.co/u/parthkdas)\
**Post date:** [January 30, 2018, 1:32pm UTC](https://discuss.elastic.co/t/webhdfs-output-not-replacing-placeholders-for-empty-value/117626/1 "2018-01-30T13:32:59Z")

</div>

my logstash configuration working.But the putput is not placeholders with empty values.

sample input :  
0216042000018087881|ELECTRONIC WAYS|2017-12-16|8100.00||4812|Telecom||Primary

Actual output :  
0216042000018087881,ELECTRONIC WAYS,2017-12-16,8100.00, **%{description}** ,4812,Telecom,Primary

Expected output :  
0216042000018087881,ELECTRONIC WAYS,2017-12-16,8100.00,,4812,Telecom,Primary  
conf file :

```
input {
  file {
    path => "/Volumes/External/RnD/logstash/input-datas/cc/txn.csv"
    type => "transactions"
    start_position => "beginning"
    sincedb_path => "/Volumes/External/RnD/logstash/logstash-conf/sincedb.txt"
  }
filter {
  if [type] == "transactions" {
    grok {
      match => { "message" => "%{WORD:cust_id}\|(?<merchant_name>[^\|]*)\|(?<txn_date>\d{4}-\d{2}-\d{2})\|(?<amount>[^\|]*)\|(?<description>[^\|]*)\|(?<mcc_code>[^\|]*)\|(?<merchant_category>[^\|]*)\|(?<card_flag>[^\|]*)" }
    }
  }
}
output {
  if [type] == "transactions" {   
    if "_grokparsefailure" in [tags] {
      file {
        path => "/Volumes/External/RnD/logstash/output-datas/cc/failed.transactions.txt"
        codec => line { format => "%{message}"}
      }
    } else {
      webhdfs {
        host => "127.0.0.1" # (required)
        port => 50070 # (optional, default: 50070)
        path => "/Users/pkd/HadoopFolder/transactions/success.csv"
        user => "pkd" # (required)
        flush_size => 50000
        idle_flush_time => 2
        # retry_interval => 3
        retry_interval => 3
        #codec => line { format => "%{cust_id},%{merchant_name},%{txn_date},%{amount},%{description},%{mcc_code},%{merchant_category},%{card_flag}"}
      }
    }    
   }
  }
 }
```

---

<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:** [February 27, 2018, 1:33pm UTC](https://discuss.elastic.co/t/webhdfs-output-not-replacing-placeholders-for-empty-value/117626/2 "2018-02-27T13:33:05Z")

</div>

Closed on February 27, 2018, 1:33pm UTC

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