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
질문됨 6달 전100회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠