# Using wildcard on mutate for fieldname

**URL:** <https://discuss.elastic.co/t/using-wildcard-on-mutate-for-fieldname/145115>\
**Category:** Logstash\
**Created:** [August 20, 2018, 8:41am UTC](https://discuss.elastic.co/t/using-wildcard-on-mutate-for-fieldname/145115 "2018-08-20T08:41:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oms1226](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@oms1226](https://discuss.elastic.co/u/oms1226)\
**Post date:** [August 20, 2018, 8:41am UTC](https://discuss.elastic.co/t/using-wildcard-on-mutate-for-fieldname/145115/1 "2018-08-20T08:41:15Z")

</div>

I used below in logstash.config  
mutate {  
convert =\> { "goog\*" =\> "float" }  
}  
But didn't work.  
I want to convert all the fieldname getting prefix 'goog' TO float type.  
What will I fix ?  
I am waiting your help!

---

<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:** [August 20, 2018, 12:32pm UTC](https://discuss.elastic.co/t/using-wildcard-on-mutate-for-fieldname/145115/2 "2018-08-20T12:32:35Z")

</div>

Wildcards don't work there. You'll have to use a ruby filter for the conversion. I'm sure examples have been posted in the past.

---

<div class="post-metadata">

**Author:** ![oms1226](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@oms1226](https://discuss.elastic.co/u/oms1226)\
**Post date:** [August 21, 2018, 11:41am UTC](https://discuss.elastic.co/t/using-wildcard-on-mutate-for-fieldname/145115/3 "2018-08-21T11:41:07Z")

</div>

I can't find example post.  
I need your help.

---

<div class="post-metadata">

**Author:** ![oms1226](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@oms1226](https://discuss.elastic.co/u/oms1226)\
**Post date:** [August 21, 2018, 12:57pm UTC](https://discuss.elastic.co/t/using-wildcard-on-mutate-for-fieldname/145115/4 "2018-08-21T12:57:22Z")

</div>

I found that didn't work convert by using exact fieldname.  
ex\>  
in logstash.config :  
mutate {  
convert =\> { "googAccelerateRate" =\> "float" }  
}  
in real data: "googAccelerateRate": "0.18"

Why didn't work?

---

<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:** [September 18, 2018, 12:57pm UTC](https://discuss.elastic.co/t/using-wildcard-on-mutate-for-fieldname/145115/5 "2018-09-18T12:57:24Z")

</div>

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