MSC-BQ0004

The OPTIONS clause within View is not supported in Snowflake.

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

Severity

Medium (waiting for CoE revision)

Description

This warning is added to the Create View and Create Materilized View statement when the OPTIONS clause is included there.

Code Example

Input Code:

CREATE VIEW mView
OPTIONS(
  enable_refresh = true,
  refresh_interval_minutes = 20,
  max_staleness = INTERVAL '4:0:0' HOUR TO SECOND,
  labels=[("org_unit", "testing")]
)
AS SELECT * from table1;

Output Code:

CREATE VIEW mView
----** MSC-ERROR - MSC-BQ0004 - THE OPTIONS CLAUSE WITHIN VIEW IS NOT SUPPORTED IN SNOWFLAKE. **
--  OPTIONS(
--    enable_refresh = true,
--    refresh_interval_minutes = 20,
--    max_staleness = INTERVAL '4:0:0' HOUR TO SECOND,
--    labels=[("org_unit", "testing")]
--  )
AS
SELECT * from
    table1;

Recommendations

  • For the description option in the View / Materialized View options clause which is a user-friendly description of the View / Materialized View, in Snowflake exists a comment clause that adds a comment or overwrites an existing comment for an existing object. These may have similar functionalities to be considered.

  • Add manual changes to the not-transformed expression.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated