Replace _sourceName for count

Comments

4 comments

  • Avatar
    Azriel Nguyen

    Try this Eren,

    | replace(_sourcename,"{cluser}-{task-definition}-{revision}-{containername}-{id}","{task-definition}") as _sourcename 

     

    Unfortunately, it doesn't appear that wildcard works for this.  But knowing Sumo, there's better ways to skin this gator.

    If you only have a few of such _sourcenames, this should suffice.

     

    Az

    0
    Comment actions Permalink
  • Avatar
    Azriel Nguyen

    can use regex, try this:

    | replace(_sourcename,/.*{task-definition}.*/,"{task-definition}") as _sourcename 

    1
    Comment actions Permalink
  • Avatar
    Eren Güven

    Replace with regex was exactly what I was looking for, thanks Azriel!

    0
    Comment actions Permalink
  • Avatar
    Azriel Nguyen

    no problem, happy Sumo'ing

    0
    Comment actions Permalink

Please sign in to leave a comment.