USE AGDWHDEV.EDW_WEATHER; -- My database and schema
CREATE OR REPLACE function EDW_WEATHER.find_nearest_radar()
returns table (LATITUDE number, LONGITUDE number)
as 'SELECT 1 LATITUDE, 1 LONGITUDE';
-- The function compiled successfully but when I ran it:
select EDW_WEATHER.find_nearest_radar();
-- I get this:
002141 (42601): SQL compilation error:
Unknown user-defined function EDW_WEATHER.FIND_NEAREST_RADAR
If I change the return type to a FLOAT (non-Table) or any simple return type, it works. Determined, I search the web and followed this example, at:
https://www.bmc.com/blogs/snowflake-user-defined-functions/
in the section "Snowflake table function"
but I got the same error! What am I doing wrong?