change "tests:" to "data_tests:"
This commit is contained in:
parent
db1edf7a1c
commit
c3c628aec4
29 changed files with 1565 additions and 1565 deletions
|
|
@ -6,8 +6,8 @@ version: 2
|
|||
# It reads two different schemas (stripe_uk and stripe_us) that have exactly the
|
||||
# same table structure. To save work, we use YAML anchors (see the funny syntax)
|
||||
# under sources > stripe_uk > tables and sources > stripe_us > tables.
|
||||
# Basically, if you change anything in the stripe_uk section, changes will
|
||||
# happen in both schemas.
|
||||
# Basically, if you change anything in the stripe_uk section, changes will
|
||||
# happen in both schemas.
|
||||
|
||||
sources:
|
||||
- name: stripe_uk
|
||||
|
|
@ -25,7 +25,7 @@ sources:
|
|||
- name: id
|
||||
data_type: character varying
|
||||
description: "{{ doc('generic_id_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
|
|
@ -33,17 +33,17 @@ sources:
|
|||
- name: fee
|
||||
data_type: bigint
|
||||
description: "Fees (in cents) paid for this transaction. Represented as a positive integer when assessed."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: net
|
||||
data_type: bigint
|
||||
description: "Net impact to a Stripe balance (in cents). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by amount - fee"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: type
|
||||
data_type: character varying
|
||||
description: "Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_outbound, obligation_reversal_inbound, payment, payment_failure_refund, payment_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, network_cost, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set:
|
||||
|
|
@ -90,17 +90,17 @@ sources:
|
|||
"transfer_failure",
|
||||
"transfer_refund",
|
||||
"balance_transfer_outbound",
|
||||
"balance_transfer_inbound"
|
||||
"balance_transfer_inbound",
|
||||
]
|
||||
- name: amount
|
||||
data_type: bigint
|
||||
description: "Gross amount of this transaction (in cents). A positive value represents funds charged to another party, and a negative value represents funds sent to another party."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: object
|
||||
data_type: character varying
|
||||
description: "Silly column. The value is always `balance_transaction`."
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^balance_transaction$"
|
||||
- name: source
|
||||
|
|
@ -109,19 +109,19 @@ sources:
|
|||
- name: status
|
||||
data_type: character varying
|
||||
description: "The transaction’s net funds status in the Stripe balance, which are either available or pending."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ["available", "pending"]
|
||||
- name: created
|
||||
data_type: bigint
|
||||
description: "{{ doc('stripe_created_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: currency
|
||||
data_type: character varying
|
||||
description: "{{ doc('raw_stripe_currency_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_value_lengths_to_equal:
|
||||
value: 3
|
||||
|
|
@ -134,7 +134,7 @@ sources:
|
|||
- name: available_on
|
||||
data_type: bigint
|
||||
description: "The date that the transaction’s net funds become available in the Stripe balance."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: exchange_rate
|
||||
data_type: numeric
|
||||
|
|
@ -145,7 +145,7 @@ sources:
|
|||
- name: reporting_category
|
||||
data_type: character varying
|
||||
description: "Read more at https://stripe.com/docs/reports/reporting-categories."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set:
|
||||
|
|
@ -160,7 +160,7 @@ sources:
|
|||
"other_adjustment",
|
||||
"refund_failure",
|
||||
"dispute_reversal",
|
||||
"payout_reversal"
|
||||
"payout_reversal",
|
||||
]
|
||||
- name: _airbyte_raw_id
|
||||
data_type: character varying
|
||||
|
|
@ -168,7 +168,7 @@ sources:
|
|||
- name: _airbyte_extracted_at
|
||||
data_type: timestamp with time zone
|
||||
description: "{{ doc('_airbyte_extracted_at_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
|
|
@ -186,7 +186,7 @@ sources:
|
|||
- name: id
|
||||
data_type: character varying
|
||||
description: "{{ doc('generic_id_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
|
|
@ -197,7 +197,7 @@ sources:
|
|||
- name: paid
|
||||
data_type: boolean
|
||||
description: "true if the charge succeeded, or was successfully authorized for later capture."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: order
|
||||
data_type: character varying
|
||||
|
|
@ -205,14 +205,14 @@ sources:
|
|||
- name: amount
|
||||
data_type: bigint
|
||||
description: "Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99)."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
- name: object
|
||||
data_type: character varying
|
||||
description: "Silly column. The value is always `charge`."
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^charge$"
|
||||
- name: review
|
||||
|
|
@ -224,14 +224,14 @@ sources:
|
|||
- name: status
|
||||
data_type: character varying
|
||||
description: "The status of the payment is either succeeded, pending, or failed."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ["succeeded", "pending", "failed"]
|
||||
- name: created
|
||||
data_type: bigint
|
||||
description: "{{ doc('stripe_created_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: dispute
|
||||
data_type: character varying
|
||||
|
|
@ -248,17 +248,17 @@ sources:
|
|||
- name: updated
|
||||
data_type: bigint
|
||||
description: "{{ doc('stripe_created_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: captured
|
||||
data_type: boolean
|
||||
description: "If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: currency
|
||||
data_type: character varying
|
||||
description: "{{ doc('raw_stripe_currency_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_value_lengths_to_equal:
|
||||
value: 3
|
||||
|
|
@ -277,7 +277,7 @@ sources:
|
|||
- name: refunded
|
||||
data_type: boolean
|
||||
description: "Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: shipping
|
||||
data_type: jsonb
|
||||
|
|
@ -315,14 +315,14 @@ sources:
|
|||
- name: payment_intent
|
||||
data_type: character varying
|
||||
description: "ID of the PaymentIntent associated with this charge, if one exists."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^pi_.{24}$"
|
||||
- name: payment_method
|
||||
data_type: character varying
|
||||
description: "ID of the payment method used in this charge."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^pm_.{24}$"
|
||||
|
|
@ -335,7 +335,7 @@ sources:
|
|||
- name: amount_captured
|
||||
data_type: bigint
|
||||
description: "Amount in cents captured (can be less than the amount attribute on the charge if a partial capture was made)."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -343,7 +343,7 @@ sources:
|
|||
- name: amount_refunded
|
||||
data_type: bigint
|
||||
description: "Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued)."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -363,7 +363,7 @@ sources:
|
|||
- name: balance_transaction
|
||||
data_type: character varying
|
||||
description: "ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes)."
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^txn_.{24}$"
|
||||
row_condition: "balance_transaction is not null"
|
||||
|
|
@ -394,7 +394,7 @@ sources:
|
|||
- name: _airbyte_extracted_at
|
||||
data_type: timestamp with time zone
|
||||
description: "{{ doc('_airbyte_extracted_at_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
|
|
@ -414,7 +414,7 @@ sources:
|
|||
- name: id
|
||||
data_type: character varying
|
||||
description: "{{ doc('generic_id_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
|
|
@ -422,14 +422,14 @@ sources:
|
|||
- name: amount
|
||||
data_type: bigint
|
||||
description: "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99)."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
- name: object
|
||||
data_type: character varying
|
||||
description: "Silly column. The value is always `payment_intent`."
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^payment_intent$"
|
||||
- name: review
|
||||
|
|
@ -441,7 +441,7 @@ sources:
|
|||
- name: status
|
||||
data_type: character varying
|
||||
description: "Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set:
|
||||
|
|
@ -461,7 +461,7 @@ sources:
|
|||
- name: created
|
||||
data_type: bigint
|
||||
description: "{{ doc('stripe_created_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: invoice
|
||||
data_type: character varying
|
||||
|
|
@ -469,12 +469,12 @@ sources:
|
|||
- name: updated
|
||||
data_type: bigint
|
||||
description: "{{ doc('stripe_created_desc')}}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: currency
|
||||
data_type: character varying
|
||||
description: "{{ doc('raw_stripe_currency_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_value_lengths_to_equal:
|
||||
value: 3
|
||||
|
|
@ -492,7 +492,7 @@ sources:
|
|||
- name: metadata
|
||||
data_type: jsonb
|
||||
description: "{{ doc('stripe_metadata_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: shipping
|
||||
data_type: jsonb
|
||||
|
|
@ -526,7 +526,7 @@ sources:
|
|||
- name: latest_charge
|
||||
data_type: character varying
|
||||
description: "The latest charge created by this PaymentIntent."
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^(ch|py)_.{24}$"
|
||||
row_condition: "latest_charge is not null"
|
||||
|
|
@ -551,7 +551,7 @@ sources:
|
|||
- name: amount_received
|
||||
data_type: bigint
|
||||
description: "Amount that this PaymentIntent collects."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -559,7 +559,7 @@ sources:
|
|||
- name: amount_capturable
|
||||
data_type: bigint
|
||||
description: "Amount that can be captured from this PaymentIntent."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
|
|
@ -611,7 +611,7 @@ sources:
|
|||
- name: _airbyte_extracted_at
|
||||
data_type: timestamp with time zone
|
||||
description: "{{ doc('_airbyte_extracted_at_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
|
|
@ -628,7 +628,7 @@ sources:
|
|||
- name: id
|
||||
data_type: character varying
|
||||
description: "{{ doc('generic_id_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- unique
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
|
|
@ -636,21 +636,21 @@ sources:
|
|||
- name: amount
|
||||
data_type: bigint
|
||||
description: "Amount, in cents."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 0
|
||||
- name: charge
|
||||
data_type: character varying
|
||||
description: "ID of the charge that’s refunded."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^(ch|py)_.{24}$"
|
||||
- name: object
|
||||
data_type: character varying
|
||||
description: "Silly column. The value is always `refund`."
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^refund$"
|
||||
- name: reason
|
||||
|
|
@ -659,7 +659,7 @@ sources:
|
|||
- name: status
|
||||
data_type: character varying
|
||||
description: "Status of the refund. This can be pending, requires_action, succeeded, failed, or canceled. Learn more about failed refunds."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set:
|
||||
|
|
@ -673,7 +673,7 @@ sources:
|
|||
- name: created
|
||||
data_type: bigint
|
||||
description: "{{ doc('stripe_created_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- name: updated
|
||||
data_type: bigint
|
||||
|
|
@ -681,7 +681,7 @@ sources:
|
|||
- name: currency
|
||||
data_type: character varying
|
||||
description: "{{ doc('raw_stripe_currency_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_value_lengths_to_equal:
|
||||
value: 3
|
||||
|
|
@ -691,7 +691,7 @@ sources:
|
|||
- name: payment_intent
|
||||
data_type: character varying
|
||||
description: "ID of the PaymentIntent that’s refunded."
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^pi_.{24}$"
|
||||
|
|
@ -704,7 +704,7 @@ sources:
|
|||
- name: balance_transaction
|
||||
data_type: character varying
|
||||
description: "Balance transacion that describes the impact on your account balance."
|
||||
tests:
|
||||
data_tests:
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: "^txn_.{24}$"
|
||||
row_condition: "balance_transaction is not null"
|
||||
|
|
@ -720,7 +720,7 @@ sources:
|
|||
- name: _airbyte_extracted_at
|
||||
data_type: timestamp with time zone
|
||||
description: "{{ doc('_airbyte_extracted_at_desc') }}"
|
||||
tests:
|
||||
data_tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue