Currently DevNullAdapter inherits from SQLAdapter.
This introduces several specific behaviors that will lead to unexpected parsing effects when using linters such as SQLFluff.
For instance, the {{ source(a,b) }} or {{ ref(a) }} method use some specific quotes in BigQuery (instead of " it should be using `).
This results in SQLFuff returning failures similar to Found unparsable section: ...
--
One solution I've been using, but which requires having a fork was to change the impl.py file from
from dbt.adapters.sql import SQLAdapter
from dbt.adapters.devnull import DevNullConnectionManager
from dbt.adapters.base.relation import BaseRelation
class DevNullAdapter(SQLAdapter):
ConnectionManager = DevNullConnectionManager
...
to
from dbt.adapters.bigquery import BigQueryAdapter
from dbt.adapters.devnull import DevNullConnectionManager
from dbt.adapters.base.relation import BaseRelation
class DevNullAdapter(BigQueryAdapter):
ConnectionManager = DevNullConnectionManager
...
I'm pretty sure that there could be a better way to make the devnull adapter more flexible but I'm not a dev guy, so I can't really suggest better.
Currently
DevNullAdapterinherits fromSQLAdapter.This introduces several specific behaviors that will lead to unexpected parsing effects when using linters such as SQLFluff.
For instance, the
{{ source(a,b) }}or{{ ref(a) }}method use some specific quotes in BigQuery (instead of"it should be using`).This results in SQLFuff returning failures similar to
Found unparsable section: ...--
One solution I've been using, but which requires having a fork was to change the impl.py file from
to
I'm pretty sure that there could be a better way to make the devnull adapter more flexible but I'm not a dev guy, so I can't really suggest better.