Skip to content

Commit

Permalink
chore(sql): add sqlite and microsoft sql server queries (#12409)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao authored Nov 6, 2023
1 parent a21d030 commit 9a51f6d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/.lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions microsoft-sql-server/queries/check_version.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Check version
select @@version;
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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')"}
Expand Down
2 changes: 2 additions & 0 deletions sqlite/queries/check_integrity.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Check integrity
pragma integrity_check;

0 comments on commit 9a51f6d

Please sign in to comment.