Data & Analytics
dbt lint --fix can break Snowflake CURRENT_TIMESTAMP
Guard Snowflake SQL when dbt's RF03 autofix mistakes a bare context function for a column.
October 31, 2026
Autofix is valuable only when the generated SQL remains valid. A new dbt issue reports that dbt lint --fix with rule RF03 can rewrite a bare Snowflake current_timestamp into t.current_timestamp in a single-table query. That turns a context function into an invalid column reference. The report also names current_date, current_time, localtime, and localtimestamp as affected candidates, in dbt 2.0.8.
Reproduce the exact edit
In an isolated branch, use the project's .sqlfluff configuration and a small Snowflake model with a table alias and a bare context function in its filter. Run dbt lint first and save the diagnostic, then run dbt lint --fix and inspect the diff. The dbt lint guide says its v2 linter reads SQLFluff-style rules, while also warning that compatible rules can produce different results. That makes the actual diff an essential acceptance check.
Know what Snowflake accepts
Snowflake's context-function reference lists CURRENT_TIMESTAMP and related functions as callable without parentheses in SQL statements. A qualifier such as t.current_timestamp changes the meaning. Check generated SQL through Snowflake compilation in CI before merging bulk formatting changes. A dbt compile or successful lint run alone is not enough if the autofix introduced a database error.
Contain the change surface
Until the issue is resolved in the version you use, avoid blanket --fix across Snowflake models with bare context functions. Review the specific RF03 edits and consider writing supported function-call forms where that is acceptable to the team. Record the rule, dbt version, and affected files so a later upgrade can be retested. Do not switch off all linting to solve one narrow rewrite.
Adovo’s view
A formatter is another code author. Give it the same review and compilation gate as a human change. Fast automation earns trust by making errors easier to catch, not by making them harder to see.
