Skip to content

Commit

Permalink
Merge pull request #206 from prefeitura-rio/feat/dbt-bigquer-monitoring
Browse files Browse the repository at this point in the history
Feat/dbt bigquer monitoring
  • Loading branch information
ThiagoTrabach authored Jan 27, 2025
2 parents 37f1b29 + ca870fa commit f99795b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
13 changes: 13 additions & 0 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ vars:
TAG_DADO_CLINICO: 'projects/rj-sms/locations/us/taxonomies/8150870731612680617/policyTags/7155330191381842548'
TAG_DADO_ESTOQUE: 'projects/rj-sms/locations/us/taxonomies/8150870731612680617/policyTags/9217789274924499899'

# BigQuery Monitoring
bq_region: 'us'
input_gcp_projects: ['rj-sms-dev', 'rj-sms', 'rj-sms-sandbox']
enable_gcp_bigquery_audit_logs: false
gcp_bigquery_audit_logs_storage_project: 'rj-sms'
gcp_bigquery_audit_logs_dataset: 'gerenciamento__custos'
gcp_bigquery_audit_logs_table: 'dbt_bigquery_audit_logs'

query-comment:
comment: '{{ dbt_bigquery_monitoring.get_query_comment(node) }}'
job-label: True # Use query comment JSON as job labels

# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
Expand All @@ -73,6 +84,8 @@ models:
elementary:
+schema: "gerenciamento__dbt_elementary"
+enabled: "{{ target.name in ['prod'] }}"
dbt_bigquery_monitoring:
+schema: "gerenciamento__dbt_bigquery_monitoring"
rj_sms:
# all models should have unique and not null
+required_tests: { "unique.*|not_null": 2 }
Expand Down
8 changes: 5 additions & 3 deletions package-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ packages:
- package: tnightengale/dbt_meta_testing
version: 0.3.6
- package: elementary-data/elementary
version: 0.16.1
version: 0.16.2
- package: calogica/dbt_date
version: 0.10.1
- package: data-mie/dbt_profiler
version: 0.8.3
version: 0.8.4
- package: dbt-labs/audit_helper
version: 0.12.1
sha1_hash: d44de29fe359fbacc86d50de8c158b29d1418b3b
- package: bqbooster/dbt_bigquery_monitoring
version: 0.17.0
sha1_hash: 2130e98ea78c7e1448b1744d834ea46043bd59a6
8 changes: 5 additions & 3 deletions packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ packages:
- package: tnightengale/dbt_meta_testing
version: 0.3.6
- package: elementary-data/elementary
version: 0.16.1
version: 0.16.2
- package: calogica/dbt_date
version: 0.10.1
- package: data-mie/dbt_profiler
version: 0.8.3
version: 0.8.4
- package: dbt-labs/audit_helper
version: 0.12.1
version: 0.12.1
- package: bqbooster/dbt_bigquery_monitoring
version: 0.17.0

0 comments on commit f99795b

Please sign in to comment.