27 Apr 2024 11:28 PM - edited 28 Apr 2024 12:44 AM
How can i extract only the GUID (in bold) from the following url using TRIM function with USQL:
test.abc.com/CRMX/workplace/home_dashboards.aspx?sitemappath=Workplace%7cMyWork%7cnav_dashboards&pagemode=iframe&dashboardId=%7bf2b9e0b0-57e7-ed12-9142-005046962a4c%7d&dashboardType=1031
SELECT useraction.targetUrl AS "DashboardId",
FROM useraction where useraction.targetUrl LIKE "*dashboardId*"
GROUP BY DashboardId
ORDER BY useraction.targetUrl DESC
Solved! Go to Solution.
28 Apr 2024 01:24 AM
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 🚨
https://docs.dynatrace.com/docs/shortlink/ba-business-events-capturing#report-business-event-rum
I hope it's helpful 💪