Hello,
When using SQL Runner from the Develop Tab, if I run a query on a table as follows -
SELECT TOP 10 * FROM TABLE;
Then I click the gear Icon and attempt to move from SQL Runner to "Explore"
The connection to our Snowflake Database encounters an error while running the query.
More specifically, clicking Explore from the runner appears to construct a query where WITH sql_runner_query is used -
For whatever reason, while it appears that two of my fields are established with AS references that incorporate the sql_runner_query inside quotes, in the subsequent definition of the sql_runner_location value, the references to sql_runner_query.latitude and sql_runner_query.longitude instead place the quotes on the right of the word sql_runner_query.
i.e.
sql_runner_query."latitude"
instead of
"sql_runner_query.latitude"
Snowflake fails with the error message -
WITH sql_runner_query AS (SELECT TOP 10 * FROM PUBLIC.TABLE) SELECT sql_runner_query."LATITUDE" AS "sql_runner_query.latitude", sql_runner_query."LONGITUDE" AS "sql_runner_query.longitude",
CASE WHEN sql_runner_query."latitude" IS NOT NULL AND sql_runner_query."longitude" IS NOT NULL THEN (
COALESCE(CAST(sql_runner_query."latitude" AS VARCHAR),'') || ',' ||
COALESCE(CAST(sql_runner_query."longitude" AS VARCHAR),'')) ELSE NULL END
AS "sql_runner_query.location"
FROM sql_runner_query
GROUP BY
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41
ORDER BY
1
FETCH NEXT 5000 ROWS ONLY
Hey there, this looks like it might need a little more digging into. I recommend reaching out to our Support team. You can reach Looker Support by using the Google Cloud console or by using the Looker in-app support widget. To use in-app support, click the Get Support option from the Help menu in the upper right-hand corner of the app.