Skip to content

Commit

Permalink
Merge pull request #523 from basedosdados/deploy-elementary-report
Browse files Browse the repository at this point in the history
[feat]: elementary dashboard deployment action
  • Loading branch information
arthurfg authored Apr 3, 2024
2 parents 77213d0 + d5155b8 commit 6fb37d0
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 7 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/elementary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy Elementary Report
on:
push:
branches: [ "main", "master" ]
schedule:
- cron: '00 22 * * 1-5'
workflow_dispatch:
jobs:
elementary:
runs-on: ubuntu-latest
steps:
- name: Checkout dbt project
uses: actions/checkout@v3
- name: Run Elementary
uses: elementary-data/[email protected]
with:
warehouse-type: bigquery
adapter-version: 1.5.9
profiles-yml: ${{ secrets.ELEMENTARY_PROFILES_YML }}
edr-command:
edr report
--file-path "report.html"
&&
edr send-report
--google-service-account-path "/tmp/gcs_keyfile.json"
--gcs-bucket-name "basedosdados"
--update-bucket-website "true"
bigquery-keyfile: ${{ secrets.BIGQUERY_KEYFILE }}
gcs-keyfile: ${{ secrets.GCS_KEYFILE }}
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: report.html
path: report.html
- name: Upload log
if: always()
uses: actions/upload-artifact@v3
with:
name: edr.log
path: edr.log
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ models/*/input/
models/*/output/
models/*/extra/
venv*
edr_target/
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ packages:
- package: dbt-labs/dbt_utils
version: 1.1.1
- package: elementary-data/elementary
version: 0.14.0
version: 0.14.1
13 changes: 8 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ default:
location: US
threads: 2
keyfile: /credentials-prod/prod.json
elementary:
outputs:
default:
type: bigquery
project: basedosdados
dataset: elementary
method: service-account
keyfile: /tmp/bigquery_keyfile.json
threads: 2
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "0.1.0"
[tool.poetry.dependencies]
python = "~3.9"
dbt-core = "1.5.6"
dbt-bigquery = "1.5.6"
dbt-bigquery = "1.5.9"
dbt-rpc = "0.4.2"
pyyaml = "6.0"

Expand Down

0 comments on commit 6fb37d0

Please sign in to comment.