# Scripting languages support

## 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 :white\_check\_mark:&#x20;
* [Scala (using Snowpark)](https://docs.snowflake.com/en/sql-reference/stored-procedures-scala.html) :x:
* [Java (using Snowpark)](https://docs.snowflake.com/en/sql-reference/stored-procedures-java.html) :x:
* [Snowflake Scripting](https://docs.snowflake.com/en/developer-guide/snowflake-scripting/index.html) :x:

{% hint style="info" %}
E.g.:

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

(PROC1)−REFERENCES→(DB.SCH.T1)
{% endhint %}

## Unsupported syntax

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

```sql
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
    $$
    ;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gapvelocity.ai/blackdiamond-studio-or-mobilize.net/blackdiamond-studio-documentation/code-insights/scripting-languages-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
