def METHOD_NAME(request):
  response = {'status': -1}
  cluster = json.loads(request.POST.get('cluster', '{}'))
  query_id = json.loads(request.POST.get('query_id'))
  api = _get_api(request.user, cluster=cluster)
  if query_id:
    LOG.debug("Attempting to get Impala query profile for query ID: %s" % (query_id))
    query_profile = api.get_query_profile_encoded(query_id)
    profile = analyzer.analyze(analyzer.parse_data(query_profile))
    ANALYZER.pre_process(profile)
    metrics = analyzer.metrics(profile)
    response['data'] = metrics
    response['status'] = 0
  return JsonResponse(response)