SnowConvert: BigQuery Issues¶
Note
Conversion Scope
SnowConvert for Google BigQuery currently supports assessment and translation for TABLES and VIEWS. Although SnowConvert can recognize other types of statements, they are not fully supported.
This page provides a comprehensive reference for how SnowConvert translates Google BigQuery grammar elements to Snowflake equivalents. In this translation reference, you will find code examples, functional equivalence results, key differences, recommendations, known issues, and descriptions of each transformation.
SSC-EWI-BQ0001¶
Snowflake does not support the options clause.
Warning
This EWI is deprecated; please refer to SSC-EWI-0016 for the latest version of this EWI.
Severity ¶
Medium
Description ¶
This EWI is added to DDL statements when the OPTIONS
has unsupported options by Snowflake.
Code Example ¶
Input Code:
BigQuery¶
CREATE VIEW my_view
OPTIONS (
expiration_timestamp=TIMESTAMP "2026-01-01 00:00:00 UTC",
privacy_policy='{"aggregation_threshold_policy": {"threshold": 50, "privacy_unit_columns": "ID"}}'
) AS
SELECT column1, column2
FROM my_table;
Output Code:
Snowflake¶
CREATE VIEW my_view
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0001 - SNOWFLAKE DOES NOT SUPPORT THE OPTIONS: EXPIRATION_TIMESTAMP, PRIVACY_POLICY ***/!!!
OPTIONS(
expiration_timestamp=TIMESTAMP "2026-01-01 00:00:00 UTC",
privacy_policy='{"aggregation_threshold_policy": {"threshold": 50, "privacy_unit_columns": "ID"}}'
)
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "bigquery", "convertedOn": "03/26/2025", "domain": "test" }}'
AS
SELECT column1, column2
FROM
my_table;
Recommendations ¶
Add manual changes to the not-transformed expression.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0002¶
Micro-partitioning is automatically performed on all Snowflake tables.
Note
This issue is deprecated and no longer generated by SnowConvert
Severity¶
Medium
Description¶
This warning is added to the Create table when the partition by clause is present. PARTITION BY
is an optional clause that controls table partitioning but is not supported in Snowflake.
All data in Snowflake tables is automatically divided into micro-partitions, which are contiguous units of storage. Each micro-partition contains between 50 MB and 500 MB of uncompressed data. This size and structure allows for extremely granular pruning of very large tables, which can be comprised of millions, or even hundreds of millions, of micro-partitions.
Snowflake stores metadata about all rows stored in a micro-partition, including:
The range of values for each of the columns in the micro-partition.
The number of distinct values.
Additional properties used for both optimization and efficient query processing.
Also the tables are transparently partitioned using the ordering of the data as it is inserted/loaded. For more information please refer to Benefits of Micro-partitioning.
Code Example¶
Input Code:¶
BigQuery¶
CREATE TABLE table1(
transaction_id INT,
transaction_date DATE
)
PARTITION BY transaction_date;
Generated Code:¶
Snowflake¶
CREATE TABLE table1 (
transaction_id INT,
transaction_date DATE
)
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0002 - MICRO-PARTITIONING IS AUTOMATICALLY PERFORMED ON ALL SNOWFLAKE TABLES. ***/!!!
PARTITION BY transaction_date
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "bigquery", "convertedOn": "04/09/2025", "domain": "test" }}';
Recommendations¶
No additional user actions are required, it is just informative.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0003¶
Snowflake does not support differential privacy.
Severity¶
Medium
Description¶
BigQuery allows applying differential privacy over some statistical functions to introduce noise in the data, making difficult the subtraction of information about individuals when analyzing the query results.
Differential privacy is not supported in Snowflake, any use of it will be commented out and this error will be generated to inform the user about this.
Code Example¶
Input Code:¶
BigQuery¶
SELECT
WITH DIFFERENTIAL_PRIVACY
OPTIONS(epsilon=10, delta=.01, max_groups_contributed=2, privacy_unit_column=id)
item,
COUNT(quantity, contribution_bounds_per_group => (0,100)) total_quantity
FROM professors
GROUP BY item;
Generated Code:¶
Snowflake¶
SELECT
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0003 - SNOWFLAKE DOES NOT SUPPORT DIFFERENTIAL PRIVACY. ***/!!!
WITH DIFFERENTIAL_PRIVACY
OPTIONS(epsilon=10, delta=.01, max_groups_contributed=2, privacy_unit_column=id)
item,
COUNT(quantity,
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0003 - SNOWFLAKE DOES NOT SUPPORT DIFFERENTIAL PRIVACY. ***/!!! contribution_bounds_per_group => (0,100)) total_quantity
FROM
professors
GROUP BY item;
Recommendations¶
Analyze the results of the query with and without differential privacy, the results may differ slightly due to the absence of noise in the data.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0004¶
Snowflake does not support named windows.
Severity¶
Medium
Description¶
BigQuery allows the definition and usage of named windows in aggregate functions, they are defined in the WINDOW
clause of the query they are used and can be used inside the OVER
clause of these functions.
Snowflake does not support declaring named windows, please consider taking the window definition and apply it to all usages of that window directly in the OVER
clause of the functions.
Code Example¶
Input Code:¶
BigQuery¶
SELECT
COUNT(col1) OVER(myWindow)
FROM
test.exampleTable
WINDOW
myWindow AS (ORDER BY col2);
Generated Code:¶
Snowflake¶
SELECT
COUNT(col1)
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0004 - SNOWFLAKE DOES NOT SUPPORT NAMED WINDOWS. ***/!!! OVER(myWindow)
FROM
test.exampleTable
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0004 - SNOWFLAKE DOES NOT SUPPORT NAMED WINDOWS. ***/!!!
WINDOW
myWindow AS (ORDER BY col2);
Recommendations¶
Review your named window definitions, it might be possible to take the definition and apply it to the
OVER
clause of the functions it is used in. However, keep in mind the functional differences between BigQuery and Snowflake window frames still apply, take the following case as an example:
BigQuery:
SELECT
COUNT(col1) OVER(myWindow)
FROM
test.exampleTable
WINDOW
myWindow AS (ORDER BY col2);
Snowflake:
SELECT
COUNT(col1) OVER(ORDER BY col2)
FROM
test.exampleTable;
These two queries will produce the same rows but the Snowflake results will not be ordered, this is because the ORDER BY
clause for window frames does not impact the entire query ordering as it does in BigQuery.
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0005¶
Javascript code has not been validated.
Severity¶
High
Description¶
SnowConvert does not transform Javascript code. Since the Javascript code extracted from BigQuery’s functions hasn’t been changed at all, this code might need some tweaks to work on Snowflake.
Code Example¶
Input Code:¶
BigQuery¶
CREATE FUNCTION test.languageJs (x integer, y integer)
RETURNS integer
LANGUAGE js
AS "return x * y;";
Generated Code:¶
Snowflake¶
CREATE FUNCTION test.languageJs (x DOUBLE, y DOUBLE)
RETURNS DOUBLE
LANGUAGE JAVASCRIPT
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0005 - JAVASCRIPT CODE HAS NOT BEEN VALIDATED. ***/!!!
AS
$$
return x * y;
$$;
Recommendations¶
Review all Javascript code before deployment.
Javascript parameters in Snowflake must be uppercase.
For more information, visit Snowflake’s Introduction to Javascript UDFs.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0006¶
Oriented parameter in the ST_GEOGFROMTEXT function is not supported in Snowflake.
Severity¶
Low
Description¶
This warning is added when the oriented parameter is specified in the ST_GEOGFROMTEXT
function, because it is not supported in Snowflake. If this parameter is set to TRUE, any polygon in the input is assumed to be oriented as follows: if someone walks along the polygon boundary in the order of the input vertices, the interior of the polygon is to the left. This allows WKT to represent polygons larger than a hemisphere. If oriented is FALSE or omitted, this function returns the polygon with the smallest area.
Code Example¶
Input Code:¶
BigQuery¶
SELECT ST_GEOGFROMTEXT('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))', TRUE);
Generated Code:¶
Snowflake¶
SELECT
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0006 - ORIENTED PARAMETER IN THE ST_GEOGFROMTEXT FUNCTION IS NOT SUPPORTED IN SNOWFLAKE. ***/!!!
ST_GEOGFROMTEXT('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))');
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0007¶
Escape Sequence is not valid in Snowflake.
Severity¶
Low
Description¶
Bell character (\a) and Vertical character (\v) are valid escape sequences in BigQuery, but not in Snowflake.
This warning is added when a bell character or vertical character escape sequence is found when translating BigQuery code. More about Snowflake Escape Sequences.
Code Example¶
Input Code:¶
BigQuery¶
SELECT "\a";
SELECT "\v";
Generated Code:¶
Snowflake¶
SELECT
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0007 - ESCAPE SEQUENCE \a IS NOT VALID IN SNOWFLAKE. ***/!!!
'\a';
SELECT
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0007 - ESCAPE SEQUENCE \v IS NOT VALID IN SNOWFLAKE. ***/!!!
'\v';
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0008¶
Eight hex digit Unicode escape sequence is not supported in Snowflake.
Severity¶
Low
Description¶
BigQuery supports Unicode sequences of 8 hex digits. Snowflake doesn’t support this kind of Unicode sequences.
This warning is added when an 8 hex digits Unicode sequence is found when translating BigQuery code. More about BigQuery Escape Sequences.
Code Example¶
Input Code:¶
Snowflake¶
SELECT "\U00100000";
Generated Code:¶
First Tab¶
SELECT
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0008 - EIGHT HEX DIGIT UNICODE ESCAPE SEQUENCE IS NOT SUPPORTED IN SNOWFLAKE ***/!!!
'\U00100000';
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0009¶
SnowConvert was unable to generate correct return table clause.
Severity¶
High
Description¶
Snowflake requires a valid RETURNS TABLE clause for CREATE TABLE FUNCTION statements. SnowConvert has to build a new one from the ground up. To do this, an analysis is made on the CREATE TABLE FUNCTION query in order to properly infer the types of the columns of the resulting table, however there may be scenarios where SnowConvert currently has a limitation to be able to build the return clause properly.
These scenarios will be considered in the future, but in the meantime this error will be added.
Code Example¶
Input Code:¶
BigQuery¶
CREATE TABLE FUNCTION tableValueFunction2()
AS
SELECT *
REPLACE("John" AS employee_name)
FROM employees;
Generated Code:¶
Snowflake¶
CREATE FUNCTION tableValueFunction2 ()
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0009 - SNOWCONVERT WAS UNABLE TO GENERATE THE CORRECT RETURN TABLE CLAUSE, DUE TO MISSING REFERENCES. ***/!!!
RETURNS TABLE (
)
AS
$$
SELECT
* REPLACE("John" AS employee_name) !!!RESOLVE EWI!!! /*** SSC-EWI-0073 - PENDING FUNCTIONAL EQUIVALENCE REVIEW FOR 'ExceptReplaceOperator' NODE ***/!!!
FROM
employees
$$;
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-FDM-BQ0010¶
Geography function is not required in Snowflake.
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:¶
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;
Output:¶
Query¶
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 snowconvert-support@snowflake.com
SSC-EWI-BQ0011¶
Session variable assignment of complex datatype is not supported in Snowflake
Severity¶
Medium
Description¶
In BigQuery, declaring a variable at script level allows it to be used in the entire script, to replicate this behavior in Snowflake SQL variables are used.
However, declaring variables of datatypes that are complex like ARRAY, GEOGRAPHY, STRUCT or JSON will fail in Snowflake when trying to set the value to the SQL variable. When SnowConvert detects one of such cases then this is EWI will be added to the SQL variable declaration.
Variables of these types can be declared without problems inside block statements and other procedural statements, this EWI applies only for variables declared at script level.
Example code¶
Input Code:¶
BigQuery¶
CREATE TABLE test.JsonTable
(
col1 JSON
);
DECLARE myVar1 JSON DEFAULT JSON'{"name": "John", "age": 30}';
INSERT INTO test.JsonTable VALUES (myVar1);
BEGIN
DECLARE myVar2 JSON DEFAULT JSON'{"name": "Mike", "age": 27}';
INSERT INTO test.JsonTable VALUES (myVar2);
END;
SELECT col1 FROM test.JsonTable;
Generated Code:¶
Snowflake¶
CREATE TABLE test.JsonTable
(
col1 VARIANT
)
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "bigquery", "convertedOn": "07/02/2025", "domain": "no-domain-provided" }}';
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0011 - SESSION VARIABLE ASSIGNMENT OF COMPLEX DATATYPE IS NOT SUPPORTED IN SNOWFLAKE ***/!!!
SET myVar1 = (
SELECT
PARSE_JSON('{"name": "John", "age": 30}')
);
INSERT INTO test.JsonTable
VALUES ($myVar1);
BEGIN
LET myVar2 VARIANT DEFAULT PARSE_JSON('{"name": "Mike", "age": 27}');
INSERT INTO test.JsonTable
VALUES (:myVar2);
END;
SELECT col1 FROM
test.JsonTable;
Recommendations¶
If the uses of the variable are limited to a single scope or its value is never modified, consider declaring the variable locally in the scopes that use it, that will solve the issue.
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0012¶
Unable to generate correct OBJECT_CONSTRUCT parameter
Severity¶
High
Description¶
SnowConvert is not enable to generatedthe correct object construct due to symbol not being loaded correctly.
Code Example¶
Input Code:¶
BigQuery¶
INSERT INTO test.tuple_sample
VALUES
((12, 34)),
((56, 78)),
((9, 99)),
((12, 35));
Generated Code:¶
Snowflake¶
INSERT INTO test.tuple_sample
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0012 - UNABLE TO GENERATE CORRECT OBJECT_CONSTRUCT PARAMETER. SYMBOL INFORMATION COULD NOT BE COLLECTED. ***/!!!
VALUES
((12, 34)),
((56, 78)),
((9, 99)),
((12, 35));
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0013¶
External table data format not supported in snowflake
Warning
This EWI is deprecated; please refer to SSC-EWI-0029 for the latest version of this EWI.
Severity¶
Medium
Description¶
Snowflake supports the following BigQuery formats:
BigQuery |
Snowflake |
---|---|
AVRO |
AVRO |
CSV |
CSV |
NEWLINE_DELIMITED_JSON |
JSON |
ORC |
ORC |
PARQUET |
PARQUET |
When a external table has other FORMAT not specified in the above table, this EWI will be generated to inform the user that the FORMAT is not supported.
Code Example¶
Input Code:¶
BigQuery¶
CREATE OR REPLACE EXTERNAL TABLE test.backup_restore_table
OPTIONS (
format = 'DATASTORE_BACKUP',
uris = ['gs://backup_bucket/backup_folder/*']
);
Generated Code:¶
Snowflake¶
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0013 - EXTERNAL TABLE DATA FORMAT NOT SUPPORTED IN SNOWFLAKE ***/!!!
CREATE OR REPLACE EXTERNAL TABLE test.backup_restore_table
OPTIONS (
format = 'DATASTORE_BACKUP',
uris = ['gs://backup_bucket/backup_folder/*']
);
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0014¶
Hive partitioned external tables are not supported in snowflake
Severity¶
Medium
Description¶
Snowflake does not support hive partitioned external tables, when the WITH PARTITION COLUMNS clause is found in the external table, it will be marked as not supported using this EWI.
Code Example¶
Input Code:¶
BigQuery¶
CREATE EXTERNAL TABLE test.CustomHivePartitionedTable
WITH PARTITION COLUMNS (
field_1 STRING,
field_2 INT64)
OPTIONS (
uris = ['gs://sc_external_table_bucket/folder_with_parquet/*'],
format = 'PARQUET',
hive_partition_uri_prefix = 'gs://sc_external_table_bucket/folder_with_parquet',
require_hive_partition_filter = false);
Generated Code:¶
Snowflake¶
CREATE OR REPLACE TEMPORARY FILE FORMAT SC_TEST_CUSTOMHIVEPARTITIONEDTABLE_FORMAT
TYPE = PARQUET;
CREATE EXTERNAL TABLE test.CustomHivePartitionedTable USING TEMPLATE (
SELECT
ARRAY_AGG(OBJECT_CONSTRUCT('COLUMN_NAME', COLUMN_NAME, 'TYPE', TYPE, 'NULLABLE', NULLABLE, 'EXPRESSION', EXPRESSION))
FROM
--** SSC-FDM-0035 - THE INFER_SCHEMA FUNCTION REQUIRES A FILE PATH WITHOUT WILDCARDS TO GENERATE THE TABLE TEMPLATE, REPLACE THE FILE_PATH PLACEHOLDER WITH IT **
TABLE(INFER_SCHEMA(LOCATION => '@EXTERNAL_STAGE/FILE_PATH', FILE_FORMAT => 'SC_TEST_CUSTOMHIVEPARTITIONEDTABLE_FORMAT'))
)
!!!RESOLVE EWI!!! /*** SSC-EWI-0032 - EXTERNAL TABLE REQUIRES AN EXTERNAL STAGE TO ACCESS gs://sc_external_table_bucket, DEFINE AND REPLACE THE EXTERNAL_STAGE PLACEHOLDER ***/!!!
LOCATION = @EXTERNAL_STAGE
AUTO_REFRESH = false
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0014 - HIVE PARTITIONED EXTERNAL TABLES ARE NOT SUPPORTED IN SNOWFLAKE ***/!!!
WITH PARTITION COLUMNS (
field_1 STRING,
field_2 INT64)
PATTERN = 'folder_with_parquet/.*'
FILE_FORMAT = (TYPE = PARQUET)
!!!RESOLVE EWI!!! /*** SSC-EWI-0016 - SNOWFLAKE DOES NOT SUPPORT THE OPTIONS: HIVE_PARTITION_URI_PREFIX, REQUIRE_HIVE_PARTITION_FILTER. ***/!!!
OPTIONS(
hive_partition_uri_prefix = 'gs://sc_external_table_bucket/folder_with_parquet',
require_hive_partition_filter = false
)
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "bigquery", "convertedOn": "07/02/2025", "domain": "no-domain-provided" }}';
Recommendations¶
If you need more support, you can email us at snowconvert-support@snowflake.com
SSC-EWI-BQ0015¶
External table requires an external stage to access a external location, define and replace the EXTERNAL_STAGE placeholder
Warning
This EWI is deprecated; please refer to SSC-EWI-0032 for the latest version of this EWI.
Description¶
When transforming the CREATE EXTERNAL TABLE statement, SnowConvert will generate an EXTERNAL_STAGE placeholder that has to be replaced with the external stage created for connecting with the external location from Snowflake.
Please refer to the following guides to set up the necessary Storage Integration and External Stage in your Snowflake account:
Code Example¶
Input Code:¶
BigQuery¶
CREATE OR REPLACE EXTERNAL TABLE test.Employees_test
(
Employee_id INTEGER,
Name STRING,
Mail STRING,
Position STRING,
Salary INTEGER
)
OPTIONS(
FORMAT='CSV',
SKIP_LEADING_ROWS=1,
URIS=['gs://sc_external_table_bucket/folder_with_csv/Employees.csv']
);
Generated Code:¶
Snowflake¶
CREATE OR REPLACE EXTERNAL TABLE test.Employees_test
(
Employee_id INTEGER AS CAST(GET_IGNORE_CASE($1, 'c1') AS INTEGER),
Name STRING AS CAST(GET_IGNORE_CASE($1, 'c2') AS STRING),
Mail STRING AS CAST(GET_IGNORE_CASE($1, 'c3') AS STRING),
Position STRING AS CAST(GET_IGNORE_CASE($1, 'c4') AS STRING),
Salary INTEGER AS CAST(GET_IGNORE_CASE($1, 'c5') AS INTEGER)
)
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0015 - EXTERNAL TABLE REQUIRES AN EXTERNAL STAGE TO ACCESS gs://sc_external_table_bucket, DEFINE AND REPLACE THE EXTERNAL_STAGE PLACEHOLDER ***/!!!
LOCATION = @EXTERNAL_STAGE
AUTO_REFRESH = false
PATTERN = 'folder_with_csv/Employees.csv'
FILE_FORMAT = (TYPE = CSV SKIP_HEADER =1);
Recommendations¶
Set up your external connection in the Snowflake account and replace the EXTERNAL_STAGE placeholder to complete the transformation.
If you need more support, you can email us at snowconvert-support@snowflake.com