From a986338f4a2706b5d838c80385a41859113c47c0 Mon Sep 17 00:00:00 2001 From: Muhammad Samy Date: Wed, 6 Nov 2024 14:31:22 +0300 Subject: [PATCH] fix Deprecated functionality https://docs.getdbt.com/docs/build/data-tests#new-data_tests-syntax --- models/schema.yml | 18 +++++++++--------- models/staging/schema.yml | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/models/schema.yml b/models/schema.yml index 381349cfd..6c71616ac 100644 --- a/models/schema.yml +++ b/models/schema.yml @@ -7,7 +7,7 @@ models: columns: - name: customer_id description: This is a unique identifier for a customer - tests: + data_tests: - unique - not_null @@ -34,14 +34,14 @@ models: columns: - name: order_id - tests: + data_tests: - unique - not_null description: This is a unique identifier for an order - name: customer_id description: Foreign key to the customers table - tests: + data_tests: - not_null - relationships: to: ref('customers') @@ -52,31 +52,31 @@ models: - name: status description: '{{ doc("orders_status") }}' - tests: + data_tests: - accepted_values: values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] - name: amount description: Total amount (AUD) of the order - tests: + data_tests: - not_null - name: credit_card_amount description: Amount of the order (AUD) paid for by credit card - tests: + data_tests: - not_null - name: coupon_amount description: Amount of the order (AUD) paid for by coupon - tests: + data_tests: - not_null - name: bank_transfer_amount description: Amount of the order (AUD) paid for by bank transfer - tests: + data_tests: - not_null - name: gift_card_amount description: Amount of the order (AUD) paid for by gift card - tests: + data_tests: - not_null diff --git a/models/staging/schema.yml b/models/staging/schema.yml index c207e4cf5..f47b0f6d4 100644 --- a/models/staging/schema.yml +++ b/models/staging/schema.yml @@ -4,28 +4,28 @@ models: - name: stg_customers columns: - name: customer_id - tests: + data_tests: - unique - not_null - name: stg_orders columns: - name: order_id - tests: + data_tests: - unique - not_null - name: status - tests: + data_tests: - accepted_values: values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] - name: stg_payments columns: - name: payment_id - tests: + data_tests: - unique - not_null - name: payment_method - tests: + data_tests: - accepted_values: values: ['credit_card', 'coupon', 'bank_transfer', 'gift_card']