SSC-FDM-BQ0010

Geography function is not required in Snowflake.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Severity

Low

Description

This warning is added for using geographic functions in the values clause to insert data of this type. This is because they are not necessary and Snowflake automatically detects that the data follows the WGS 84 standard.

Code Example

Input:

IN -> BigQuery_01.sql
CREATE OR REPLACE TABLE test.geographyType
(
  COL1 GEOGRAPHY
);

INSERT INTO test.geographyType VALUES
(ST_GEOGFROMTEXT('POINT(-122.35 37.55)')), 
(ST_GEOGFROMTEXT('LINESTRING(-124.20 42.00, -120.01 41.99)'));

SELECT * FROM test.geographyType;

Output:

OUT -> BigQuery_01.sql
CREATE OR REPLACE TABLE test.geographyType
(
  COL1 GEOGRAPHY
);

INSERT INTO test.geographyType
VALUES
    (
     --** SSC-FDM-BQ0010 - THE FUNCTION 'ST_GEOGFROMTEXT' IS NOT REQUIRED IN SNOWFLAKE. **
     'POINT(-122.35 37.55)'), (
     --** SSC-FDM-BQ0010 - THE FUNCTION 'ST_GEOGFROMTEXT' IS NOT REQUIRED IN SNOWFLAKE. **
     'LINESTRING(-124.20 42.00, -120.01 41.99)');

ALTER SESSION SET GEOGRAPHY_OUTPUT_FORMAT = 'WKT';
SELECT * FROM
test.geographyType;

Recommendations

  • The use of these functions in the values clause in Snowflake is not allowed, you can use a subquery instead.

  • If you need more support, you can email us at [email protected]

Last updated