Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trim GUID from a URL


How can i extract only the GUID (in bold) from the following url using TRIM function with USQL:


SELECT useraction.targetUrl AS "DashboardId",
FROM useraction where useraction.targetUrl LIKE "*dashboardId*"
GROUP BY DashboardId
ORDER BY useraction.targetUrl DESC


Dynatrace Pro
Dynatrace Pro

Hi @dataplayer 
The function TRIM or some function that make the same functionality (like in SQL Database) doesn't exist in Dynatrace USQL.

I think in 2 possibilities to help you:

1 .- Use Session and action properties: If you can catch the same data (targetUrl) with any "Expression type " , you can apply Regex (Apply cleanup rule) . Then you can use that value in USQL 💪


2.- Business Event:  If you want to identify and apply some rules like TRIM. Or You can and want to send exactly the value of DashboardID . I recommend you use Business Event 🚨 

I hope it's helpful 💪

Pierre Gutierrez - LATAM ACE Consultant - Loving Cats! Loving Technology !

Featured Posts