#8376·sqlfluff

Databricks magic dialect linting LT01 issues

Author: maltheCreated Aug 19, 2026Updated Aug 19, 2026
Labelsbugdatabricks

Search before asking

  • I searched the issues and found no similar issues.

What Happened

I get a linting error when using the feature proposed in https://github.com/sqlfluff/sqlfluff/issues/7877 on even the most simple notebook.

LT01 Expected single whitespace between magic start and magic line. [layout.spacing]

For example, we can try linting the included test fixture:

bash
$ sqlfluff lint -d databricks test/fixtures/dialects/databricks/magic_line.sql
== [test/fixtures/dialects/databricks/magic_line.sql] FAIL                                                                                                                                                   
L:   3 | P:   1 | LT01 | Expected single whitespace between magic start and magic
                       | line. [layout.spacing]
L:  14 | P:   1 | LT01 | Expected single whitespace between magic start and magic
                       | line. [layout.spacing]
L:  24 | P:   1 | LT01 | Expected single whitespace between magic start and magic
                       | line. [layout.spacing]

The LT01 here makes no sense.

Expected Behaviour

No linting error.

Observed Behaviour

We get an LT01.

How to reproduce

bash
$ sqlfluff lint -d databricks test/fixtures/dialects/databricks/magic_line.sql

Dialect

Databricks

Version

sqlfluff, version 4.3.0

Configuration

Empty

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct