diff --git a/.github/workflows/diff-quality.yml b/.github/workflows/diff-quality.yml index c2f3f09..def408e 100644 --- a/.github/workflows/diff-quality.yml +++ b/.github/workflows/diff-quality.yml @@ -37,47 +37,6 @@ jobs: with: project_id: crypto-stellar credentials_json: "${{ secrets.CREDS_PROD_HUBBLE }}" - - - name: Get changed files - id: get_file_changes - uses: trilom/file-changes-action@v1.2.4 - with: - output: " " - - - name: Get new and changed .sql files in /models to lint - id: get_files_to_lint - shell: bash -l {0} - run: | - # Set the command in the $() brackets as an output to use in later steps - echo "::set-output name=lintees::$( - # Issue where grep regular expressions don't work as expected on the - # Github Actions shell, check dbt/models/ folder - echo \ - $(echo ${{ steps.get_file_changes.outputs.files_modified }} | - tr -s ' ' '\n' | - grep -E '^models.*[.]sql$' | - tr -s '\n' ' ') \ - $(echo ${{ steps.get_file_changes.outputs.files_added }} | - tr -s ' ' '\n' | - grep -E '^models.*[.]sql$' | - tr -s '\n' ' ') - )" - - - name: Lint dbt models - id: sqlfluff_json - if: steps.get_files_to_lint.outputs.lintees != '' - shell: bash -l {0} - run: | - python -m pip install --upgrade pip - dbt deps - sqlfluff lint --format github-annotation --annotation-level failure --nofail ${{ steps.get_files_to_lint.outputs.lintees }} > annotations.json - sed -i '/^\[/!d' annotations.json # see https://github.com/sqlfluff/sqlfluff/issues/2244 - - name: Annotate - uses: yuzutech/annotations-action@v0.4.0 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - title: "SQLFluff Lint" - input: "./annotations.json" - name: Checkout source branch and diff quality run: | diff --git a/models/staging/stg_offers.sql b/models/staging/stg_offers.sql index ef3e82e..de40c70 100644 --- a/models/staging/stg_offers.sql +++ b/models/staging/stg_offers.sql @@ -11,7 +11,7 @@ with , offers as ( select - , seller_id + seller_id , offer_id , selling_asset_type , selling_asset_code diff --git a/models/staging/stg_trust_lines.sql b/models/staging/stg_trust_lines.sql index 784ebd0..79c10b0 100644 --- a/models/staging/stg_trust_lines.sql +++ b/models/staging/stg_trust_lines.sql @@ -11,7 +11,7 @@ with , trust_lines as ( select - , ledger_key + ledger_key , account_id , asset_type , asset_issuer