Database and table variables working

Hi,

I have a query in my panel in my dashboard where I get the database and table from variables. I got it working on one of my dashboards, but for some reason I can’t get it working on another.

SELECT 
  "Date", 
  "EID Not Found" AS "Product without RFID tag"
FROM ${databasePERC}.${tablePERC}
WHERE "Filter" = 'day'
ORDER BY time DESC
LIMIT 30

error:

ValidationException: The query syntax is invalid at line 4:34

The query variables are query all databases and tables from my AWS Timestream through my datasource. I show the valiables (with label) on my dashboard so I can swap between datasources to change what I see in my panels.

The variable names match up, so I know that’s not the issue.

Somebody know anything?

Try to add Text panel so as to visualize the value of:

Would your query work if you replace variables in query with their values copied from the text panel?

Or try
${databasePERC:doublequote}.${tablePERC:doublequote}
May be your database name or table name contain dashes or other ‘bad’ symbols

yea got it working like this now:

FROM ${databasePERC}.${tablePERC}

FROM "${databasePERC}"."${tablePERC}"

weird, because the first dashboard I got variables working I didn’t use quotes, but it worked anyway.

May be values of the variables at that dashboard didn’t contain dashes etc., but on this they do have