google / google/google-sql-syntax-ts

General Issues with formatting result

Đang mở
#3 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
10
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi @Ekrekr, I've been following your work in [dataform](https://github.com/dataform-co/dataform), and I was pleasantly surprised to see that this repository existed, as we wanted to understand how formatting works in the BQ UI.

I want to build a VSCode extension and tooling based on this, to standardize SQL formatting and have the same format between `dataform`, `BQ UI` and `Airflow` SQL.

The best formatter currently which is also compatible with jinja is SQLfluff, and produces very good results once configured.

One of our main problems with the current way formatting works is that the result for complex queries is completely unreadable for a human. Ideally the formatter would format based on some standards such as:
- https://www.sqlstyle.guide/
- https://handbook.gitlab.com/handbook/business-technology/data-team/platform/sql-style-guide/

I would be in general interested in forking this and start hacking on it a bit whenever I have time, and/or provide some examples of how the output can be made more readable.

Lastly, I have a general question: would a change/suggestion in here be applied to the Monaco Editor under the BQ UI?

Thank you for taking your time to read this, and sorry for the long wall of text

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xem xét hành vi định dạng hiện tại của repository và so sánh đầu ra của các truy vấn phức tạp với SQL Style Guide và GitLab SQL style guide được liên kết trong issue. Sử dụng trình định dạng SQLFluff và các ví dụ mà người báo cáo đưa ra làm các điểm so sánh, sau đó xác định liệu các thay đổi ở đây có ảnh hưởng đến Monaco Editor trong BigQuery UI hay không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
sql, typescript
Lĩnh vực
developer-experience, tooling
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.