AMBARI-6266 - Get sql metrics logic should be reviewed