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
  • Procedure queries
  • Unsupported syntax
  1. BlackDiamond Studio Documentation
  2. Code Insights

Scripting languages support

Brief summary of how the scripting languages are being handled.

PreviousLanguage structures supportNextReports Explorer

Last updated 2 years ago

Procedure queries

The procedure body is treated as an extension of the source file, this is to get information over objects inside it. For example, when the analyzer found occurrences of dependencies inside the body they are registered from the procedure to the object.

Procedure language support:

  • JavaScript

E.g.:

CREATE OR REPLACE PROCEDURE PROC1() 
RETURNS STRING 
LANGUAGE JAVASCRIPT AS
$$
{
   UPDATE DB.SCH.T1 SET value1 = newValue
}
$$;

(PROC1)−REFERENCES→(DB.SCH.T1)

Unsupported syntax

The analyzer will not get references from SQL statements created dynamically. Even if the variable is filled in the same code.

create or replace procedure get_row_count(TABLE_NAME VARCHAR)
    returns float 
    not null
    language javascript
    as
    $$
    // Dynamically compose the SQL statement to execute.
    var sql_command = "select count(*) from " + TABLE_NAME;
    // Run the statement.
    var stmt = snowflake.createStatement(
           {
           sqlText: sql_command
           }
        );
    //... more code
    $$
    ;
✅
❌
❌
❌
Scala (using Snowpark)
Java (using Snowpark)
Snowflake Scripting