High severitycompilation
Power BI Refresh Error:
SourceNotFoundError
What does this error mean?
A dbt model references a source using source() but the source is not defined in any sources.yml file in the project. dbt cannot compile the model.
Common causes
- 1The source was defined in a package that is not installed (run dbt deps)
- 2The sources.yml file was deleted or the source definition was removed
- 3The source name or table name in the source() call doesn't match the definition in sources.yml
- 4The sources.yml file is in a directory not included in the model paths
- 5A typo in the source name or table name in the source() macro call
How to fix it
- 1Search for the source definition: grep -r 'source_name' . --include='*.yml'
- 2Verify the source() call arguments match exactly: source('source_name', 'table_name')
- 3Run dbt deps if the source is defined in a package
- 4Check that the sources.yml file is in a directory included in the dbt project path
- 5Run dbt parse to see the full error including the file and line number