sqlfluff
sqlparse
Our great sponsors
sqlfluff | sqlparse | |
---|---|---|
31 | 6 | |
5,771 | 3,171 | |
3.8% | - | |
9.4 | 5.8 | |
2 days ago | 18 days ago | |
Python | Python | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sqlfluff
-
Ask HN: How do you test SQL?
This linter can really enforce some best practices https://github.com/sqlfluff/sqlfluff
A list of best practices:
-
What is something you would learn at college but not a bootcamp (hard skills)
BigQuery SQL and SQLFluff
-
Is the knowledge on how Compilers work applicable to the role of a Data Engineer?
There's a SQL parser/linter called SQLFluff that my team uses for our CI/CD. I've made a few pull requests to fix the parser for the particular SQL dialect we used, and my college compiler classes definitely helped.
-
sqlfluff VS ANTLR - a user suggested alternative
2 projects | 12 Dec 2022
-
How to create projects for myself to enrich my resume?
Include bells and whistles to impress the reader: Most projects will have the common things like ETL scripts (e.g. SQL, Python, Airflow, dbt, etc) covered. To go the extra mile and stand out, you should also include things like data quality tests (e.g. dbt tests, great expectations, soda), linting scripts (e.g. sqlfluff, black), CI pipelines that check for linting and unit tests for ETL code before code can be merged to main (e.g. github actions). Include instructions on how to run those tests or linting or CI pipelines in your README file and include screenshots of the success or failure output to give the reader an example.
-
I failed a coding interview. Can anyone help me solve this?
Capitals I pretty much auto write, although I'll used the code formatter I wrote if someone sends me something messy. Bad and reused aliases, however, require manual fixing before I can get to the code review stage, so a PR using those will be rejected as needs work. sqlfluff is a decent formatter & linter if you need to get into details like that regularly.
- Terraform - Pre commit hooks
-
How-to-Guide: Contributing to Open Source
SQLFluff
-
Ask HN: Preferred SQL Auto-Formatter?
Not serving all of our needs but it did its job: https://github.com/sqlfluff/sqlfluff
-
This Week In Python
sqlfluff – A SQL linter and auto-formatter for Humans
sqlparse
-
Data Load Diagram
Gotcha, since we haven't actually written all of this yet I don't have any useful code snippets to share but we've discussed tackling the problem internally using something like sqlparse. You'd need to identify the relevant sql chunks, parse them for table dependency information and then create the relevant entities in whichever data lineage tool you were using.
-
This Week In Python
sqlparse – A non-validating SQL parser module for Python
-
Open Source SQL Parsers
Regular expressions is a popular approach to extract information from SQL statements. However, regular expressions quickly become too complex to handle common features like WITH, sub-queries, windows clauses, aliases and quotes. sqlparse is a popular python package that uses regular expressions to parse SQL.
-
Automated SQL formatting checks
This one is not bad: https://github.com/andialbrecht/sqlparse.
- Let's write a compiler, part 5: A code generator
What are some alternatives?
vscode-sqlfluff - An extension to use the sqlfluff linter in vscode.
pyparsing - Python library for creating PEG parsers [Moved to: https://github.com/pyparsing/pyparsing]
zetasql - ZetaSQL - Analyzer Framework for SQL
PLY - Python Lex-Yacc
Lark - Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
dbt-utils - Utility functions for dbt projects.
Pygments
soda-sql - Data profiling, testing, and monitoring for SQL accessible data.
ale - Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support
python-user-agents - A Python library that provides an easy way to identify devices like mobile phones, tablets and their capabilities by parsing (browser) user agent strings.
ijson
JSqlParser - JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes. The generated hierarchy can be navigated using the Visitor Pattern