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
| columns: | |
| - name: payment_method | |
| tests: | |
| - not_null: | |
| where: user_status = 'activated' | |
| meta: | |
| description: "Validate that each activated user has a payment method. If fails, there is an issue with the application billing table or the job that syncs it" | |
| owner: '@Jonh Smith' | |
| channel: 'application_team_data_alerts' |
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
| models: | |
| - name: payments | |
| tests: | |
| - dbt_utils.expression_is_true: | |
| expression: "inbound_amount = payout_amount + refund_amount" | |
| - dbt_utils.expression_is_true: | |
| expression: "inbound_amount = inbound_cash_amount + inbound_credit_amount" |
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
| {% macro default__test_relationships(model, column_name, to, field) %} | |
| with child as ( | |
| select {{ column_name }} as from_field | |
| from {{ model }} | |
| where {{ column_name }} is not null | |
| ), | |
| parent as ( | |
| select {{ field }} as to_field |
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
| columns: | |
| - name: activated_at | |
| tests: | |
| - not_null: | |
| where: "user_status = 'activated'" | |
| - name: payment_method | |
| tests: | |
| - accepted_values: | |
| values: ['credit_card', 'gift_card'] | |
| where: "user_status = 'activated'" |
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
| models: | |
| - name: login_events | |
| config: | |
| elementary: | |
| timestamp_column: 'loaded_at' | |
| columns: | |
| - name: user_name | |
| tests: | |
| - elementary.column_anomalies: | |
| column_anomalies: |
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
| models: | |
| - name: login_events | |
| config: | |
| elementary: | |
| timestamp_column: "loaded_at" | |
| tests: | |
| - elementary.dimension_anomalies: | |
| dimensions: | |
| - event_type | |
| - country_name |
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
| models: | |
| - name: login_events | |
| tests: | |
| - elementary.volume_anomalies: | |
| timestamp_column: “loaded_at” | |
| where_expression: sql expression | |
| anomaly_sensitivity: int | |
| anomaly_direction: [both | spike | drop] | |
| days_back: int | |
| backfill_days: int |
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
| models: | |
| - name: login_events | |
| tests: | |
| - elementary.freshness_anomalies: | |
| timestamp_column: "loaded_at" | |
| anomaly_sensitivity: 2 |
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
| models: | |
| - name: login_events | |
| columns: | |
| - name: loaded_at | |
| tests: | |
| - dbt_expectations.expect_row_values_to_have_recent_data: | |
| datepart: day | |
| interval: 1 |
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
| sources: | |
| - name: jaffle_shop | |
| database: raw | |
| freshness: # default freshness | |
| warn_after: {count: 12, period: hour} | |
| error_after: {count: 24, period: hour} | |
| loaded_at_field: _etl_loaded_at |
NewerOlder