MSC-BQ0010

Geography function is not required in Snowflake.

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

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

BigQuery:

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;

Snowflake:

CREATE OR REPLACE TABLE test.geographyType
(
  COL1 GEOGRAPHY
);

INSERT INTO test.geographyType
VALUES(
--** MSC-WARNING - MSC-BQ0010 - THE FUNCTION 'ST_GEOGFROMTEXT' IS NOT REQUIRED IN SNOWFLAKE. **
'POINT(-122.35 37.55)'), (
--** MSC-WARNING - MSC-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 snowconvert-support@snowflake.com

Last updated