title: Grafana is that possible to map prometheus label values according to another key-value pair variable?
body: <p>I have a prometheus metric like this:</p>
  
  <pre><code>lines_added{project="xx",user="xx"}
  </code></pre>
  
  <p>the project label and user label are integer ids, not good for legend on graph.</p>
  
  <p>and I have another variable <code>members</code> as query from postgresql datasource:</p>
  
  <pre><code>select u.id as __value,u.name as __text 
  from project_authorizations pa left join users u 
  on pa.user_id = u.id 
  where pa.project_id=[[project]]
  </code></pre>
  
  <p>now for the <code>lines_added</code> metric how can I make it display user's real name according "id"->"name" mapping in variable <code>members</code></p>
  
  <p>Is that possible with grafana?</p>