Truncate ${failedEventsSummary} in reporter message

Solved!
tomasu
Level 1
Truncate ${failedEventsSummary} in reporter message

Hello, 

I currently have a reporter sending run reports via teams message. I've recently discovered that some of the reporters are failing silently due to the variable ${failedEventsSummary} being too long. I've tried treating the variable like a large string and manually truncating (failedEventsSummary[:100]) but it just prints that code in the message.

Any help would be much appreciated!

0 Kudos
1 Solution
tomasu
Level 1
Author

Of course minutes after posting I figure it out. I'll leave this here just in case anyone else has this issue.

The solution is to use the DSS function get:

"value": "${get(failedEventsSummary, 0, 500)} ..."

This will return the first 501 characters follow by " ... "

View solution in original post

0 Kudos
1 Reply
tomasu
Level 1
Author

Of course minutes after posting I figure it out. I'll leave this here just in case anyone else has this issue.

The solution is to use the DSS function get:

"value": "${get(failedEventsSummary, 0, 500)} ..."

This will return the first 501 characters follow by " ... "

0 Kudos

Labels

?
Labels (1)

Setup info

?
A banner prompting to get Dataiku