BlackDiamond Studio | Mobilize.Net
  • BlackDiamond Studio Documentation
    • Introduction
    • BDS Portal
      • Sign Up
      • Sign In
      • Reset Password and Multifactor Authentication
      • User Interface
      • Projects List
        • Navigating the Projects List
      • Creating my first project
        • 1. What do you want to do?
        • 2. Name Project
        • 3. Set up Repository
        • 4. Connect to Snowflake
        • 5. Code
          • 1. Select a Template
          • 2. Extract DDL from Snowflake Account
          • 3. Upload my source code
            • Folder Names Not Allowed
      • Project Summary Page
      • Sharing a Project
      • Getting a Project Invite
      • Editing a Project Member's Role
      • Deleting a Project
    • Code Conversions
      • Converting SQL code to Snowflake
        • Conversion settings
      • Converting Scala code using Snowpark
      • Convert Python code using Snowpark (Coming soon)
      • Converting from the IDE
      • Conversion Errors
    • Online Code Editor
      • Running a Streamlit App
      • Writing Scala Code
      • Writing Python Code
      • Source Control (VS Code)
      • Run and Debug
      • Testing
      • Reports Explorer
      • SQL Tools
      • Snow Explorer
      • Metals (Scala)
      • Scala Notebooks
      • Contextual Menu
    • Code Insights
      • What to expect: Insight Reports
      • Language structures support
      • Scripting languages support
      • Reports Explorer
      • Storage of reports in client stage
    • Templates
      • Templates Dependencies
    • Use Cases
      • Assessment with SnowConvert
    • Submitting Bugs and Suggestions
    • Troubleshooting
      • Folder Naming
      • Cloning with GitLab
      • Third-party Cookies used in BlackDiamond Studio
    • System Requirements and Supported Browsers
    • Release Notes
  • Snowconvert Software License Agreement
Powered by GitBook
On this page
  • Glossary
  • Relationships
  • Dependencies
  • DDL Commands
  • CREATE <object>
  • DML
  1. BlackDiamond Studio Documentation
  2. Code Insights

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

COMMENT

Script relationship

DESCRIBE <object>

Script relationship

DROP <object>

Script relationship

SHOW <object>

Script relationship

USE <object>

Script relationship

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

CREATE NETWORK POLICY

Contains relationship

CREATE RESOURCE MONITOR

Contains relationship

CREATE SHARE

Contains relationship

CREATE ROLE

Contains relationship

CREATE USER

Contains relationship

CREATE WAREHOUSE

Contains relationship

CREATE DATABASE

Contains relationship

CREATE DATABASE … CLONE

Contains relationship

CREATE NOTIFICATION INTEGRATION

Contains relationship

CREATE SECURITY INTEGRATION

Contains relationship

CREATE SESSION POLICY

Contains relationship

CREATE STORAGE INTEGRATION

Contains relationship

Create [Database objects]

Command
Type
Support Status

CREATE SCHEMA

Contains relationship

CREATE SCHEMA … CLONE

Contains relationship

CREATE TABLE

Contains relationship

CREATE TABLE … CLONE

Contains relationship

CREATE EXTERNAL TABLE

Contains relationship

CREATE VIEW

Contains relationship

CREATE MATERIALIZED VIEW

Contains relationship

CREATE MASKING POLICY

Contains relationship

CREATE ROW ACCESS POLICY

Contains relationship

CREATE SEQUENCE

Contains relationship

CREATE SEQUENCE … CLONE

Contains relationship

CREATE TAG

Contains relationship

CREATE FILE FORMAT

Contains relationship

CREATE FILE FORMAT … CLONE

Contains relationship

CREATE STAGE

Contains relationship

CREATE STAGE … CLONE

Contains relationship

CREATE PIPE

Contains relationship

CREATE STREAM

Contains relationship

CREATE STREAM … CLONE

Contains relationship

CREATE TASK

Contains relationship

CREATE TASK … CLONE

Contains relationship

CREATE FUNCTION

Contains relationship

CREATE EXTERNAL FUNCTION

Contains relationship

CREATE PROCEDURE

Contains relationship

DML

Currently, the DML commands alone are not generating any kind of dependencies.

Type
Support Status

INSERT

Script relationship

INSERT (multi-table)

Script relationship

MERGE

Script relationship

UPDATE

Script relationship

DELETE

Script relationship

TRUNCATE TABLE

Script relationship

PreviousWhat to expect: Insight ReportsNextScripting languages support

Last updated 2 years ago

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Supported

Supported

Not supported

Not supported

Not supported

Not supported

Supported

Supported

Supported

Not supported

Not supported

Supported

Supported

Not supported

Not supported

Supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

Supported

Not supported

Not supported

Not supported

Not supported

Not supported

Supported

Not supported

Not supported

Not supported

Not supported

Not supported

Not supported

❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
❌
✅
✅
❌
❌
❌
❌
✅
✅
✅
❌
❌
✅
✅
❌
❌
✅
❌
❌
❌
❌
❌
❌
❌
✅
❌
❌
❌
❌
❌
✅
❌
❌
❌
❌
❌
❌