Skip to main content

Home

Regular Expressions (regex)

You can add regular expressions (regex) to AutoActions templates when you narrow the scope of UserQueueCluster, Workspace, Time, and Application Name by using Only or Except. Use the Transform box to specify the regex. You must first select the scope (UserQueueCluster, Workspace, TimeApplication Name ) and only specify the regular expressions.

In the following example, the Application name is used in the Only mode for SelectApps. The following regex is added in the Transform box, which is applied only for SelectApps.

regex/(.*)(GetReportGeneric|PreReport|final_vmin_v1_SAND_rkaranax_220406_1721_debug_3)(.*)/IntelMidasReports101/g
auto-actions-app-name-regex.png

Other regex examples for AutoActions:

regex/^svc.*/serviceAccounts/g

regex/^svc. */serviceAccounts/g

regex/*condition-identification-processing-pipeline-wf*/cipp-wf/g

regex/^(xalxq)(.*)/serviceAccounts/g

regex/( .*)(_dc_l_logger_)(.*)/streamingJobs/g

regex/. {5 }/User5plus/g
.{5,}

regex/^(alter|invalidate|refresh)(.*)/dataRefreshQueries/g
{"enabled":true,"admin":true,"policy_name":"AutoAction2","policy_id":10,"instance_id":"3955285931312492702","name_by_user":"Long Running Databricks Job with Include owner","description_by_user":"Long Running Databricks Job with include owner email","created_by":"admin","last_edited_by":"admin","created_at":1664884043240,"updated_at":1664884043240,"rules":[{"OR":[{"scope":"Databricks jobs","metric":"totalDuration","compare":">=","value":5000},{"scope":"Databricks jobs","metric":"cost","compare":">=","value":1}]}],"actions":[],"cluster_mode":0,"cluster_list":[],"cluster_transform":"","queue_mode":0,"queue_list":[],"queue_transform":"","user_mode":2,"user_list":["vlad","sandip"],"user_transform":"regex/^.*[.](.+)[.](.+)$/$2/","app_mode":1,"app_list":[],"app_transform":"","sustain_mode":0,"sustain_time":0,"time_mode":0}

Note

Keyword regex is mandatory. regex keyword is similar to substitute s in regular expressions.