-
-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dbt project must be in the current working directory #601
Comments
I can't tell if this is related, or if it's even a sqlfluff bug, but I'll post it here in case others will experience something similar. We are getting ready to use the dbt templater for our CI. Our CI runs on an on-prem Jenkins server (that is itself running as a Docker container). Our (non-dbt) templater has been working 💯 👌 for months now. I upgraded the the Docker image we use to use the However, when the Jenkins server does the same thing, I get this error message:
As a few fun tests, I ran this within the Jenkins survey:
In other words, python seems to find the files ok, the dbt templater works when not on Jenkins, and everything lints as long as I'm not using the dbt templater. The only thing I can think of is that the paths are based on a mounted volume, and somehow that might be related to how either sqlfluff or dbt-via-sqlfluff is reading these files. Again, I'm not convinced this is a sqlfluff issue (so feel free to ignore), but posting it here in case it nudges any of ya'll in an "aha" kind of a way for some of these dbt templater filepath / project directory issues. Summary Configuration files```docker # our own custom quay deployment FROM /analytics/python:3.8WORKDIR /opt COPY Pipfile* /opt/ RUN mkdir /opt/.dbt RUN pipenv install --system --deploy --dev
[[source]] [dev-packages] [packages] [requires]
[sqlfluff] [sqlfluff:templater:jinja:context] [sqlfluff:indentation] [sqlfluff:rules] [sqlfluff:rules:L010]
|
I've made a first attempt at resolving this issue (Having the project in another directory - not yet having multiple project directories) Would be happy for any feedback. |
Would also love to see config support for dbt's |
@andyenkeboll-iex, yes PR #898 will implement support for --profile-dir. Just resolving a few issues in the PR. |
I think this issue is resolved now that #898 is merged 👍 |
Hi I have a question related to this PR. My repo structure is:
my .sqlfluff config is:
I would like to run sqlfluff on dbt_project_1 in circleci based on the .sqlfluff in dbt_project_1. Is it possible to do so? I tried putting the .sqlfluff in the .circleci folder and running the command I also tried sqlfluff using CLI method by running the command |
Related #597
The current implementation of the dbt templater assumes that the project root is the current working directory. It would be good to have a config to support:
for example:
This is actually quite painful right now with pre-commit, I tried on our project at Earnest which is in a sub-directory and had to write the following:
cc. @NiallRees
The text was updated successfully, but these errors were encountered: