Closed kostek-pl closed 1 month ago
@gaurpulkit:
I have the same problem. Would love to see this resolved. Happy to raise a PR if someone can point me roughly in the right part of the code to start
If the folder is outside of the vscode workspace this is not supported because of vscode security limitations. Otherwise this should work as expected in current version. Please reopne if not working.
Expected behavior
In our company we have a slight different folder structure - the main difference is that we have separate folders for configurations and resources. It seems that this great extension doesn't honor such setup - when resources i.e. models are in a different folder than dbt project it stops working. I discovered that the problem is with relative paths in resource definition(of course dbt is working as expected)
example folder structure:
models/ ├─ example/ │ ├─ my_first_dbt_model.sql │ ├─ my_second_dbt_model.sql │ ├─ schema.yml sample_project/ ├─ analyses/ ├─ macros/ ├─ seeds/ ├─ snapshots/ ├─ tests/ ├─ dbt_project.yml ├─ README.md
in dbt_project.yml there is
model-paths: ["../models"]
instead ofmodel-paths: ["models"]
and it works from dbt perspective but for some reason vscode-dbt-power-user does not allow this - target is not generated and in model compilation version there is "Still loading dbt project, please try again later..." sentence.Actual behavior
Extension doesn't work
Steps To Reproduce
This can be easily reproduced by setting up dbt initial project:
dbt init
Then move models folder outside of project folder
Last thing is to adjust models path in dbt_project.yml from
model-paths: ["models"]
tomodel-paths: ["../models"]
Log output/Screenshots
No response
Operating System
windows
dbt version
1.4.6
dbt Adapter
dbt-redshift
dbt Power User version
v0.12.2
Are you willing to submit PR?