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

  • Avatar
    Azriel Nguyen

    can use regex, try this:

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

  • Avatar
    Eren Güven

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

  • Avatar
    Azriel Nguyen

    no problem, happy Sumo'ing

Please sign in to leave a comment.