Is it possible to analyse dbt projects using Sonar?

I am trying to get some of our dbt repos related stats to the Sonarcloud. Is it possible to analyse/ scan the dbt projects using Sonar and get those stats to the sonarcloud?

Hey there.

Can you provide some sample code that you would expect to be able to be analyzed? What language is this code ultimately written in?

Hi Colin, Thanks for replying to the thread.
It is mainly sql code and some tests are written in yml files too.
The following repo is a simple example:


Hi Team,

I am also interested to know about this…

Any updates on this?


Based on the shared repository – it’s “just” SQL code and this should be able to be analyzed by SonarCloud!

Hi Colin,

Thanks for updates,

Which type of report formats does sonarQube supports for SQL code(like json or xml…?)


The results are available in the SonarQube UI – the Web API can be used to extract data if necessary.

Hi Colin,

Thanks for updates.

I need to understand that, using DBT for sql code the coverage report is generated in Json format. Is the SonarQube scan the json report and publish the results on Dashboard?

Ediga Naresh Goud