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
posta 6 mesi fa100 visualizzazioni
Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande