dbt-labs/dbt-core · error

'runtime_version' is accepted for compatibility but has no…

Error message

'runtime_version' is accepted for compatibility but has no effect on Databricks Python UDFs. Databricks manages the Python runtime internally.

What it means

Compatibility warning from databricks__scalar_function_python: the model config sets `runtime_version`, which dbt-databricks accepts for cross-adapter compatibility, but Databricks manages the Python runtime for Python UDFs internally so the setting has no effect. Purely informational; compilation and UDF creation proceed.

Solutions

  1. Remove `runtime_version` from the model config to silence the warning
  2. Leave it in place if the config is shared with adapters that use it — it is harmless on Databricks
  3. Do not expect it to change the Python version of the UDF
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/dbt-loader/src/dbt_macro_assets/dbt-databricks/macros/materializations/functions/scalar.sql:31 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/b514f4cf19330823. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-loader/src/dbt_macro_assets/dbt-databricks/macros/materializations/functions/scalar.sql:31

{% macro databricks__scalar_function_create_replace_signature_python(target_relation) %}
    CREATE OR REPLACE FUNCTION {{ target_relation.render() }} ({{ formatted_scalar_function_args_sql() }})
    RETURNS {{ model.returns.data_type }}
    LANGUAGE PYTHON
    AS
{% endmacro %}

{# Python UDF body macro - uses dollar-quoting #}
{% macro databricks__scalar_function_body_python() %}
$$
{{ model.compiled_code }}
$$
{% endmacro %}

{# Main Python UDF macro - combines signature and body #}
{% macro databricks__scalar_function_python(target_relation) %}
    {#- Warn if user explicitly provided no-op config fields -#}
    {%- if model.config.get('runtime_version') -%}
        {{ exceptions.warn("'runtime_version' is accepted for compatibility but has no effect on Databricks Python UDFs. Databricks manages the Python runtime internally.") }}
    {%- endif -%}
    {%- if model.config.get('entry_point') -%}
        {{ exceptions.warn("'entry_point' is accepted for compatibility but has no effect on Databricks Python UDFs. The function body is used directly.") }}
    {%- endif -%}
    {{ databricks__scalar_function_create_replace_signature_python(target_relation) }}
    {{ databricks__scalar_function_body_python() }}
{% endmacro %}

View on GitHub (pinned to 0267ce9170)