Fix SQLFluff test and derived tables copying#1947
Merged
tompollard merged 7 commits intomainfrom Nov 10, 2025
Merged
Conversation
Member
alistairewj
commented
Nov 8, 2025
- SQLFluff is now on version 3.5.0, we were using 1.4.5 (!). There are some new rules that are inherited so new PRs will have to update SQL as needed (either indentation change or capitalizing a boolean/literal)
- The derived tables for v3.1 were not fully copied because bq ls paginates the first 50 in the shell script. it's now at 500. if we create more than 500 concept tables this bug will reemerge :)
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the SQLFluff linting configuration and tooling by upgrading to SQLFluff 3.5.0 and updating related dependencies. The changes include reformatting SQL files to comply with new linting rules and improving the GitHub Actions workflow.
- Updates SQLFluff configuration to use the new rule naming convention (e.g.,
capitalisation.keywordsinstead ofL010) - Upgrades GitHub Actions dependencies and Python version (3.7 → 3.12)
- Adds pagination support to BigQuery CLI commands in shell scripts
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.sqlfluff |
Modernized configuration with new rule naming scheme and structure |
.github/workflows/lint_sqlfluff.yml |
Updated action versions, Python version, SQLFluff version, and improved shell script logic |
mimic-iv/concepts/medication/arb.sql |
Reformatted CASE statement with consolidated OR conditions across multiple lines |
mimic-iv/concepts/firstday/first_day_bg_art.sql |
Reformatted JOIN ON clause to place ON keyword on its own line |
mimic-iv/concepts/copy_concepts_to_versioned_schema.sh |
Added -n 500 pagination flag to bq ls command |
Comments suppressed due to low confidence (1)
mimic-iv/concepts/copy_concepts_to_versioned_schema.sh:16
- The
bq lscommand at line 16 should also include the-n 500flag for consistency with line 30. Without pagination flags,bq lsmay have a default limit that could miss tables if the dataset contains many tables. Apply the same pagination flag as used in the source dataset listing.
for TABLE in `bq ls ${PROJECT_ID}:${TARGET_DATASET} | cut -d' ' -f3`;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.