Closed msnillo closed 6 days ago
Hi @msnillo ,
Thanks for the detailed issue. The reason it shows the error is due to sqlfluff
cli not being available in path. The latest version of the extension (v0.0.50
) now just uses sqlfluff
cli as its dependancy. You can resolve this issue by doing the following
pip uninstall sqlfluff
followed by pip install sqlfluff
sqfluff
cli. It will show you a warning that the installed binary is perhaps not in your system path. See screenshot attached. You can resolve this by adding the path to your system path by adding the highlighted path to your ~/.zshrc
or ~/.bashrc
file by running the following
#modify the below using the path you see
export PATH=$PATH:/home/aalex/.local/bin
~/.zshrc
or ~/.bashrc
for the path addition to take effect sqlfluff
is installed as expected by running sqlfluff --version
. Following which formatting should work as expected Please do let me know if the above solves your issue
Awesome, thank you! The issue has been fixed. I'll also close this issue.
Hi @ashish10alex,
Creating an issue again because I cannot use the formatting of sqlfluff via extension. Here are the steps I took:
Opened the folder in the root of dataform repository
Ran dataform install & dataform init-creds bigquery - both were successful
Encountered the error of
sqlfluff not found
Also tried the reloading the VSCode window
Encountered the error of
sqlfluff cli not found in path
But you can see in the image below that I have sqlfluff in .vscode-dataform-tools
Would like to know if I did anything wrong?
Thanks!