Timestream: Make FROM clause depend on IF or CASE Statement

0

Hey there,

I'm working with a Grafana Dashboard querying Timestream Data and I am looking for a solution to do the following:

SELECT temperature
FROM 
if(${my_variable} = '1', "my-database"."my-table", "my-database-derived"."my-table-derived")

${my_variable} results from a variable in my dashboard. Dependent on that value, I want to request the data from either the regular database or the derived one.

How can I make that work?

Thank you for any help!

nico
feita há 6 meses100 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas