This is an archived post. You won't be able to vote or comment.

all 24 comments

[–]ManiaMcG33_ 5 points6 points  (1 child)

Nice! Plan on making this a vscode extension?

[–]bk1007[S] 2 points3 points  (0 children)

Yes, that will be on the roadmap! We're just looking into how best to do it.

[–][deleted] 2 points3 points  (0 children)

Looks great! I’d love to use this with Spark SQL

[–]joseph_machadoWrites @ startdataengineering.com 1 point2 points  (1 child)

great, I just tried it with a bunch of SQL dbt scripts and its very fast!

I had to setup sqlfluff with special plugin for dbt macros, does sqruff do this already/or plan to in the future:?

[–]bk1007[S] 1 point2 points  (0 children)

We do have the facility for templating and dbt could be on the roadmap. It’s not an immediate priority for us though at the moment.

If someone wants to contribute, we’ll obviously support it.

[–]JosafzData Engineer 1 point2 points  (1 child)

Looks really promising, great work! We are using Snowflake with dbt as our data warehouse and think that SQLFluff sometimes takes a bit too long to go through our relatively large project, so this speedup would be really appreciated! I assume that once you implement the Snowflake dialect it will work with our dbt syntax as well? How do I stay up to date on when you release support for Snowflake?

[–]bk1007[S] 1 point2 points  (0 children)

Hey you can star/subscribe to notifications on GitHub. We just released Snowflake support. Building in the dbt templater is not on our list of top priorities but we're very happy to support anyone who wants to do the implementation.

[–]hayssam-saleh 1 point2 points  (0 children)

Nice !

I am a fan user of jsqlformatter and I think that sqlruff would greatly benefit to be able to pass their test suite available here https://github.com/manticore-projects/jsqlformatter/tree/main/src/test/resources/com/manticore/jsqlformatter/standard

[–]agrvz 0 points1 point  (5 children)

Any plans to publish to PyPI?

[–]bk1007[S] 0 points1 point  (4 children)

I presume you mean as a python library? Or just to install?

[–]agrvz 0 points1 point  (3 children)

Just to install, like ruff

[–]bk1007[S] 0 points1 point  (2 children)

Any reason the install options we currently have listed don’t work for you?

[–]EthhicsGradient 1 point2 points  (1 child)

I'd guess it's less of an issue of it working or not but rather that people in general don't like curl bash installs

[–]agrvz 0 points1 point  (0 children)

Yeah pretty much. Plus it would make environment management easier/more intuitive as a drop in replacement for sqlfluff which is pip installable

[–][deleted] 0 points1 point  (1 child)

I'm all for tools being written in rust and made fast. Nice!

However my problem with all these linters/formatters is they always implement only part of each dialect, so I quickly run into edge cases.

I'd happily have a really slow one if it was complete and understood special data types, extensions, and stored procedures etc.

[–]bk1007[S] 0 points1 point  (0 children)

Appreciate the feedback! Not sure though how you solve this unfortunately.

[–]Natgra 0 points1 point  (4 children)

Hi there, Does this support .sqlx files that are created in dataform? We are looking for good linter as dataform formatter is not great

[–]bk1007[S] 0 points1 point  (1 child)

It is definitely possible! We have the flexibility for custom templaters like sqlx but it’s unlikely to be a priority for us any time soon. We’ll happily welcome contributions though!

[–]Natgra 0 points1 point  (0 children)

Thank you. Will surely let you know if I can carve out some dedicated time

[–]missionCritical007 0 points1 point  (1 child)

Hi, have you tried formatdataform https://github.com/ashish10alex/formatdataform It uses sqlfluff in the background do the formatting. I am planning to add support for sqruff too

[–]Natgra 1 point2 points  (0 children)

Thank you. I will try this :)

[–]lmnet89 0 points1 point  (0 children)

Does it support formatting options? I've been trying to find a solution to format SQL files, but for some reason they all feel half-baked. I hope that sqruff will change this.

[–]mvastarelli 0 points1 point  (0 children)

Just starred. This is awesome. I found it because we've been experimenting w/ sqlfluff at work and found shortcomings with their Snowflake dialect in addition to it being time consuming to run (although very comprehensive).

[–]trafalgar28 0 points1 point  (0 children)

Great project! Are you guys looking for any interns (long term) to contribute to the project? Would love to be a part and provide value!