Language structures support

This section provides information on the support for dependencies mapping for Snowflake SQL commands (DDL, DML, and query syntax).
The list of commands is not 100% complete, and we are constantly expanding the capabilities of our analysis.

Glossary

Script: used as a synonym for the source file.

Relationships

A relationship is the simplest relationship between objects, it represents a connection between them, there are different kinds of relationships
  • Script relationship: (Script)−action→(Object)
    The script relationship represents an "action" that is being executed inside the script towards an object.
    E.g.:
    UPDATE DB.SCH.T1 SET value1 = newValue;
    (file.sql)−UPDATE→(DB.SCH.T1)
  • Contains relationship: (Script)−contains→(Object)
    The contains relationship is defined by CREATE commands. This will generate elements known as Objects otherwise the Objects found are called Missing Objects.
    E.g.:
    CREATE TABLE DB.SCH.T1 (...
    (file.sql)−CONTAINS→(DB.SCH.T1)

Dependencies

A dependency is a strong link between two objects. Most of the time the dependent object needs that dependency relationship so it can work.
  • Reference: (Object1)−REFERENCES→(Object2)
    The reference relationship is defined by the use of an Object inside a command, each object that has a "parent" identified will have this relationship. The Missing Object type will be used when the usage of an object is found, but the creation statement for the object was not.
    E.g.:
    CREATE VIEW DB.SCH.V1 AS SELECT * FROM DB.SCH.T1;
    (DB.SCH.V1)−REFERENCES→(DB.SCH.T1)

DDL Commands

Most DDL commands generate dependencies (or simple relationships). The CREATE command is pretty unique given its nature of generating objects, so we will be adding a specific block for it.
Command
Type
Support Status
ALTER <object>
Script relationship
Not supported
COMMENT
Script relationship
Not supported
DESCRIBE <object>
Script relationship
Not supported
DROP <object>
Script relationship
Not supported
SHOW <object>
Script relationship
Not supported
USE <object>
Script relationship
Not supported

CREATE <object>

This command can be used with Account and Database objects, which in turn gives it a lot of different variations, each with a specific syntax. Usually, the more complex syntax will be less likely that the scanner will identify it.

Create [Account objects]

Command
Type
Support Status
CREATE CONNECTION
Contains relationship
Not supported
CREATE NETWORK POLICY
Contains relationship
Not supported
CREATE RESOURCE MONITOR
Contains relationship
Not supported
CREATE SHARE
Contains relationship
Not supported
CREATE ROLE
Contains relationship
Not supported
CREATE USER
Contains relationship
Not supported
CREATE WAREHOUSE
Contains relationship
Not supported
CREATE DATABASE
Contains relationship
Supported
CREATE DATABASE … CLONE
Contains relationship
Supported
CREATE NOTIFICATION INTEGRATION
Contains relationship
Not supported
CREATE SECURITY INTEGRATION
Contains relationship
Not supported
CREATE SESSION POLICY
Contains relationship
Not supported
CREATE STORAGE INTEGRATION
Contains relationship
Not supported

Create [Database objects]

Command
Type
Support Status
CREATE SCHEMA
Contains relationship
Supported
CREATE SCHEMA … CLONE
Contains relationship
Supported
CREATE TABLE
Contains relationship
Supported
CREATE TABLE … CLONE
Contains relationship
Not supported
CREATE EXTERNAL TABLE
Contains relationship
Not supported
CREATE VIEW
Contains relationship
Supported
CREATE MATERIALIZED VIEW
Contains relationship
Supported
CREATE MASKING POLICY
Contains relationship
Not supported
CREATE ROW ACCESS POLICY
Contains relationship
Not supported
CREATE SEQUENCE
Contains relationship
Supported
CREATE SEQUENCE … CLONE
Contains relationship
Not supported
CREATE TAG
Contains relationship
Not supported
CREATE FILE FORMAT
Contains relationship
Not supported
CREATE FILE FORMAT … CLONE
Contains relationship
Not supported
CREATE STAGE
Contains relationship
Not supported
CREATE STAGE … CLONE
Contains relationship
Not supported
CREATE PIPE
Contains relationship
Not supported
CREATE STREAM
Contains relationship
Supported
CREATE STREAM … CLONE
Contains relationship
Not supported
CREATE TASK
Contains relationship
Not supported
CREATE TASK … CLONE
Contains relationship
Not supported
CREATE FUNCTION
Contains relationship
Not supported
CREATE EXTERNAL FUNCTION
Contains relationship
Not supported
CREATE PROCEDURE
Contains relationship
Supported

DML

Currently, the DML commands alone are not generating any kind of dependencies.
Text
Type
Support Status
INSERT
Script relationship
Not supported
INSERT (multi-table)
Script relationship
Not supported
MERGE
Script relationship
Not supported
UPDATE
Script relationship
Not supported
DELETE
Script relationship
Not supported
TRUNCATE TABLE
Script relationship
Not supported