From ae9953556c735dc8580a8571849198295fa546f3 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Fri, 23 Feb 2024 12:21:50 +0100 Subject: [PATCH] more tests --- models/staging/stripe/_stripe_sources.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/models/staging/stripe/_stripe_sources.yml b/models/staging/stripe/_stripe_sources.yml index 220d190..752ccc8 100644 --- a/models/staging/stripe/_stripe_sources.yml +++ b/models/staging/stripe/_stripe_sources.yml @@ -445,15 +445,23 @@ sources: - name: created data_type: bigint description: "{{ doc('stripe_created_desc') }}" + tests: + - not_null - name: invoice data_type: character varying description: "ID of the invoice that created this PaymentIntent, if it exists." - name: updated data_type: bigint description: "{{ doc('stripe_created_desc')}}" + tests: + - not_null - name: currency data_type: character varying description: "{{ doc('stripe_currency_desc') }}" + tests: + - not_null + - dbt_expectations.expect_column_value_lengths_to_equal: + value: 3 - name: customer data_type: character varying description: | @@ -468,6 +476,8 @@ sources: - name: metadata data_type: jsonb description: "{{ doc('stripe_metadata_desc') }}" + tests: + - not_null - name: shipping data_type: jsonb description: "Shipping information for the charge." @@ -500,6 +510,10 @@ sources: - name: latest_charge data_type: character varying description: "The latest charge created by this PaymentIntent." + tests: + - dbt_expectations.expect_column_values_to_match_regex: + regex: "^(ch|py)_.{24}$" + row_condition: "latest_charge is not null" - name: receipt_email data_type: character varying description: "Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings."