dbt-labs/dbt-core · warning
Volatility is not supported by
Error message
Volatility is not supported by {adapter.type()} in javascript UDF and will be ignored What it means
This warning comes from default__scalar_function_volatility_javascript, the adapter-dispatched macro for JavaScript UDFs. JavaScript UDFs on this adapter do not support volatility settings, so a user-specified `volatility` config on the function model cannot be applied and is silently ignored — dbt warns so the user knows the setting had no effect.
Solutions
- Remove the `volatility` config from the JavaScript function's model config, since it has no effect.
- If determinism matters, move the function to SQL where volatility can be enforced, or document that JS UDFs are non-deterministic.
- Leave it as a benign warning if the JS UDF's volatility truly doesn't matter for your use case.
Example fix
// before config: language: javascript volatility: deterministic // after config: language: javascript
Defensive patterns
Strategy: validation
Validate before calling
# Only set volatility for SQL-language functions
{% if model.config.get('language') == 'javascript' and model.config.get('volatility') %}
{# drop or warn: volatility is ignored for JS UDFs #}
{% endif %} Prevention
- Keep volatility config only on SQL UDFs.
- Audit function configs when migrating between SQL and JavaScript.
- Read the adapter's UDF support matrix before adding volatility.
When it happens
Trigger: A function materialization runs for a UDF written in JavaScript whose model config includes `volatility` (any non-none value, e.g. 'deterministic' or 'stable'); the default__scalar_function_volatility_javascript macro sees volatility != none and warns.
Common situations: Declaring volatility on a JS UDF copied from a SQL UDF config; migrating a SQL function to JavaScript while keeping the volatility config; multi-language function projects where only SQL functions support volatility.
Related errors
- Found ` ` volatility specified on function ` `. This…
- Configuration changes were identified and…
- Detected columns with numeric type and unspecified…
- In relation : The following columns are specified in the…
- Argument must be a string
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/ba41229507500d4a.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/materializations/functions/scalar.sql:64
{% macro default__scalar_function_body_sql() %}
$$
{{ model.compiled_code }}
$$ LANGUAGE SQL
{% endmacro %}
{% macro scalar_function_volatility_sql() %}
{{ return(adapter.dispatch('scalar_function_volatility_sql', 'dbt')()) }}
{% endmacro %}
{% macro scalar_function_volatility_javascript() %}
{{ return(adapter.dispatch('scalar_function_volatility_javascript', 'dbt')()) }}
{% endmacro %}
{% macro default__scalar_function_volatility_javascript() %}
{% set volatility = model.config.get('volatility') %}
{% if volatility != none %}
{% set msg = "Volatility is not supported by " ~ adapter.type() ~ " in javascript UDF and will be ignored" %}
{% do exceptions.warn(msg) %}
{% endif %}
{% endmacro %}
{% macro default__scalar_function_volatility_sql() %}
{% set volatility = model.config.get('volatility') %}
{% if volatility == 'deterministic' %}
IMMUTABLE
{% elif volatility == 'stable' %}
STABLE
{% elif volatility == 'non-deterministic' %}
VOLATILE
{% elif volatility != none %}
{# This shouldn't happen unless a new volatility is invented #}
{% do unsupported_volatility_warning(volatility) %}
{% endif %}
{# If no volatility is set, don't add anything and let the data warehouse default it #}
{% endmacro %}
View on GitHub (pinned to 0267ce9170)