compute default label in getData
add support for template variables in queries