diff --git a/.github/workflows/.lint.yml b/.github/workflows/.lint.yml index ffa2d7b8ed..959150a887 100644 --- a/.github/workflows/.lint.yml +++ b/.github/workflows/.lint.yml @@ -657,8 +657,10 @@ jobs: poetry run poe lint-sql -- --dialect=postgres streaming/migrations poetry run poe lint-sql -- --dialect=postgres timescaledb/dummy_iot/migrations poetry run poe lint-sql -- --dialect=postgres timescaledb/motor/migrations - poetry run poe lint-sql -- --dialect=sparksql delta-lake/sql + poetry run poe lint-sql -- --dialect=sparksql delta-lake/queries + poetry run poe lint-sql -- --dialect=sqlite sqlite/queries # poetry run poe lint-sql -- --dialect=trino trino/queries + poetry run poe lint-sql -- --dialect=tsql microsoft-sql-server/queries lint-terraform: name: Terraform diff --git a/Makefile b/Makefile index 58ae95bc60..91ef51294d 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,9 @@ clean-jupyter-notebook: poetry run poe clean-jupyter-notebook -- aws/amazon-emr/studio/hm-studio/hm-workspace.ipynb poetry run poe clean-jupyter-notebook -- aws/amazon-sagemaker/pytorch-mnist/notebook.ipynb +sqlfluff-list-dialects: + poetry run poe sqlfluff-list-dialects + # Lint lint-ansible: poetry run poe lint-ansible @@ -265,8 +268,10 @@ lint-sql: poetry run poe lint-sql -- --dialect=postgres streaming/migrations poetry run poe lint-sql -- --dialect=postgres timescaledb/dummy_iot/migrations poetry run poe lint-sql -- --dialect=postgres timescaledb/motor/migrations - poetry run poe lint-sql -- --dialect=sparksql delta-lake/sql + poetry run poe lint-sql -- --dialect=sparksql delta-lake/queries + poetry run poe lint-sql -- --dialect=sqlite sqlite/queries poetry run poe lint-sql -- --dialect=trino trino/queries + poetry run poe lint-sql -- --dialect=tsql microsoft-sql-server/queries lint-sql-fix: poetry run poe lint-sql-fix -- --dialect=athena aws/amazon-athena/queries poetry run poe lint-sql-fix -- --dialect=bigquery google-cloud/bigquery/bigquery-ml @@ -277,8 +282,10 @@ lint-sql-fix: poetry run poe lint-sql-fix -- --dialect=postgres streaming/migrations poetry run poe lint-sql-fix -- --dialect=postgres timescaledb/dummy_iot/migrations poetry run poe lint-sql-fix -- --dialect=postgres timescaledb/motor/migrations - poetry run poe lint-sql-fix -- --dialect=sparksql delta-lake/sql + poetry run poe lint-sql-fix -- --dialect=sparksql queries + poetry run poe lint-sql-fix -- --dialect=sqlite sqlite/queries poetry run poe lint-sql-fix -- --dialect=trino trino/queries + poetry run poe lint-sql-fix -- --dialect=tsql microsoft-sql-server/queries lint-terraform: terraform fmt -recursive -check lint-terraform-fix: diff --git a/delta-lake/sql/query.sql b/delta-lake/queries/query.sql similarity index 100% rename from delta-lake/sql/query.sql rename to delta-lake/queries/query.sql diff --git a/microsoft-sql-server/queries/check_version.sql b/microsoft-sql-server/queries/check_version.sql new file mode 100644 index 0000000000..62737dbd3c --- /dev/null +++ b/microsoft-sql-server/queries/check_version.sql @@ -0,0 +1,2 @@ +-- Check version +select @@version; diff --git a/pyproject.toml b/pyproject.toml index c3b651bc0d..1eb025d8e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ build-backend = "poetry.core.masonry.api" [tool.poe.tasks] clean-jupyter-notebook = "nb-clean clean" ansible-galaxy-install = "ansible-galaxy install" +sqlfluff-list-dialects = "sqlfluff dialects" lint-ansible = {shell = "ansible-lint $(git ls-files '*playbook.yml')"} lint-cmake = {shell = "cmakelint $(git ls-files '*CMakeLists.txt')"} lint-matlab = {shell = "mh_style $(git ls-files '*.m')"} diff --git a/sqlite/queries/check_integrity.sql b/sqlite/queries/check_integrity.sql new file mode 100644 index 0000000000..2f2309790c --- /dev/null +++ b/sqlite/queries/check_integrity.sql @@ -0,0 +1,2 @@ +-- Check integrity +pragma integrity_check;