From c3c628aec474db0d36f616d1d9cab490e1c092c1 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Mon, 13 Jan 2025 16:00:35 +0100 Subject: [PATCH] change "tests:" to "data_tests:" --- models/intermediate/athena/schema.yml | 20 +- models/intermediate/check_in_hero/schema.yml | 32 +- models/intermediate/core/schema.yml | 520 ++++----- models/intermediate/cross/schema.yml | 206 ++-- models/intermediate/edeposit/schema.yml | 36 +- models/intermediate/hubspot/schema.yml | 2 +- models/intermediate/kpis/schema.yml | 1006 ++++++++--------- .../screen_and_protect/schema.yml | 60 +- models/intermediate/xero/schema.yml | 26 +- models/reporting/athena/schema.yml | 12 +- models/reporting/check_in_hero/schema.yml | 30 +- models/reporting/core/schema.yml | 54 +- models/reporting/edeposit/schema.yml | 28 +- models/reporting/general/schema.yml | 200 ++-- models/reporting/kpis/schema.yml | 52 +- .../reporting/screen_and_protect/schema.yml | 38 +- models/reporting/xero/schema.yml | 40 +- models/staging/athena/schema.yml | 34 +- models/staging/check_in_hero/schema.yml | 30 +- models/staging/core/_core_sources.yml | 20 +- models/staging/core/schema.yml | 322 +++--- models/staging/edeposit/schema.yml | 34 +- models/staging/hubspot/schema.yml | 54 +- models/staging/screen_and_protect/schema.yml | 38 +- models/staging/screening/schema.yml | 22 +- models/staging/stripe/_stripe_sources.yml | 108 +- models/staging/xedotcom/schema.yml | 8 +- models/staging/xero/schema.yml | 82 +- seeds/schema.yml | 16 +- 29 files changed, 1565 insertions(+), 1565 deletions(-) diff --git a/models/intermediate/athena/schema.yml b/models/intermediate/athena/schema.yml index 4ec24d2..f6d07ba 100644 --- a/models/intermediate/athena/schema.yml +++ b/models/intermediate/athena/schema.yml @@ -14,7 +14,7 @@ models: - name: id_verification data_type: text description: "unique Superhog generated id for this verification" - tests: + data_tests: - unique - not_null @@ -27,7 +27,7 @@ models: - name: id_user_partner data_type: text description: "unique Superhog generated id for partner" - tests: + data_tests: - not_null - name: id_accommodation @@ -37,7 +37,7 @@ models: - name: version data_type: text description: "value to identify if it is Guesty (V1) or E-deposit (V2)" - tests: + data_tests: - accepted_values: values: - V1 @@ -45,7 +45,7 @@ models: - name: verification_source data_type: text description: "source of the verification for the booking" - tests: + data_tests: - accepted_values: values: - Guesty @@ -213,7 +213,7 @@ models: - name: id_verification data_type: text description: "unique Superhog generated id for this verification" - tests: + data_tests: - unique - not_null @@ -222,7 +222,7 @@ models: description: "unique Superhog generated id for a booking. note that there might be duplicate bookings on the original data but we remove them keeping only the verification with the most recent update." - tests: + data_tests: - not_null - unique @@ -233,13 +233,13 @@ models: - name: is_cancelled data_type: boolean description: "indicates if the booking has been cancelled or not." - tests: + data_tests: - not_null - name: ok_status_fee_in_gbp data_type: integer description: "total fee charged on checkout, this is only charged for approved verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -249,11 +249,11 @@ models: - name: created_date_utc data_type: date description: "Date of creation of the verification in the system" - tests: + data_tests: - not_null - name: checkout_date_utc data_type: date description: "Date of checkout for the booking" - tests: + data_tests: - not_null diff --git a/models/intermediate/check_in_hero/schema.yml b/models/intermediate/check_in_hero/schema.yml index 3337457..e0428d5 100644 --- a/models/intermediate/check_in_hero/schema.yml +++ b/models/intermediate/check_in_hero/schema.yml @@ -9,33 +9,33 @@ models: - name: id_record data_type: text description: Unique identifier for the record. - tests: + data_tests: - unique - not_null - name: id_user_partner data_type: text description: Identifier for the partner user associated with the check-in. - tests: + data_tests: - not_null - name: id_reservation data_type: text description: Unique identifier for the reservation associated with the check-in. - tests: + data_tests: - not_null - name: id_accommodation data_type: text description: Unique identifier for the accommodation associated with the reservation. - tests: + data_tests: - not_null - name: id_currency data_type: bigint description: "Id of the currency, works as a foreign key to the currency table" - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -64,7 +64,7 @@ models: - name: reservation_total_amount_in_local_currency data_type: numeric description: Total cost amount in guest currency for the reservation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: true @@ -73,19 +73,19 @@ models: data_type: text description: | Currency ISO code used by guest for the reservation. - tests: + data_tests: - not_null - name: channel data_type: text description: Booking channel or source. - tests: + data_tests: - not_null - name: checkin_date_utc data_type: date description: Check-in date for the booking. - tests: + data_tests: - not_null - name: checkin_time_utc @@ -95,13 +95,13 @@ models: - name: checkout_date_utc data_type: date description: Check-out date for the booking. - tests: + data_tests: - not_null - name: number_of_nights data_type: integer description: Number of nights for the reservation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 1 @@ -140,29 +140,29 @@ models: - name: updated_at_utc data_type: timestamp without time zone description: Timestamp of the last update to the record. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: Date of the last update to the record. - tests: + data_tests: - not_null - name: cosmos_creation_at_utc data_type: timestamp without time zone description: Timestamp when the record was created in Cosmos DB. - tests: + data_tests: - not_null - name: cosmos_creation_date_utc data_type: date description: Date when the record was created in Cosmos DB. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: Date when the record was created. - tests: + data_tests: - not_null diff --git a/models/intermediate/core/schema.yml b/models/intermediate/core/schema.yml index e0995bf..9c70633 100644 --- a/models/intermediate/core/schema.yml +++ b/models/intermediate/core/schema.yml @@ -19,7 +19,7 @@ models: - name: id_booking data_type: bigint description: The unique, Superhog generated id for this booking. - tests: + data_tests: - unique - not_null @@ -42,7 +42,7 @@ models: original and the others are the duplicates: - B and C will appear in this table, A will not. - The value of this field for both B and C will be A's id. - tests: + data_tests: - not_null - name: int_core__booking_charge_events @@ -85,14 +85,14 @@ models: - name: id_booking data_type: bigint description: The unique, Superhog generated id for this booking. - tests: + data_tests: - not_null - unique - name: id_price_plan data_type: bigint description: The id of the price plan that relates to this booking. - tests: + data_tests: - not_null - name: booking_fee_local @@ -114,7 +114,7 @@ models: This could be the check-in date of the booking or the date in which the guest verification started, depending on the billing settings of the host. - tests: + data_tests: - not_null - name: booking_fee_charge_date_utc @@ -124,7 +124,7 @@ models: This could be the check-in date of the booking or the date in which the guest verification started, depending on the billing settings of the host. - tests: + data_tests: - not_null - name: is_booking_created_after_charging_date @@ -154,7 +154,7 @@ models: - name: local_currency_iso_4217 data_type: character varying description: A currency code. - tests: + data_tests: - not_null - unique - name: checkin_cover_guest_fee_local_curr @@ -175,7 +175,7 @@ models: - name: id_user data_type: character varying description: The unique ID for the user. - tests: + data_tests: - not_null - unique - name: id_account_type @@ -332,7 +332,7 @@ models: description: "Unique, incremental, internal ID for the related verification request." - tests: + data_tests: - unique - not_null @@ -584,7 +584,7 @@ models: - name: id_verification_request data_type: bigint description: id of the verification request. It's the unique key for this model. - tests: + data_tests: - not_null - unique @@ -660,7 +660,7 @@ models: - name: id_verification_request data_type: bigint description: id of the completed verification request. It's the unique key for this model. - tests: + data_tests: - not_null - unique @@ -695,13 +695,13 @@ models: data_type: bigint description: Unique ID for the relation between the payment verification and the payment at hand. - tests: + data_tests: - unique - not_null - name: id_payment data_type: bigint description: Unique ID for the payment itself. - tests: + data_tests: - unique - not_null - name: is_refundable @@ -712,11 +712,11 @@ models: data_type: timestamp without time zone - name: payment_due_at_utc data_type: timestamp without time zone - tests: + data_tests: - not_null - name: payment_due_date_utc data_type: date - tests: + data_tests: - not_null - name: payment_paid_at_utc data_type: timestamp without time zone @@ -751,15 +751,15 @@ models: data_type: character varying - name: currency data_type: character varying - tests: + data_tests: - not_null - name: amount_in_txn_currency data_type: numeric - tests: + data_tests: - not_null - name: amount_in_gbp data_type: numeric - tests: + data_tests: - not_null - name: payment_status data_type: character varying @@ -776,7 +776,7 @@ models: Should we refund the payment, this is also the amount we will give back to the guest. - tests: + data_tests: - not_null - name: total_amount_in_gbp data_type: numeric @@ -786,7 +786,7 @@ models: Should we refund the payment, this is the GBP equivalent of the amount we will give back to the guest, but we won't be paying in GBP unless the original payment was in GBP. - tests: + data_tests: - not_null - name: tax_amount_in_txn_currency data_type: numeric @@ -795,7 +795,7 @@ models: the transaction. If the transaction accrues no taxes, will be 0. - tests: + data_tests: - not_null - name: tax_amount_in_gbp data_type: numeric @@ -803,7 +803,7 @@ models: The tax amount applicable to this transaction, in GBP. If the transaction accrues no taxes, will be 0. - tests: + data_tests: - not_null - name: amount_without_taxes_in_txn_currency data_type: numeric @@ -815,7 +815,7 @@ models: If the transaction accrues no taxes, will be equal to the field total_amount_in_txn_currency. - tests: + data_tests: - not_null - name: amount_without_taxes_in_gbp data_type: numeric @@ -827,7 +827,7 @@ models: If the transaction accrues no taxes, will be equal to the field total_amount_in_txn_currency. - tests: + data_tests: - not_null - name: vat_rate data_type: numeric @@ -835,7 +835,7 @@ models: The applicable VAT rate to this payment. This is inferred from (1) which service is the payment related to and (2) what's the billing country of the guest. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -847,7 +847,7 @@ models: description: | Whether the related payment is subject to VAT. For instance, deposit payments are not. - tests: + data_tests: - not_null - name: is_vat_taxed @@ -856,7 +856,7 @@ models: Syntactic sugar to indicate if there's any VAT on this payment. Will be true if so, false if not for any reason (guest country has no VAT, the payment is for a deposit, etc.) - tests: + data_tests: - not_null - name: is_missing_user_country @@ -871,7 +871,7 @@ models: If this turns true in any other case, you should really find out why the guest doesn't have a billing country. - tests: + data_tests: - not_null - accepted_values: values: @@ -891,7 +891,7 @@ models: If this turns true in any other case, you should really find out what's happening. - tests: + data_tests: - not_null - accepted_values: values: @@ -913,7 +913,7 @@ models: If this turns true, you have an unhandled problem and you should fix it. - tests: + data_tests: - not_null - accepted_values: values: @@ -929,14 +929,14 @@ models: - name: id_country data_type: bigint description: id of the country. It's the unique key for this model. - tests: + data_tests: - not_null - unique - name: iso_2 data_type: char(2) description: ISO 3166-1 alpha-2 country code. Cannot be null. - tests: + data_tests: - not_null - name: iso_3 @@ -948,7 +948,7 @@ models: - name: country_name data_type: character varying description: name of the country. Cannot be null. - tests: + data_tests: - not_null - name: iso_num_code @@ -967,14 +967,14 @@ models: description: | Id of the preferred currency for a given country. Might not be the only currency used in the country, it's just the preferred one. - tests: + data_tests: - not_null - name: preferred_currency_name data_type: character varying description: | Currency name of the preferred currency for a given country. - tests: + data_tests: - not_null - name: preferred_iso4217_code @@ -982,7 +982,7 @@ models: description: | Three-letter code assigned to the preferred currency for a given country by the ISO. These codes are part of the ISO 4217 standard. - tests: + data_tests: - not_null - name: int_core__accommodation @@ -997,7 +997,7 @@ models: - name: id_accommodation data_type: bigint description: Id of the accommodation or listing. It's the unique key for this model. - tests: + data_tests: - not_null - unique @@ -1056,7 +1056,7 @@ models: - name: created_at_utc data_type: timestamp description: Timestamp of when the listing was created. Cannot be null. - tests: + data_tests: - not_null - name: created_date_utc @@ -1086,7 +1086,7 @@ models: - name: id_user_host data_type: character varying description: Unique id value for the user - tests: + data_tests: - not_null - unique @@ -1144,7 +1144,7 @@ models: - name: id_verification_request data_type: bigint description: Unique id value for the verification request - tests: + data_tests: - not_null - unique @@ -1162,7 +1162,7 @@ models: - PMS - OSL - API/MANUAL - tests: + data_tests: - not_null - accepted_values: values: @@ -1243,7 +1243,7 @@ models: description: Id value for the verification request, there can be more than 1 record for each verification request since they can be associated to more than 1 booking - tests: + data_tests: - not_null - unique @@ -1261,7 +1261,7 @@ models: - PMS - OSL - API/MANUAL - tests: + data_tests: - not_null - accepted_values: values: @@ -1405,7 +1405,7 @@ models: - PMS - OSL - API/MANUAL - tests: + data_tests: - not_null - accepted_values: values: @@ -1469,7 +1469,7 @@ models: - name: id_booking data_type: bigint description: "The unique, Superhog generated id for this booking." - tests: + data_tests: - unique - not_null @@ -1504,7 +1504,7 @@ models: - OSL - API/MANUAL - null (bookings without verification request) - tests: + data_tests: - accepted_values: values: - "PMS" @@ -1626,7 +1626,7 @@ models: - name: id_user_host data_type: character varying description: Unique id value for the user - tests: + data_tests: - not_null - name: id_deal @@ -1676,7 +1676,7 @@ models: - name: id_accommodation data_type: bigint description: "Id of the accommodation or listing. It's the unique key for this model." - tests: + data_tests: - not_null - unique @@ -1719,7 +1719,7 @@ models: - name: id_booking data_type: bigint description: "The unique, Superhog generated id for this booking." - tests: + data_tests: - unique - not_null @@ -1730,7 +1730,7 @@ models: - name: id_user_host data_type: character varying description: The UUID of the Superhog user playing the host role in the booking. - tests: + data_tests: - not_null - name: id_accommodation @@ -1748,7 +1748,7 @@ models: - NoFlags - Flagged - IncompleteInformation" - tests: + data_tests: - accepted_values: values: - "Approved" @@ -1818,7 +1818,7 @@ models: - ScreenAndProtectApi - ResolutionApi - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_user @@ -1829,13 +1829,13 @@ models: data_type: string description: | The identifier of the user. Can be duplicated if it has multiple roles. - tests: + data_tests: - not_null - name: role_name data_type: string description: The name of the role a user has. - tests: + data_tests: - accepted_values: values: - Host @@ -1879,7 +1879,7 @@ models: - name: id_user_host data_type: character varying description: The unique user ID for the Host. - tests: + data_tests: - not_null - unique - name: account_type @@ -2040,14 +2040,14 @@ models: - name: id_user_host data_type: character varying description: The unique user ID for the Host. - tests: + data_tests: - not_null - unique - name: new_dash_version data_type: string description: | The name of the New Dash version this user appeared firstly. - tests: + data_tests: - not_null - name: has_user_moved_from_old_dash data_type: boolean @@ -2114,7 +2114,7 @@ models: data_type: bigint description: | The unique identifier of this table. - tests: + data_tests: - not_null - unique @@ -2122,7 +2122,7 @@ models: data_type: string description: | The identifier of the User. Can be duplicated if it has many Product Bundles. - tests: + data_tests: - not_null - name: id_product_bundle @@ -2177,7 +2177,7 @@ models: the Backend. Keep in mind that this timestamp can be before the migration of the user, thus effective_start_date_utc might be better for reporting and analysis purposes. - tests: + data_tests: - not_null - name: original_ends_at_utc @@ -2194,7 +2194,7 @@ models: Effective date of when this User has Product Bundle was active for the first time. It takes into account the fact that a User needs to be migrated in order for the Product Bundle to be active. In case of doubt, use this date. - tests: + data_tests: - not_null - name: effective_end_date_utc @@ -2261,7 +2261,7 @@ models: data_type: bigint description: | The unique identifier of this table. - tests: + data_tests: - not_null - unique @@ -2272,7 +2272,7 @@ models: A booking appearing here would mean it's under the New Dash & the New Pricing structure. It is expected that bookings are unique within this model. - tests: + data_tests: - not_null - unique @@ -2281,7 +2281,7 @@ models: description: | The identifier of the user product bundle. This allows the retrieval of the information of the product bundle associated at the user level. - tests: + data_tests: - not_null - name: id_user_host @@ -2290,7 +2290,7 @@ models: The identifier of the user that acts as a host. Only Hosts that have New Pricing in the New Dash structure that have had bookings will appear in this model. - tests: + data_tests: - not_null - name: product_bundle_name @@ -2350,7 +2350,7 @@ models: data_type: bigint description: | The unique identifier of this table. - tests: + data_tests: - not_null - unique @@ -2363,7 +2363,7 @@ models: than the default "Basic Screening". Accommodations can have several entries in this table for each time there's a change on the bundle assigned into it. - tests: + data_tests: - not_null - name: id_user_product_bundle @@ -2371,7 +2371,7 @@ models: description: | The identifier of the user product bundle. This allows the retrieval of the information of the product bundle associated at the user level. - tests: + data_tests: - not_null - name: id_user_host @@ -2381,7 +2381,7 @@ models: New Pricing in the New Dash structure that have an accommodation with a product bundle different than the default "Basic Screening" assigned into it will appear in this model. - tests: + data_tests: - not_null - name: product_bundle_name @@ -2396,7 +2396,7 @@ models: active for the first time, according to the Backend. Keep in mind that this timestamp can be before the migration of the user, thus effective_start_date_utc might be better for reporting and analysis purposes. - tests: + data_tests: - not_null - name: original_ends_at_utc @@ -2415,7 +2415,7 @@ models: active for the first time. It takes into account the fact that a User needs to be migrated in order for the Product Bundle to be active in the Accommodation. In case of doubt, use this date. - tests: + data_tests: - not_null - name: effective_end_date_utc @@ -2470,7 +2470,7 @@ models: description: | The unique identifier of this table. It corresponds to the host users that have been migrated to the New Dashboard. - tests: + data_tests: - not_null - unique @@ -2483,7 +2483,7 @@ models: description: | The migration phase in which this user was migrated, for informative purposes. - tests: + data_tests: - not_null - name: has_user_moved_from_old_dash @@ -2496,7 +2496,7 @@ models: data_type: date description: | The estimated date in which this user was migrated. - tests: + data_tests: - not_null - name: company_name @@ -2606,7 +2606,7 @@ models: should apply for the invoicing of that month, indisctintly of the fact that there was other plans active before. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_user_host @@ -2619,7 +2619,7 @@ models: description: | The unique identifier of this table, representing the identifier of the price plan. - tests: + data_tests: - not_null - name: id_user_host @@ -2627,7 +2627,7 @@ models: description: | The unique identifier of the user host that has a price plan. - tests: + data_tests: - not_null - name: price_plan_charged_by_type @@ -2635,7 +2635,7 @@ models: description: | Type of price plan that determines that will affect the billing logic applied. - tests: + data_tests: - not_null - name: price_plan_start_at_utc @@ -2643,7 +2643,7 @@ models: description: | Original timestamp of when a given price plan started to be active. - tests: + data_tests: - not_null - name: price_plan_end_at_utc @@ -2652,7 +2652,7 @@ models: Original timestamp of when a given price plan ended to be active. If it's currently active, a default end date on 2099 will apply. - tests: + data_tests: - not_null - name: price_plan_created_at_utc @@ -2660,7 +2660,7 @@ models: description: | Original timestamp of when a given price plan was created. - tests: + data_tests: - not_null - name: active_in_month_start_date_utc @@ -2671,7 +2671,7 @@ models: as active. If we're interested in retrieving the information from June, this date will be the 1st of June. - tests: + data_tests: - not_null - name: active_in_month_end_date_utc @@ -2682,7 +2682,7 @@ models: as active. If we're interested in retrieving the information from June, this date will be the 30th of June. - tests: + data_tests: - not_null - name: price_plans_active_in_month @@ -2694,7 +2694,7 @@ models: last one that was active, so this is just an informative field of how many changes of price plans happened during that month. - tests: + data_tests: - not_null - name: int_core__payaway_per_month_user description: | @@ -2710,7 +2710,7 @@ models: end date, this table will only reflect activeness within months up to the current month. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_user_host @@ -2723,7 +2723,7 @@ models: description: | The unique identifier of this table, representing the identifier of the payaway plan. - tests: + data_tests: - not_null - name: id_user_host @@ -2731,14 +2731,14 @@ models: description: | The unique identifier of the user host that has a price plan. - tests: + data_tests: - not_null - name: start_at_utc data_type: timestamp description: | Original timestamp of when a given plan started to be active. - tests: + data_tests: - not_null - name: end_at_utc @@ -2751,7 +2751,7 @@ models: data_type: timestamp description: | Original timestamp of when a given plan was created. - tests: + data_tests: - not_null - name: active_in_month_start_date_utc @@ -2760,7 +2760,7 @@ models: Date that refers to the first day of the month on which we will consider a plan as active. If we're interested in retrieving the information from June, this date will be the 1st of June. - tests: + data_tests: - not_null - name: active_in_month_end_date_utc @@ -2769,7 +2769,7 @@ models: Date that refers to the last day of the month on which we will consider a plan as active. If we're interested in retrieving the information from June, this date will be the 30th of June. - tests: + data_tests: - not_null - name: int_core__deal @@ -2792,7 +2792,7 @@ models: - name: id_deal data_type: character varying description: The unique ID for the Deal. One record per id_deal. - tests: + data_tests: - not_null - unique - name: main_deal_name @@ -2804,7 +2804,7 @@ models: This field should be modified at the moment we have a proper way to retrieve a common account name per deal. It can contain duplicates. - tests: + data_tests: - not_null - name: main_id_billing_country_per_deal data_type: integer @@ -2859,7 +2859,7 @@ models: - name: id_payaway_plan data_type: bigint description: "The unique id for this plan." - tests: + data_tests: - not_null - unique @@ -2916,7 +2916,7 @@ models: description: The ISO 4217 code for the currency of this record. Must always be filled, otherwise the records is meaningless. - tests: + data_tests: - not_null - name: created_at_utc @@ -2938,7 +2938,7 @@ models: It's a denormalised relationship to break the power of 2 link between chosen_product_services and product_service_binary_tier, which allows standard joins using the ids. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_user_product_bundle @@ -2950,14 +2950,14 @@ models: description: | The identifier of the record for a user having a product bundle. It's the foreign key pointing to user_product_bundle. - tests: + data_tests: - not_null - name: id_user_host data_type: string description: | The Superhog ID of the host user this record applies to. - tests: + data_tests: - not_null - name: id_product_bundle @@ -2969,21 +2969,21 @@ models: data_type: bigint description: | The identifier of the product service. - tests: + data_tests: - not_null - name: product_bundle_name data_type: string description: | The name of the product bundle. - tests: + data_tests: - not_null - name: product_service_name data_type: string description: | The name of the product service. - tests: + data_tests: - not_null - name: int_core__product_service_to_price @@ -2994,7 +2994,7 @@ models: of starts to end. If the end date is null, then the price is currently active. There is no possibility to allow custom pricing at user level. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: ends_at_utc column_B: starts_at_utc @@ -3005,21 +3005,21 @@ models: data_type: integer description: | Identifier of the product service to price. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_product_service data_type: integer description: | Identifier of the product service. - tests: + data_tests: - not_null - name: payment_type data_type: string description: | Type of the payment, namely if the price represents a percentage or an amount. - tests: + data_tests: - not_null - accepted_values: values: @@ -3031,7 +3031,7 @@ models: Represents how the price value should be taken into account, either if the price is representing the total amount at booking level or it's a nightly fee. - tests: + data_tests: - not_null - accepted_values: values: @@ -3041,7 +3041,7 @@ models: data_type: string description: | Represents at which moment in time this service should be invoiced. - tests: + data_tests: - not_null - accepted_values: values: @@ -3055,13 +3055,13 @@ models: description: Currency iso4217 code. It identifies the currency for the amount stated in amount_local_curr. - tests: + data_tests: - not_null - name: amount_local_curr data_type: decimal description: | Price amount of a given product service in the currency stated in id_currency. - tests: + data_tests: - not_null - name: product_service_price_name data_type: string @@ -3076,13 +3076,13 @@ models: description: | Flag that determines if the service is a default one (True) or an upgraded service (False). - tests: + data_tests: - not_null - name: starts_at_utc data_type: timestamp description: | Timestamp of when this product service to price starts to be active. - tests: + data_tests: - not_null - name: ends_at_utc data_type: timestamp @@ -3113,7 +3113,7 @@ models: data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: int_core__protection_plan_to_price @@ -3125,7 +3125,7 @@ models: storified and applies in the range of starts to end. If the end date is null, then the price is currently active. There is no possibility to allow custom pricing at user level. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: ends_at_utc column_B: starts_at_utc @@ -3135,21 +3135,21 @@ models: data_type: integer description: | Identifier of the protection plan to price. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_protection_plan data_type: integer description: | Identifier of the protection plan. - tests: + data_tests: - not_null - name: payment_type data_type: string description: | Type of the payment, namely if the price represents a percentage or an amount. - tests: + data_tests: - not_null - accepted_values: values: @@ -3161,7 +3161,7 @@ models: Represents how the price value should be taken into account, either if the price is representing the total amount at booking level or it's a nightly fee. - tests: + data_tests: - not_null - accepted_values: values: @@ -3171,7 +3171,7 @@ models: data_type: string description: | Represents at which moment in time this service should be invoiced. - tests: + data_tests: - not_null - accepted_values: values: @@ -3185,13 +3185,13 @@ models: description: Currency iso4217 code. It identifies the currency for the amount stated in amount_local_curr. - tests: + data_tests: - not_null - name: amount_local_curr data_type: decimal description: | Price amount of a given protection plan in the currency stated in id_currency. - tests: + data_tests: - not_null - name: protection_plan_price_name data_type: string @@ -3206,13 +3206,13 @@ models: description: | Flag that determines if the service is a default one (True) or an upgraded service (False). - tests: + data_tests: - not_null - name: starts_at_utc data_type: timestamp description: | Timestamp of when this protection plan to price starts to be active. - tests: + data_tests: - not_null - name: ends_at_utc data_type: timestamp @@ -3243,7 +3243,7 @@ models: data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: int_core__protection_plan_cover @@ -3258,37 +3258,37 @@ models: data_type: integer description: | Identifier of the protection plan cover. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_protection_plan data_type: integer description: | Identifier of the protection plan. - tests: + data_tests: - not_null - name: currency_code data_type: string description: Currency iso4217 code. It identifies the currency for the different protection covers. - tests: + data_tests: - not_null - name: baseline_protection_cover_local_curr data_type: decimal description: | Baseline cover amount of a given protection plan in the currency stated in currency_code. - tests: + data_tests: - not_null - name: lower_protection_cover_local_curr data_type: decimal description: | Lower cover amount of a given protection plan in the currency stated in currency_code. - tests: + data_tests: - not_null - name: maximum_protection_cover_local_curr data_type: decimal description: | Maximum cover amount of a given protection plan in the currency stated in currency_code. - tests: + data_tests: - not_null - name: protection_plan_cover_name data_type: string @@ -3318,7 +3318,7 @@ models: data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: int_core__booking_to_service @@ -3328,7 +3328,7 @@ models: applies to bookings that come from hosts that have been migrated into the New Dash or New Pricing. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: booking_check_out_at_utc column_B: booking_check_in_at_utc @@ -3348,7 +3348,7 @@ models: description: | The identifier of the booking. Acts as Foreign Key to Booking table. Cannot be null. - tests: + data_tests: - not_null - name: id_booking_service_detail @@ -3357,7 +3357,7 @@ models: The identifier of the booking that has a certain service applied. The same booking can have multiple services applied and would have distinct id_booking_service_detail. - tests: + data_tests: - not_null - unique @@ -3372,7 +3372,7 @@ models: description: The identifier of the accommodation or listing. It acts as Foreign Key to the Accommodation table. It cannot be null. - tests: + data_tests: - not_null - name: id_user_product_bundle @@ -3381,7 +3381,7 @@ models: The identifier of the Product Bundle, or program, that a User has applied to the Booking. It acts as Foreign Key to the User Product Bundle table. It cannot be null. - tests: + data_tests: - not_null - name: id_verification @@ -3411,7 +3411,7 @@ models: data_type: string description: | Unique identifier of the user that acts as a Host. - tests: + data_tests: - not_null - name: id_user_guest @@ -3425,28 +3425,28 @@ models: description: | The name of the program, or product bundle, applied to the booking. Cannot be null. - tests: + data_tests: - not_null - name: service_name data_type: string description: | The name of the service applied within the booking. Cannot be null. - tests: + data_tests: - not_null - name: service_status data_type: string description: | The status of the service applied within the booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_status data_type: string description: | The status of the overall booking. Cannot be null. - tests: + data_tests: - not_null - name: service_protection_amount @@ -3454,77 +3454,77 @@ models: description: | The amount protected given for the service applied within the booking. Cannot be null. - tests: + data_tests: - not_null - name: service_detail_created_at_utc data_type: timestamp description: | Timestamp of when this Service record was created in the Backend. - tests: + data_tests: - not_null - name: service_detail_updated_at_utc data_type: timestamp description: | Timestamp of when this Service record was last updated in the Backend. - tests: + data_tests: - not_null - name: booking_created_at_utc data_type: timestamp description: | Timestamp of when the Booking record was created in the Backend. - tests: + data_tests: - not_null - name: booking_created_date_utc data_type: date description: | Date of when the Booking record was created in the Backend. - tests: + data_tests: - not_null - name: booking_updated_at_utc data_type: timestamp description: | Timestamp of when the Booking record was last updated in the Backend. - tests: + data_tests: - not_null - name: booking_updated_date_utc data_type: date description: | Date of when the Booking record was last updated in the Backend. - tests: + data_tests: - not_null - name: booking_check_in_at_utc data_type: timestamp description: | Timestamp of the Check-in of the Booking. - tests: + data_tests: - not_null - name: booking_check_in_date_utc data_type: timestamp description: | Date of the Check-in of the Booking. - tests: + data_tests: - not_null - name: booking_check_out_at_utc data_type: timestamp description: | Timestamp of the Check-out of the Booking. - tests: + data_tests: - not_null - name: booking_check_out_date_utc data_type: date description: | Date of the Check-out of the Booking. - tests: + data_tests: - not_null - name: booking_number_of_nights @@ -3548,7 +3548,7 @@ models: data_type: boolean description: | Flag to determine if this user host is in New Dash or not. - tests: + data_tests: - not_null - name: new_dash_version @@ -3586,7 +3586,7 @@ models: It's a subset of all bookings since it only applies to bookings that come from hosts that have been migrated into the New Dash or New Pricing. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: booking_check_out_at_utc column_B: booking_check_in_at_utc @@ -3606,7 +3606,7 @@ models: description: | The identifier of the booking. Acts as Foreign Key to Booking table. Cannot be null. - tests: + data_tests: - not_null - name: id_booking_service_detail @@ -3615,49 +3615,49 @@ models: The identifier of the booking that has a certain service applied. The same booking can have multiple services applied and would have distinct id_booking_service_detail. - tests: + data_tests: - not_null - unique - name: service_detail_created_at_utc data_type: timestamp description: | Timestamp of when this Service record was created in the Backend. - tests: + data_tests: - not_null - name: service_detail_updated_at_utc data_type: timestamp description: | Timestamp of when this Service record was last updated in the Backend. - tests: + data_tests: - not_null - name: booking_created_at_utc data_type: timestamp description: | Timestamp of when the Booking record was created in the Backend. - tests: + data_tests: - not_null - name: booking_updated_at_utc data_type: timestamp description: | Timestamp of when the Booking record was last updated in the Backend. - tests: + data_tests: - not_null - name: booking_check_in_at_utc data_type: timestamp description: | Timestamp of the Check-in of the Booking. - tests: + data_tests: - not_null - name: booking_check_out_at_utc data_type: timestamp description: | Timestamp of the Check-out of the Booking. - tests: + data_tests: - not_null - name: service_business_scope @@ -3665,7 +3665,7 @@ models: description: | Identifies the main business scope (Platform, Guest Products, APIs) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -3677,7 +3677,7 @@ models: Identifies the service type (Screening, Deposit Management, Protection) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -3691,7 +3691,7 @@ models: description: | Identifies the source of the information used (Product or Protection based on how backend is modelled). - tests: + data_tests: - not_null - accepted_values: values: @@ -3703,14 +3703,14 @@ models: data_type: string description: | The status of the service applied within the booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_status data_type: string description: | The status of the overall booking. Cannot be null. - tests: + data_tests: - not_null - name: program_name @@ -3718,14 +3718,14 @@ models: description: | The name of the program, or product bundle, applied to the booking. Cannot be null. - tests: + data_tests: - not_null - name: service_name data_type: string description: | The name of the service applied within the booking. Cannot be null. - tests: + data_tests: - not_null - name: payment_type @@ -3733,7 +3733,7 @@ models: description: | Identifies if the service price unit is an actual amount or a percentage of another value. It can be null if the host currency is not populated. - tests: + data_tests: - accepted_values: values: - "AMOUNT" @@ -3745,7 +3745,7 @@ models: Identifies if the service price unit needs to be applied per booking or per number of nights between check-in and check-out. It can be null if the host currency is not populated. - tests: + data_tests: - accepted_values: values: - "PER BOOKING" @@ -3756,7 +3756,7 @@ models: description: | Identifies the moment in time in which this service needs to be charged. It can be null if the host currency is not populated. - tests: + data_tests: - accepted_values: values: - "PRE-BOOKING" @@ -3818,7 +3818,7 @@ models: description: | Flag to identify if the applied service is missing the currency code. Cannot be null. - tests: + data_tests: - not_null - name: is_booking_cancelled @@ -3826,7 +3826,7 @@ models: description: | Flag to identify if the booking has been cancelled or not. Cannot be null. - tests: + data_tests: - not_null - name: is_paid_service @@ -3834,7 +3834,7 @@ models: description: | Flag to identify it the service unit price is strictly greater than 0 or not. Cannot be null. - tests: + data_tests: - not_null - name: is_upgraded_service @@ -3842,7 +3842,7 @@ models: description: | Flag to identify if the service is an upgraded version, meaning, it's not a Basic Screening. Cannot be null. - tests: + data_tests: - not_null - name: is_missing_chargeable_date @@ -3850,7 +3850,7 @@ models: description: | Flag to identify if the service has no chargeable date. Cannot be null. - tests: + data_tests: - not_null - name: is_service_chargeable_in_a_single_date @@ -3871,7 +3871,7 @@ models: it's the snapshot of the current status of the Booking. It's a subset of all bookings since it only applies to bookings that come from hosts that have been migrated into the New Dash or New Pricing. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: booking_check_out_at_utc column_B: booking_check_in_at_utc @@ -3891,7 +3891,7 @@ models: description: | The identifier of the booking. Acts as Primary Key to this table. Cannot be null. - tests: + data_tests: - not_null - unique @@ -3906,7 +3906,7 @@ models: description: The identifier of the accommodation or listing. It acts as Foreign Key to the Accommodation table. It cannot be null. - tests: + data_tests: - not_null - name: id_user_product_bundle @@ -3915,7 +3915,7 @@ models: The identifier of the Product Bundle, or program, that a User has applied to the Booking. It acts as Foreign Key to the User Product Bundle table. It cannot be null. - tests: + data_tests: - not_null - name: id_deal @@ -3927,7 +3927,7 @@ models: data_type: string description: | Unique identifier of the user that acts as a Host. Cannot be null. - tests: + data_tests: - not_null - name: id_user_guest @@ -3940,7 +3940,7 @@ models: data_type: string description: | The current status of the booking. Cannot be null. - tests: + data_tests: - not_null - name: program_name @@ -3948,7 +3948,7 @@ models: description: | The name of the program, or product bundle, applied to the booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_created_at_utc @@ -3956,7 +3956,7 @@ models: description: | Timestamp of when the Booking record was created in the Backend. Cannot be null. - tests: + data_tests: - not_null - name: booking_created_date_utc @@ -3964,7 +3964,7 @@ models: description: | Date of when the Booking record was created in the Backend. Cannot be null. - tests: + data_tests: - not_null - name: booking_updated_at_utc @@ -3972,7 +3972,7 @@ models: description: | Timestamp of when the Booking record was last updated in the Backend. Cannot be null. - tests: + data_tests: - not_null - name: booking_updated_date_utc @@ -3980,7 +3980,7 @@ models: description: | Date of when the Booking record was last updated in the Backend. Cannot be null. - tests: + data_tests: - not_null - name: booking_check_in_at_utc @@ -3988,7 +3988,7 @@ models: description: | Timestamp of the Check-in of the Booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_check_in_date_utc @@ -3996,7 +3996,7 @@ models: description: | Date of the Check-in of the Booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_check_out_at_utc @@ -4004,14 +4004,14 @@ models: description: | Timestamp of the Check-out of the Booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_check_out_date_utc data_type: date description: | Date of the Check-out of the Booking. - tests: + data_tests: - not_null - name: booking_number_of_nights @@ -4029,7 +4029,7 @@ models: data_type: boolean description: | Flag to determine if this user host is in New Dash or not. - tests: + data_tests: - not_null - name: new_dash_version @@ -4074,7 +4074,7 @@ models: description: | Timestamp corresponding to the first creation of a Service record applied to this Booking, according to the Backend. - tests: + data_tests: - not_null - name: service_last_created_at_utc @@ -4082,7 +4082,7 @@ models: description: | Timestamp corresponding to the latest creation of a Service record applied to this Booking, according to the Backend. - tests: + data_tests: - not_null - name: service_last_updated_at_utc @@ -4090,7 +4090,7 @@ models: description: | Timestamp corresponding to the latest update on any Service record applied to this Booking, according to the Backend. - tests: + data_tests: - not_null - name: number_of_applied_services @@ -4122,7 +4122,7 @@ models: not necessarily mean that it won't be in the future. Similarly, if the booking is chargeable it does not necessarily mean that is actually charged. It cannot be null. - tests: + data_tests: - not_null - name: is_missing_currency_code_in_service_detail @@ -4187,7 +4187,7 @@ models: data_type: integer description: | Identifier of the Product Service Billing Item. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null @@ -4196,7 +4196,7 @@ models: description: | Identifier of the booking. Acts as foreign key for the Booking table. A Booking can have multiple Billing Items applied. Cannot be null. - tests: + data_tests: - not_null - name: id_product_service_to_price @@ -4204,7 +4204,7 @@ models: description: | Identifier of the product service to price. Acts as foreign key for the Product Service To Price table. Cannot be null. - tests: + data_tests: - not_null - name: id_product_service @@ -4212,7 +4212,7 @@ models: description: | Identifier of the product service. Acts as foreign key for the Product Service table. Cannot be null. - tests: + data_tests: - not_null - name: service_name @@ -4220,7 +4220,7 @@ models: description: | The name of the service billed for this booking. Cannot be null. For example: WAIVER PRO. - tests: + data_tests: - not_null - name: service_price_name @@ -4233,7 +4233,7 @@ models: data_type: string description: | The current status of the booking. Cannot be null. - tests: + data_tests: - not_null - name: currency_code @@ -4241,7 +4241,7 @@ models: description: Currency iso4217 code. It identifies the currency for the amount stated in amount_local_curr. It cannot be null. - tests: + data_tests: - not_null - name: amount_local_curr @@ -4249,7 +4249,7 @@ models: description: | Price of the Billing Item, in local currency. It can be positive or negative, depending on if the line aims to add or remove a previously created amount. - tests: + data_tests: - not_null - name: amount_in_gbp @@ -4258,49 +4258,49 @@ models: Price of the Billing Item, in GBP. It uses the exchange rate according to chargeable date. It can be positive or negative, depending on if the line aims to add or remove a previously created amount. - tests: + data_tests: - not_null - name: chargeable_at_utc data_type: timestamp description: | Timestamp of when this Product Service Billing Item can be charged. - tests: + data_tests: - not_null - name: chargeable_date_utc data_type: date description: | Date of when this Product Service Billing Item can be charged. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp description: | Timestamp of when this Product Service Billing Item record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this Product Service Billing Item record was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this Product Service Billing Item record was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this Product Service Billing Item record was last updated. - tests: + data_tests: - not_null - name: int_core__protection_plan_billing_item @@ -4313,7 +4313,7 @@ models: data_type: integer description: | Identifier of the Protection Plan Billing Item. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null @@ -4322,7 +4322,7 @@ models: description: | Identifier of the booking. Acts as foreign key for the Booking table. A Booking can have multiple Billing Items applied. Cannot be null. - tests: + data_tests: - not_null - name: id_protection_plan_to_price @@ -4330,7 +4330,7 @@ models: description: | Identifier of the protection plan to price. Acts as foreign key for the Protection Plan To Price table. Cannot be null. - tests: + data_tests: - not_null - name: id_protection_plan @@ -4338,7 +4338,7 @@ models: description: | Identifier of the protection plan. Acts as foreign key for the Protection Plan table. Cannot be null. - tests: + data_tests: - not_null - name: service_name @@ -4346,7 +4346,7 @@ models: description: | The name of the service billed for this booking. Cannot be null. For example: BASIC PROTECTION. - tests: + data_tests: - not_null - name: service_price_name @@ -4359,7 +4359,7 @@ models: data_type: string description: | The current status of the booking. Cannot be null. - tests: + data_tests: - not_null - name: currency_code @@ -4367,7 +4367,7 @@ models: description: Currency iso4217 code. It identifies the currency for the amount stated in amount_local_curr. It cannot be null. - tests: + data_tests: - not_null - name: amount_local_curr @@ -4375,7 +4375,7 @@ models: description: | Price of the Billing Item, in local currency. It can be positive or negative, depending on if the line aims to add or remove a previously created amount. - tests: + data_tests: - not_null - name: amount_in_gbp @@ -4384,49 +4384,49 @@ models: Price of the Billing Item, in GBP. It uses the exchange rate according to chargeable date. It can be positive or negative, depending on if the line aims to add or remove a previously created amount. - tests: + data_tests: - not_null - name: chargeable_at_utc data_type: timestamp description: | Timestamp of when this Protection Plan Billing Item can be charged. - tests: + data_tests: - not_null - name: chargeable_date_utc data_type: date description: | Date of when this Protection Plan Billing Item can be charged. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp description: | Timestamp of when this Protection Plane Billing Item record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this Protection Plan Billing Item record was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this Protection Plan Billing Item record was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this Protection Plan Billing Item record was last updated. - tests: + data_tests: - not_null - name: int_core__ab_test_tracking_guest_journey @@ -4439,7 +4439,7 @@ models: This table already contains cleaning of multi-variant guest journeys and disablement of the feature flag (A/B test) itself, so should be quite ready to use. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_verification_request @@ -4454,7 +4454,7 @@ models: can be part of none, one, or several A/B tests. In this table, a Verification Request or Guest Journey can only appear once per A/B test. Cannot be null. - tests: + data_tests: - not_null - name: ab_test_name @@ -4462,7 +4462,7 @@ models: description: | Name of the Guest Journey A/B test. It corresponds to the Feature Flag Name in the backend. Cannot be null. - tests: + data_tests: - not_null - name: variation @@ -4470,7 +4470,7 @@ models: description: | Identifier of the variation a given Verification Request is in, within a given Guest Journey A/B test. Cannot be null. - tests: + data_tests: - not_null - name: first_appearance_at_utc @@ -4479,7 +4479,7 @@ models: Timestamp of the first Verification Request Feature Flag record created with the same verification request and A/B test name. Mostly for information purposes. Cannot be null. - tests: + data_tests: - not_null - name: last_appearance_at_utc @@ -4488,7 +4488,7 @@ models: Timestamp of the last Verification Request Feature Flag record created with the same verification request and A/B test name. Mostly for information purposes. Cannot be null. - tests: + data_tests: - not_null - name: int_core__ab_test_monitoring_guest_journey @@ -4499,7 +4499,7 @@ models: a bit of open possibilities for whenever we're analysing results later on. This is already materialised to avoid running long queries in the notebooks. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_verification_request @@ -4514,7 +4514,7 @@ models: can be part of none, one, or several A/B tests. In this table, a Verification Request or Guest Journey can only appear once per A/B test. Cannot be null. - tests: + data_tests: - not_null - name: ab_test_name @@ -4522,7 +4522,7 @@ models: description: | Name of the Guest Journey A/B test. It corresponds to the Feature Flag Name in the backend. Cannot be null. - tests: + data_tests: - not_null - name: variation @@ -4530,7 +4530,7 @@ models: description: | Identifier of the variation a given Verification Request is in, within a given Guest Journey A/B test. Cannot be null. - tests: + data_tests: - not_null - name: first_appearance_date_utc @@ -4539,7 +4539,7 @@ models: Date of the first Verification Request Feature Flag record created with the same verification request and A/B test name. Mostly for information purposes. Cannot be null. - tests: + data_tests: - not_null - name: verification_started_date_utc @@ -4596,7 +4596,7 @@ models: data_type: character varying description: "Identifier of the User. Acts as primary key for this table." - tests: + data_tests: - not_null - unique @@ -4608,7 +4608,7 @@ models: data_type: bigint description: "Id of the currency, works as a foreign key to the currency table" - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -4638,14 +4638,14 @@ models: data_type: boolean description: | Indicates if the user's bookings are protected or not. - tests: + data_tests: - not_null - name: price_increase data_type: numeric description: The percentage or value of the price increase applied to the user's account. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: true @@ -4654,7 +4654,7 @@ models: data_type: date description: The date when the price increase becomes effective. This is the first day of the month. - tests: + data_tests: - is_first_day_of_month - name: monthly_volume_discount @@ -4662,7 +4662,7 @@ models: description: The discount percentage or value offered based on the volume of bookings achieved within a month. No user can have more than one discount per month. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100 @@ -4672,7 +4672,7 @@ models: data_type: numeric description: The minimum number of bookings required to qualify for the monthly volume discount. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: true @@ -4681,14 +4681,14 @@ models: data_type: date description: The date when the monthly volume discount period begins. This is the first day of the month. - tests: + data_tests: - is_first_day_of_month - name: monthly_volume_discount_end_date_utc data_type: date description: The date when the monthly volume discount period ends. This is the last day of the month. - tests: + data_tests: - is_last_day_of_month - name: monthly_general_discount @@ -4696,7 +4696,7 @@ models: description: The general discount percentage or value applied to all bookings within the applicable period. No user can have more than one discount per month. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100 @@ -4706,42 +4706,42 @@ models: data_type: date description: The date when the general discount period begins. This is the first day of the month. - tests: + data_tests: - is_first_day_of_month - name: monthly_general_discount_end_date_utc data_type: date description: The date when the general discount period ends. This is the last day of the month. - tests: + data_tests: - is_last_day_of_month - name: created_at_utc data_type: timestamp description: | Timestamp of when this user was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this user was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this user was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this user was last updated. - tests: + data_tests: - not_null - name: int_core__check_in_hero_users @@ -4753,7 +4753,7 @@ models: data_type: character varying description: "Identifier of the User. Acts as primary key for this table." - tests: + data_tests: - not_null - unique @@ -4765,7 +4765,7 @@ models: data_type: bigint description: "Id of the currency, works as a foreign key to the currency table" - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -4786,7 +4786,7 @@ models: - name: booking_fee_in_local_currency data_type: numeric description: "Fee charged to the user for each booking in the local currency." - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 1000 @@ -4800,26 +4800,26 @@ models: data_type: timestamp description: | Timestamp of when this user was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this user was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this user was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this user was last updated. - tests: + data_tests: - not_null diff --git a/models/intermediate/cross/schema.yml b/models/intermediate/cross/schema.yml index 558b10f..6daf234 100644 --- a/models/intermediate/cross/schema.yml +++ b/models/intermediate/cross/schema.yml @@ -26,18 +26,18 @@ models: description: A unique ID for the record, derived from concatenating the currencies, date, source and version. Currency order is relevant (EURUSD != USDEUR). - tests: + data_tests: - not_null - unique - name: from_currency data_type: character description: The source currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: to_currency data_type: character description: The target currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: rate data_type: numeric @@ -51,13 +51,13 @@ models: always be one. The rate can be smaller than one, but can't be negative. - tests: + data_tests: - not_negative_or_zero - not_null - name: rate_date_utc data_type: date description: The date in which the rate record is relevant. - tests: + data_tests: - not_null - name: source data_type: text @@ -72,7 +72,7 @@ models: in nature) or `guess` (the rate sits in the past and is a guess in nature). Note that one currency pair can have multiple rate versions on the same date. - tests: + data_tests: - accepted_values: values: - guess @@ -85,7 +85,7 @@ models: For external sources, this will be the point in time when the information was obtained from them. For stuff we make up here in the DWH, this will be the point in time when we made the assumption. - tests: + data_tests: - not_null - name: int_simple_exchange_rates description: >- @@ -96,7 +96,7 @@ models: The time granularity is daily. Each record holds a currency pair for a specific day. You will only find one conversion rate per currency pair and date. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - from_currency @@ -106,22 +106,22 @@ models: - name: from_currency data_type: character description: The source currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: to_currency data_type: character description: The source currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: rate data_type: numeric description: The target currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: rate_date_utc data_type: date description: The date in which the rate record is relevant. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp with time zone @@ -129,7 +129,7 @@ models: For external sources, this will be the point in time when the information was obtained from them. For stuff we make up here in the DWH, this will be the point in time when we made the assumption. - tests: + data_tests: - not_null - name: int_mtd_vs_previous_year_metrics @@ -145,7 +145,7 @@ models: date and it computes the relative increment by using the macro: - calculate_safe_relative_increment - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -156,13 +156,13 @@ models: - name: date data_type: date description: The date for the month-to-date metrics. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - accepted_values: values: - global @@ -172,7 +172,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: int_mtd_aggregated_metrics @@ -183,7 +183,7 @@ models: a set of metric, value, previous_year_value and relative_increment at a given date. It uses Jinja code to avoid code replication. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -195,31 +195,31 @@ models: - name: year data_type: int description: year number of the given date. - tests: + data_tests: - not_null - name: month data_type: int description: month number of the given date. - tests: + data_tests: - not_null - name: day data_type: int description: day monthly number of the given date. - tests: + data_tests: - not_null - name: is_end_of_month data_type: boolean description: True if it's end of month. - tests: + data_tests: - not_null - name: is_end_of_month_or_yesterday data_type: boolean description: True if it's end of month or yesterday. - tests: + data_tests: - not_null - name: is_current_month @@ -227,27 +227,27 @@ models: description: | checks if the date is within the current executed month, 1 for yes, 0 for no. - tests: + data_tests: - not_null - name: first_day_month data_type: date description: | first day of the month corresponding to the date field. - tests: + data_tests: - not_null - name: date data_type: date description: | main date for the computation, that is used for filters. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - accepted_values: values: - global @@ -257,7 +257,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: previous_year_date @@ -270,7 +270,7 @@ models: - name: metric data_type: text description: name of the business metric. - tests: + data_tests: - not_null - name: order_by @@ -282,7 +282,7 @@ models: - name: number_format data_type: text description: allows for grouping and formatting for displaying purposes. - tests: + data_tests: - accepted_values: values: [ @@ -333,7 +333,7 @@ models: enforces that a booking/guest journey/listing/etc has a host with a deal assigned, which is not necessarily the case. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -343,27 +343,27 @@ models: - name: date data_type: date description: The last day of the month or yesterday for historic metrics. - tests: + data_tests: - not_null - name: id_deal data_type: character varying description: Id of the deal associated to the host. - tests: + data_tests: - not_null - name: main_deal_name data_type: string description: | Main name for this ID deal. - tests: + data_tests: - not_null - name: has_active_pms data_type: boolean description: | Does the deal have an active associated PMS. - tests: + data_tests: - not_null - name: active_pms_list @@ -415,7 +415,7 @@ models: Lastly, this model provides informative date fields, deal attributes, absolute metric values and MoM & YoY relative incrementals to enrich reporting. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -428,7 +428,7 @@ models: Date corresponding to the last day of the month. Given month metrics are inclusive to this date. Together with id_deal, it acts as the primary key of this model. - tests: + data_tests: - not_null - name: id_deal @@ -436,21 +436,21 @@ models: description: | Unique identifier of a Deal. Together with date, it acts as the primary key of this model. - tests: + data_tests: - not_null - name: main_deal_name data_type: string description: | Main name for a Deal, representing the client. - tests: + data_tests: - not_null - name: has_active_pms data_type: boolean description: | Does the deal have an active associated PMS. - tests: + data_tests: - not_null - name: active_pms_list @@ -499,7 +499,7 @@ models: Informative field. It indicates the first day of the month corresponding to date. If date = 2024-09-30, this field will be 2024-09-01. - tests: + data_tests: - not_null - name: previous_1_month_first_day_month @@ -569,7 +569,7 @@ models: for a specific deal. This value corresponds to the given month. This value can be negative, but not null. - tests: + data_tests: - not_null - name: previous_1_month_revenue_in_gbp @@ -620,7 +620,7 @@ models: the previous month. It can be null if any revenue used in the computation is null or it's negative. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -634,7 +634,7 @@ models: It can be null if any revenue used in the computation is null or it's negative. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -647,7 +647,7 @@ models: months ago. It can be null if any revenue used in the computation is null or it's negative. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -661,7 +661,7 @@ models: It can be null if any revenue used in the computation is null or it's negative. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -672,7 +672,7 @@ models: Monthly value representing created bookings for a specific deal. This value corresponds to the given month. This value cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -686,7 +686,7 @@ models: the previous month. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -699,7 +699,7 @@ models: monthly amount generated 12 months ago. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -713,7 +713,7 @@ models: It can be null if the bookings created in the previous month are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -727,7 +727,7 @@ models: It can be null if the bookings created 12 months ago are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -738,7 +738,7 @@ models: Monthly value representing the listings booked in month for a specific deal. This value corresponds to the given month. This value cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -752,7 +752,7 @@ models: the previous month. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -765,7 +765,7 @@ models: monthly amount generated 12 months ago. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -779,7 +779,7 @@ models: It can be null if the listings booked in month in the previous month are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -793,7 +793,7 @@ models: It can be null if the listings booked in month of 12 months ago are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -807,7 +807,7 @@ models: aggregated_revenue_to_first_day_month. It can be negative if the sum is negative. It cannot be null. - tests: + data_tests: - not_null - name: effective_deal_revenue_12_months_window @@ -821,7 +821,7 @@ models: thus this value should not be reported. It is used for the deal contribution share with respect to the global revenue. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -838,7 +838,7 @@ models: thus this value should not be reported. It is used for the deal contribution share with respect to the global revenue. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -850,7 +850,7 @@ models: Represents the size of the deal in terms of revenue. In other words, what's the percentage of the global revenue that can be attributed to this deal. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -864,7 +864,7 @@ models: If more than one deal have the same share, the order is not under control. It cannot be null. - tests: + data_tests: - not_null - name: deal_created_bookings_12_months_window @@ -875,7 +875,7 @@ models: aggregated_revenue_from_first_day_month to aggregated_revenue_to_first_day_month. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -890,7 +890,7 @@ models: aggregated_revenue_to_first_day_month. It is used for the deal contribution share with respect to the global created bookings. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -903,7 +903,7 @@ models: In other words, what's the percentage of the global created bookings that can be attributed to this deal. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -917,7 +917,7 @@ models: If more than one deal have the same share, the order is not under control. It cannot be null. - tests: + data_tests: - not_null - name: deal_avg_listings_booked_in_month_12_months_window @@ -928,7 +928,7 @@ models: aggregated_revenue_from_first_day_month to aggregated_revenue_to_first_day_month. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -944,7 +944,7 @@ models: It is used for the deal contribution share with respect to the global average listings booked in month. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -958,7 +958,7 @@ models: In other words, what's the percentage of the global average listings booked in month that can be attributed to this deal. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -972,7 +972,7 @@ models: If more than one deal have the same share, the order is not under control. It cannot be null. - tests: + data_tests: - not_null - name: avg_mom_growth_score @@ -983,7 +983,7 @@ models: MoM shifted by one month of revenue. It indicates the tendency of growth of the deal without taking into account its revenue size. It cannot be null. - tests: + data_tests: - not_null - name: avg_yoy_growth_score @@ -994,7 +994,7 @@ models: YoY shifted by one month of revenue. It indicates the tendency of growth of the deal without taking into account its revenue size. It cannot be null. - tests: + data_tests: - not_null - name: avg_growth_score @@ -1005,7 +1005,7 @@ models: YoY and MoM shifted by one month of revenue. It indicates the tendency of growth of the deal without taking into account its revenue size. It cannot be null. - tests: + data_tests: - not_null - name: weighted_avg_growth_score @@ -1017,7 +1017,7 @@ models: It's the main indicator towards measuring both growth (if positive) or decay (if negative) while weighting the financial impact this deal tendency can have. - tests: + data_tests: - not_null - name: categorisation_weighted_avg_growth_score @@ -1028,7 +1028,7 @@ models: losers, flat, winners and top winners. Currently the categorisation is based on the score itself rather than selecting a top up/down. - tests: + data_tests: - not_null - accepted_values: values: @@ -1058,7 +1058,7 @@ models: The average approach "boosts" the contribution of those accounts that have been active for less than 12 months. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -1071,7 +1071,7 @@ models: Date corresponding to the last day of the month. Metrics are inclusive to this date. Together with id_deal, it acts as the primary key of this model. - tests: + data_tests: - not_null - name: id_deal @@ -1079,7 +1079,7 @@ models: description: | Unique identifier of a Deal. Together with date, it acts as the primary key of this model. - tests: + data_tests: - not_null - name: deal_lifecycle_state @@ -1096,7 +1096,7 @@ models: a given deal. In essence it states the amount of months a given deal has been active before a the month given by date, capped at 12 months. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 12 @@ -1117,7 +1117,7 @@ models: vs. the global amount, on the preceding 12 months with respect to date. It uses the average approach. It can be negative. - tests: + data_tests: - not_null - name: created_bookings_12m_average_contribution @@ -1126,7 +1126,7 @@ models: Share of the deal contribution on created bookings vs. the global amount, on the preceding 12 months with respect to date. It uses the average approach. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1139,7 +1139,7 @@ models: Share of the deal contribution on listings booked in month vs. the global amount, on the preceding 12 months with respect to date. It uses the average approach. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1172,7 +1172,7 @@ models: to the global amount. This means that, for instance, if we have 10% of churn in a month, it can be divided by 9% USA and 1% GBR since 9%+1% = 10%. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -1183,13 +1183,13 @@ models: - name: date data_type: date description: The date for the month-to-date metrics. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - accepted_values: values: - global @@ -1199,7 +1199,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: total_revenue_churn_average_contribution @@ -1228,7 +1228,7 @@ models: - name: id_verification data_type: text description: "unique Superhog generated id for this verification" - tests: + data_tests: - unique - not_null @@ -1241,7 +1241,7 @@ models: - name: id_user_partner data_type: text description: "unique Superhog generated id for partner" - tests: + data_tests: - not_null - name: id_accommodation @@ -1251,7 +1251,7 @@ models: - name: version data_type: text description: "value to identify if it is Guesty (V1) or E-deposit (V2)" - tests: + data_tests: - accepted_values: values: - V1 @@ -1260,7 +1260,7 @@ models: - name: verification_source data_type: text description: "source of the verification for the booking" - tests: + data_tests: - accepted_values: values: - Guesty @@ -1434,7 +1434,7 @@ models: additional metrics. The data is segmented by deal and time window for detailed analysis. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -1447,20 +1447,20 @@ models: description: | The last day of the month or yesterday for historic metrics. It's the same date as for KPIs related models. - tests: + data_tests: - not_null - name: id_deal data_type: character varying description: Id of the deal associated to the host. - tests: + data_tests: - not_null - name: time_window data_type: character varying description: | Identifier of the time window used for the aggregation of the metrics. - tests: + data_tests: - not_null - accepted_values: values: @@ -1490,14 +1490,14 @@ models: data_type: string description: | Main name for this ID deal. - tests: + data_tests: - not_null - name: has_active_pms data_type: boolean description: | Does the deal have an active associated PMS. - tests: + data_tests: - not_null - name: active_pms_list @@ -1548,7 +1548,7 @@ models: Total amount of bookings created by the deal in the time window. It can be null if no bookings were created. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1559,7 +1559,7 @@ models: Average amount of listings booked in month by the deal in the time window. It can be null if no listings were booked. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1600,7 +1600,7 @@ models: Total amount of payments in GBP made by the guest in the time window. It can be null if no payments were made by the guest. It can be negative. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1619,7 +1619,7 @@ models: Total amount of resolution payments made to the host in the time window. It can be null if no resolution payments were made by the host. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1649,7 +1649,7 @@ models: - name: id_deal data_type: character varying description: "Unique ID for this deal." - tests: + data_tests: - unique - not_null @@ -1662,7 +1662,7 @@ models: description: "Count of distinct names the deal has in Core. It might be the case that a deal has ony NULL value for a name, so the count will be 0" - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1676,7 +1676,7 @@ models: description: "Count of distinct names the deal has in Hubspot. It might be the case that a deal has ony NULL value for a name, so the count will be 0" - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1690,7 +1690,7 @@ models: description: "Count of distinct names the deal has in Xero. It might be the case that a deal has ony NULL value for a name, so the count will be 0" - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false diff --git a/models/intermediate/edeposit/schema.yml b/models/intermediate/edeposit/schema.yml index 79bd29b..a19826c 100644 --- a/models/intermediate/edeposit/schema.yml +++ b/models/intermediate/edeposit/schema.yml @@ -15,7 +15,7 @@ models: - name: id_verification data_type: text description: "unique Superhog generated id for this verification" - tests: + data_tests: - unique - not_null @@ -28,7 +28,7 @@ models: - name: id_user_partner data_type: text description: "unique Superhog generated id for partner" - tests: + data_tests: - not_null - name: id_accommodation @@ -38,7 +38,7 @@ models: - name: version data_type: text description: "value to identify if it is Guesty (V1) or E-deposit (V2)" - tests: + data_tests: - accepted_values: values: - V2 @@ -46,7 +46,7 @@ models: - name: verification_source data_type: text description: "source of the verification for the booking" - tests: + data_tests: - accepted_values: values: - Guesty @@ -206,7 +206,7 @@ models: description: "Unique Superhog generated id for this verification. Note that there are some users that have a different id in Cosmos. For those users we created a mapping to relate this ids." - tests: + data_tests: - unique - not_null @@ -215,19 +215,19 @@ models: description: "unique Superhog generated id for a booking. note that this could be duplicated and both will be charged, it's up to the user to no generate duplicate verifications" - tests: + data_tests: - not_null - name: id_user_partner data_type: text description: "unique Superhog generated id for partner" - tests: + data_tests: - not_null - name: id_accommodation data_type: text description: "unique Superhog generated id for a listing" - tests: + data_tests: - not_null - name: listing_town @@ -257,7 +257,7 @@ models: - name: currency data_type: text description: "currency in which the transaction actually happened" - tests: + data_tests: - not_null - name: nightly_fee_local @@ -271,7 +271,7 @@ models: - name: ok_status_fee_in_txn_currency data_type: numeric description: "fee charged in used currency for approved or flagged verifications and not cancelled" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -280,7 +280,7 @@ models: - name: ok_status_fee_in_gbp data_type: numeric description: "fee charged in gbp for approved or flagged verifications and not cancelled" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -289,7 +289,7 @@ models: - name: rejected_fee_in_txn_currency data_type: numeric description: "fee charged in used currency for rejected verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -298,7 +298,7 @@ models: - name: rejected_fee_in_gbp data_type: numeric description: "fee charged in gbp for rejected verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -307,7 +307,7 @@ models: - name: cancelled_fee_in_txn_currency data_type: numeric description: "fee charged in used currency for cancelled verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -316,7 +316,7 @@ models: - name: cancelled_fee_in_gbp data_type: numeric description: "fee charged in gbp for cancelled verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -325,7 +325,7 @@ models: - name: created_date_utc data_type: date description: "Date of creation of the verification in the system" - tests: + data_tests: - not_null - name: cancelled_date_utc @@ -335,11 +335,11 @@ models: - name: checkin_date_utc data_type: date description: "Date of checkin for the booking" - tests: + data_tests: - not_null - name: checkout_date_utc data_type: date description: "Date of checkout for the booking" - tests: + data_tests: - not_null diff --git a/models/intermediate/hubspot/schema.yml b/models/intermediate/hubspot/schema.yml index 791ab19..44460fd 100644 --- a/models/intermediate/hubspot/schema.yml +++ b/models/intermediate/hubspot/schema.yml @@ -17,7 +17,7 @@ models: - name: id_deal data_type: character varying description: Unique ID for this deal. - tests: + data_tests: - unique - not_null diff --git a/models/intermediate/kpis/schema.yml b/models/intermediate/kpis/schema.yml index 8301b76..380b26c 100644 --- a/models/intermediate/kpis/schema.yml +++ b/models/intermediate/kpis/schema.yml @@ -10,59 +10,59 @@ models: - name: date data_type: date description: Specific date. It's the primary key of this model. - tests: + data_tests: - unique - not_null - name: year data_type: int description: Year number of the given date. - tests: + data_tests: - not_null - name: month data_type: int description: Month number of the given date. - tests: + data_tests: - not_null - name: week data_type: int description: Week number of the given date. - tests: + data_tests: - not_null - name: day data_type: int description: Day monthly number of the given date. - tests: + data_tests: - not_null - name: first_day_month data_type: date description: | First day of the month corresponding to the date field. - tests: + data_tests: - not_null - name: last_day_month data_type: date description: | Last day of the month corresponding to the date field. - tests: + data_tests: - not_null - name: is_end_of_month data_type: boolean description: True if it's end of month, false otherwise. - tests: + data_tests: - not_null - name: is_current_month data_type: boolean description: | True if the date is within the current month, false otherwise. - tests: + data_tests: - not_null - name: is_month_to_date @@ -73,41 +73,41 @@ models: the current month or 2) a date corresponding to the same month of the previous year, which day number cannot be higher than yesterday's day number. - tests: + data_tests: - not_null - name: first_day_week data_type: date description: | First day of the week corresponding to the date field. - tests: + data_tests: - not_null - name: last_day_week data_type: date description: | Last day of the week corresponding to the date field. - tests: + data_tests: - not_null - name: is_end_of_week data_type: boolean description: True if it's end of week, false otherwise. - tests: + data_tests: - not_null - name: is_current_week data_type: boolean description: | True if the date is within the current week, false otherwise. - tests: + data_tests: - not_null - name: is_yesterday data_type: boolean description: | True if the date is yesterday, false otherwise. - tests: + data_tests: - not_null - name: int_kpis__agg_dates_main_kpis @@ -117,7 +117,7 @@ models: per a given dimension or specifically Monthly by Deal. The rest of the metrics computed are attached to this master table. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -130,13 +130,13 @@ models: description: | The end date of the time range considered for the metrics that will be available in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - accepted_values: values: - global @@ -147,59 +147,59 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: year data_type: int description: Year number of the given date. - tests: + data_tests: - not_null - name: month data_type: int description: Month number of the given date. - tests: + data_tests: - not_null - name: day data_type: int description: Day monthly number of the given date. - tests: + data_tests: - not_null - name: first_day_month data_type: date description: | First day of the month corresponding to the date field. - tests: + data_tests: - not_null - name: last_day_month data_type: date description: | Last day of the month corresponding to the date field. - tests: + data_tests: - not_null - name: is_end_of_month data_type: boolean description: True if it's end of month, false otherwise. - tests: + data_tests: - not_null - name: is_current_month data_type: boolean description: | True if the date is within the current month, false otherwise. - tests: + data_tests: - not_null - name: is_end_of_month_or_yesterday data_type: boolean description: | True if the date is the end of the month OR yesterday, false otherwise. - tests: + data_tests: - not_null - name: int_kpis__lifecycle_daily_accommodation @@ -228,7 +228,7 @@ models: Note that if a listing has had a booking created in a given month, all 3 columns will be true. Similarly, if the last booking created to a listing was 5 months ago, only the column has_been_booked_in_1_month will be false; while the other 2 will be true. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -238,13 +238,13 @@ models: - name: date data_type: date description: Date in which a Listing has a given lifecycle state. - tests: + data_tests: - not_null - name: id_accommodation data_type: bigint description: Id of the accommodation or listing. - tests: + data_tests: - not_null - name: creation_date_utc @@ -278,7 +278,7 @@ models: Contains the lifecycle state of a Listing. The accepted values are: 01-New, 02-Never Booked, 03-First Time Booked, 04-Active, 05-Churning, 06-Inactive, 07-Reactivated. Failing to implement the logic will result in alert. - tests: + data_tests: - not_null - accepted_values: values: @@ -333,7 +333,7 @@ models: this happens likely because of misconfiguration between Hubspot and Core. This should be reported to increase data quality. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -343,13 +343,13 @@ models: - name: date data_type: date description: Date in which a Deal has a given lifecycle state. - tests: + data_tests: - not_null - name: id_deal data_type: character varying description: Unique identifier of the Account. - tests: + data_tests: - not_null - name: creation_date_utc @@ -389,7 +389,7 @@ models: Contains the lifecycle state of a deal. The accepted values are: 01-New, 02-Never Booked, 03-First Time Booked, 04-Active, 05-Churning, 06-Inactive, 07-Reactivated. Failing to implement the logic will result in alert. - tests: + data_tests: - not_null - accepted_values: values: @@ -440,7 +440,7 @@ models: - name: id_deal data_type: string description: ID of the account, or deal. - tests: + data_tests: - not_null - unique - name: main_deal_name @@ -448,13 +448,13 @@ models: description: | Main deal name according to Hubspot. In case of a deal being present in both systems, Hubspot data will take precedence in terms of deal name. - tests: + data_tests: - not_null - name: has_active_pms data_type: boolean description: | Does the deal have an active associated PMS. - tests: + data_tests: - not_null - name: active_pms_list data_type: string @@ -473,7 +473,7 @@ models: Effective start date of the deal, which corresponds to the minimum between the date a deal has gone live according to Hubspot and the first date a user host has been created according to Core. - tests: + data_tests: - not_null - name: int_kpis__dimension_daily_accommodation @@ -481,7 +481,7 @@ models: This model computes the deal segmentation per number of listings in a daily manner. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -491,13 +491,13 @@ models: - name: date data_type: date description: Specific date in which the segmentation applies. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -505,7 +505,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - accepted_values: values: - "0" @@ -529,7 +529,7 @@ models: - id_deal, - dash_source. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -540,19 +540,19 @@ models: - name: date data_type: date description: Date of when Bookings have been created. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: dash_source data_type: string description: Dashboard source, either old or new. - tests: + data_tests: - not_null - accepted_values: values: @@ -564,7 +564,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -579,7 +579,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_bookings @@ -601,7 +601,7 @@ models: - dash_source, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -614,26 +614,26 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: dash_source data_type: string description: Dashboard source, either old or new. - tests: + data_tests: - not_null - accepted_values: values: @@ -645,7 +645,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -660,7 +660,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_bookings @@ -683,7 +683,7 @@ models: - dash_source, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -696,26 +696,26 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: dash_source data_type: string description: Dashboard source, either old or new. - tests: + data_tests: - not_null - accepted_values: values: @@ -727,7 +727,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -742,7 +742,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_bookings @@ -759,7 +759,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -771,20 +771,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - created_bookings @@ -799,7 +799,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_bookings @@ -814,7 +814,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -826,20 +826,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - created_bookings @@ -854,7 +854,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_bookings @@ -870,7 +870,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -880,13 +880,13 @@ models: - name: date data_type: date description: Date of when Guest Journeys have been created. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -894,7 +894,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -909,7 +909,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_guest_journeys @@ -930,7 +930,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -942,20 +942,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -963,7 +963,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -978,7 +978,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_guest_journeys @@ -1000,7 +1000,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1012,20 +1012,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1033,7 +1033,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1048,7 +1048,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_guest_journeys @@ -1065,7 +1065,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1077,20 +1077,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - created_guest_journeys @@ -1104,7 +1104,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_guest_journeys @@ -1119,7 +1119,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1131,20 +1131,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - created_guest_journeys @@ -1158,7 +1158,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_guest_journeys @@ -1174,7 +1174,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -1184,13 +1184,13 @@ models: - name: date data_type: date description: Date of when Guest Journeys have been started. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1198,7 +1198,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1213,7 +1213,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: started_guest_journeys @@ -1234,7 +1234,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1246,20 +1246,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1267,7 +1267,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1282,7 +1282,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: started_guest_journeys @@ -1304,7 +1304,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1316,20 +1316,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1337,7 +1337,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1352,7 +1352,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: started_guest_journeys @@ -1369,7 +1369,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1381,20 +1381,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - started_guest_journeys @@ -1408,7 +1408,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: started_guest_journeys @@ -1423,7 +1423,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1435,20 +1435,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - started_guest_journeys @@ -1462,7 +1462,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: started_guest_journeys @@ -1478,7 +1478,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -1488,13 +1488,13 @@ models: - name: date data_type: date description: Date of when Guest Journeys have been completed. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1502,7 +1502,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1517,7 +1517,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: completed_guest_journeys @@ -1538,7 +1538,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1550,20 +1550,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1571,7 +1571,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1586,7 +1586,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: completed_guest_journeys @@ -1608,7 +1608,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1620,20 +1620,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1641,7 +1641,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1656,7 +1656,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: completed_guest_journeys @@ -1673,7 +1673,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1685,20 +1685,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - completed_guest_journeys @@ -1712,7 +1712,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: completed_guest_journeys @@ -1727,7 +1727,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1739,20 +1739,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - completed_guest_journeys @@ -1766,7 +1766,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: completed_guest_journeys @@ -1782,7 +1782,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -1792,13 +1792,13 @@ models: - name: date data_type: date description: Date of when Guest Journeys have been completed. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1806,7 +1806,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1821,7 +1821,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: guest_journeys_with_payment @@ -1842,7 +1842,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1854,20 +1854,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1875,7 +1875,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1890,7 +1890,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: guest_journeys_with_payment @@ -1912,7 +1912,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1924,20 +1924,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -1945,7 +1945,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -1960,7 +1960,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: guest_journeys_with_payment @@ -1977,7 +1977,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -1989,20 +1989,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - guest_journeys_with_payment @@ -2016,7 +2016,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: guest_journeys_with_payment @@ -2031,7 +2031,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2043,20 +2043,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - guest_journeys_with_payment @@ -2070,7 +2070,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: guest_journeys_with_payment @@ -2087,7 +2087,7 @@ models: - id_deal, - has_id_check. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -2098,20 +2098,20 @@ models: - name: date data_type: date description: Date of when Guest Journeys have been completed. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: has_id_check data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -2123,7 +2123,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -2138,7 +2138,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: deposit_fees_in_gbp @@ -2179,7 +2179,7 @@ models: - has_id_check, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2192,27 +2192,27 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: has_id_check data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -2224,7 +2224,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -2239,7 +2239,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: deposit_fees_in_gbp @@ -2280,7 +2280,7 @@ models: - has_id_check, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2293,27 +2293,27 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: has_id_check data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -2325,7 +2325,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -2340,7 +2340,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: deposit_fees_in_gbp @@ -2381,7 +2381,7 @@ models: - has_id_check, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2394,33 +2394,33 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: week data_type: int description: ISO week number of the given date. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: has_id_check data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -2432,7 +2432,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -2447,7 +2447,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: deposit_fees_in_gbp @@ -2482,7 +2482,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2494,20 +2494,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - deposit_fees_in_gbp @@ -2525,7 +2525,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: deposit_fees_in_gbp @@ -2560,7 +2560,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2572,20 +2572,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - deposit_fees_in_gbp @@ -2603,7 +2603,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: deposit_fees_in_gbp @@ -2638,7 +2638,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2650,20 +2650,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - deposit_fees_in_gbp @@ -2681,7 +2681,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: deposit_fees_in_gbp @@ -2717,7 +2717,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -2727,13 +2727,13 @@ models: - name: date data_type: date description: Date of when Bookings have been checked-out. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -2741,7 +2741,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -2756,7 +2756,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: check_out_bookings @@ -2777,7 +2777,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2789,20 +2789,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -2810,7 +2810,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -2825,7 +2825,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: check_out_bookings @@ -2847,7 +2847,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2859,20 +2859,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -2880,7 +2880,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -2895,7 +2895,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: check_out_bookings @@ -2912,7 +2912,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2924,20 +2924,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - check_out_bookings @@ -2951,7 +2951,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: check_out_bookings @@ -2966,7 +2966,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -2978,20 +2978,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - check_out_bookings @@ -3005,7 +3005,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: check_out_bookings @@ -3021,7 +3021,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -3031,13 +3031,13 @@ models: - name: date data_type: date description: Date of when Bookings have been billable. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3045,7 +3045,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3060,7 +3060,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: billable_bookings @@ -3081,7 +3081,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3093,20 +3093,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3114,7 +3114,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3129,7 +3129,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: billable_bookings @@ -3151,7 +3151,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3163,20 +3163,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3184,7 +3184,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3199,7 +3199,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: billable_bookings @@ -3216,7 +3216,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3228,20 +3228,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - billable_bookings @@ -3255,7 +3255,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: billable_bookings @@ -3270,7 +3270,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3282,20 +3282,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - billable_bookings @@ -3309,7 +3309,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: billable_bookings @@ -3325,7 +3325,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -3335,13 +3335,13 @@ models: - name: date data_type: date description: Date of when Bookings have been cancelled. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3349,7 +3349,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3364,7 +3364,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: cancelled_bookings @@ -3385,7 +3385,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3397,20 +3397,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3418,7 +3418,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3433,7 +3433,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: cancelled_bookings @@ -3455,7 +3455,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3467,20 +3467,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3488,7 +3488,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3503,7 +3503,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: cancelled_bookings @@ -3520,7 +3520,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3532,20 +3532,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - cancelled_bookings @@ -3559,7 +3559,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: cancelled_bookings @@ -3574,7 +3574,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3586,20 +3586,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - cancelled_bookings @@ -3613,7 +3613,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: cancelled_bookings @@ -3633,7 +3633,7 @@ models: - has_payment, - has_id_check. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -3645,19 +3645,19 @@ models: - name: date data_type: date description: Date of Check-In of the bookings for the guest journeys. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: has_payment data_type: string description: Has there been any guest payments on the guest journey. - tests: + data_tests: - not_null - accepted_values: values: @@ -3668,7 +3668,7 @@ models: data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -3680,7 +3680,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3695,7 +3695,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_guest_journeys_not_cancelled @@ -3754,7 +3754,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -3764,13 +3764,13 @@ models: - name: date data_type: date description: Date of when Host Resolutions transaction happened. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3778,7 +3778,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3793,7 +3793,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: xero_host_resolution_payment_count @@ -3820,7 +3820,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3832,20 +3832,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3853,7 +3853,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3868,7 +3868,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: xero_host_resolution_payment_count @@ -3896,7 +3896,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3908,20 +3908,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -3929,7 +3929,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -3944,7 +3944,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: xero_host_resolution_payment_count @@ -3967,7 +3967,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -3979,20 +3979,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - xero_host_resolution_payment_count @@ -4007,7 +4007,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: xero_host_resolution_payment_count @@ -4029,7 +4029,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -4041,20 +4041,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - xero_host_resolution_payment_count @@ -4069,7 +4069,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: xero_host_resolution_payment_count @@ -4092,7 +4092,7 @@ models: - date, - id_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -4102,13 +4102,13 @@ models: - name: date data_type: date description: Date of when the document was issued. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -4116,7 +4116,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -4131,7 +4131,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: xero_booking_net_fees_in_gbp @@ -4197,7 +4197,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -4209,20 +4209,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -4230,7 +4230,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -4245,7 +4245,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: xero_booking_net_fees_in_gbp @@ -4311,7 +4311,7 @@ models: - id_deal, - active_accommodations_per_deal_segmentation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -4323,20 +4323,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -4344,7 +4344,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -4359,7 +4359,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: xero_booking_net_fees_in_gbp @@ -4420,7 +4420,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -4432,20 +4432,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - xero_booking_net_fees_in_gbp @@ -4466,7 +4466,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: xero_booking_net_fees_in_gbp @@ -4527,7 +4527,7 @@ models: The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -4539,20 +4539,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - xero_booking_net_fees_in_gbp @@ -4574,7 +4574,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: xero_booking_net_fees_in_gbp @@ -4646,7 +4646,7 @@ models: - main_billing_country_iso_3_per_deal, - active_accommodations_per_deal_segmentation - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -4657,7 +4657,7 @@ models: - name: date data_type: date description: Date containing the Deal metrics. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -4665,7 +4665,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -4680,7 +4680,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: new_deals @@ -4750,7 +4750,7 @@ models: but rather just select from this daily model the needed days to recover the necessary information. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -4761,13 +4761,13 @@ models: - name: date data_type: date description: Date containing the Deal metrics. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - new_deals @@ -4790,20 +4790,20 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: is_end_of_month data_type: boolean description: True if it's end of month, false otherwise. - tests: + data_tests: - not_null - name: is_current_month data_type: boolean description: | True if the date is within the current month, false otherwise. - tests: + data_tests: - not_null - name: is_month_to_date @@ -4814,7 +4814,7 @@ models: the current month or 2) a date corresponding to the same month of the previous year, which day number cannot be higher than yesterday's day number. - tests: + data_tests: - not_null - name: new_deals @@ -4881,7 +4881,7 @@ models: - date, - id_deal - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -4891,13 +4891,13 @@ models: - name: date data_type: date description: Date containing the Listing metrics. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -4905,7 +4905,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -4920,7 +4920,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Listing level. - tests: + data_tests: - not_null - name: new_listings @@ -4986,7 +4986,7 @@ models: but rather just select from this daily model the needed days to recover the necessary information. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -4997,13 +4997,13 @@ models: - name: date data_type: date description: Date containing the Listing metrics. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - new_listings @@ -5027,20 +5027,20 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: is_end_of_month data_type: boolean description: True if it's end of month, false otherwise. - tests: + data_tests: - not_null - name: is_current_month data_type: boolean description: | True if the date is within the current month, false otherwise. - tests: + data_tests: - not_null - name: is_month_to_date @@ -5051,7 +5051,7 @@ models: the current month or 2) a date corresponding to the same month of the previous year, which day number cannot be higher than yesterday's day number. - tests: + data_tests: - not_null - name: new_listings @@ -5109,7 +5109,7 @@ models: This model computes a cross join of dates with all combinations of guest products dimensions. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date_day @@ -5120,19 +5120,19 @@ models: - name: date_day data_type: date description: "Date of when Guest Journeys have been completed." - tests: + data_tests: - not_null - name: date_week data_type: string description: "Week number of when Guest Journeys have been completed." - tests: + data_tests: - not_null - name: has_payment data_type: string description: Has there been any guest payments on the guest journey. - tests: + data_tests: - not_null - accepted_values: values: @@ -5143,7 +5143,7 @@ models: data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -5154,7 +5154,7 @@ models: data_type: string description: | Main billing country of the host. - tests: + data_tests: - not_null - name: int_kpis__product_guest_daily_metrics @@ -5171,7 +5171,7 @@ models: - has_id_check, - main_billing_country_iso_3_per_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date_day @@ -5183,13 +5183,13 @@ models: - name: date_day data_type: date description: "Date of when Guest Journeys have been completed." - tests: + data_tests: - not_null - name: date_week data_type: string description: "Week number of when Guest Journeys have been completed." - tests: + data_tests: - not_null - name: py_date_day @@ -5201,7 +5201,7 @@ models: - name: has_payment data_type: string description: Has there been any guest payments on the guest journey. - tests: + data_tests: - not_null - accepted_values: values: @@ -5212,7 +5212,7 @@ models: data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -5223,7 +5223,7 @@ models: data_type: string description: | Main billing country of the host. - tests: + data_tests: - not_null - name: created_guest_journeys_not_cancelled @@ -5383,7 +5383,7 @@ models: - name: has_payment data_type: string description: Has there been any guest payments on the guest journey. - tests: + data_tests: - not_null - accepted_values: values: @@ -5394,7 +5394,7 @@ models: data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -5405,7 +5405,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: timeframe @@ -5413,7 +5413,7 @@ models: description: | Timeframe considered for the aggregation, it could be Year-to-date, Month-to-date or Week-to-date - tests: + data_tests: - not_null - accepted_values: values: @@ -5460,7 +5460,7 @@ models: - service_name - service_business_type - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -5472,25 +5472,25 @@ models: - name: date data_type: date description: Date of when Services have been created. - tests: + data_tests: - not_null - name: id_booking data_type: bigint description: Unique identifier of the Booking. - tests: + data_tests: - not_null - name: service_name data_type: string description: Name of the created service. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: is_upgraded_service @@ -5498,7 +5498,7 @@ models: description: | Whether the service is an upgraded version of the default. In other words, if it's not Basic Screening. - tests: + data_tests: - not_null - accepted_values: values: @@ -5511,7 +5511,7 @@ models: Identifies the service type (Screening, Deposit Management, Protection) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -5526,7 +5526,7 @@ models: description: | The version of the New Dash. It corresponds to the release or migration phase from user point of view. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -5534,7 +5534,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -5549,7 +5549,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_services @@ -5574,7 +5574,7 @@ models: - active_accommodations_per_deal_segmentation, - service_business_type. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -5588,26 +5588,26 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: service_name data_type: string description: Name of the created service. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: service_business_type @@ -5616,7 +5616,7 @@ models: Identifies the service type (Screening, Deposit Management, Protection) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -5631,7 +5631,7 @@ models: description: | Whether the service is an upgraded version of the default. In other words, if it's not Basic Screening. - tests: + data_tests: - not_null - accepted_values: values: @@ -5643,7 +5643,7 @@ models: description: | The version of the New Dash. It corresponds to the release or migration phase from user point of view. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -5651,7 +5651,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -5666,7 +5666,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_services @@ -5699,7 +5699,7 @@ models: - active_accommodations_per_deal_segmentation, - service_business_type. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -5713,26 +5713,26 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: service_name data_type: string description: Name of the created service. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: service_business_type @@ -5741,7 +5741,7 @@ models: Identifies the service type (Screening, Deposit Management, Protection) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -5756,7 +5756,7 @@ models: description: | Whether the service is an upgraded version of the default. In other words, if it's not Basic Screening. - tests: + data_tests: - not_null - accepted_values: values: @@ -5768,7 +5768,7 @@ models: description: | The version of the New Dash. It corresponds to the release or migration phase from user point of view. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -5776,7 +5776,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -5791,7 +5791,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: created_services @@ -5814,7 +5814,7 @@ models: as it only considers services created after the user has moved to New Dash. The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -5826,20 +5826,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - created_services @@ -5857,7 +5857,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_services @@ -5879,7 +5879,7 @@ models: as it only considers services created after the user has moved to New Dash. The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -5891,20 +5891,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - created_services @@ -5922,7 +5922,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_services @@ -5944,7 +5944,7 @@ models: as it only considers services created after the user has moved to New Dash. The primary key of this model is date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -5956,13 +5956,13 @@ models: data_type: date description: | The daily date acting as time range for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - created_services @@ -5980,7 +5980,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_services @@ -6001,7 +6001,7 @@ models: This model computes the time granularity aggregation per previously computed dimension aggregation. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -6015,13 +6015,13 @@ models: description: | The end date of the time range specified in the time_granularity for the dimension, dimension_value and metrics in this record. - tests: + data_tests: - not_null - name: time_granularity data_type: string description: The time dimension. - tests: + data_tests: - accepted_values: values: - daily @@ -6031,7 +6031,7 @@ models: - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - accepted_values: values: - global @@ -6046,7 +6046,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_services @@ -6104,7 +6104,7 @@ models: - service_name - service_business_type - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -6116,31 +6116,31 @@ models: - name: date data_type: date description: Date of when Services are supposed to be charged. - tests: + data_tests: - not_null - name: id_booking data_type: bigint description: Unique identifier of the Booking. - tests: + data_tests: - not_null - name: service_name data_type: string description: Name of the chargeable service. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: id_accommodation data_type: bigint description: Unique identifier of an accommodation, or listing. - tests: + data_tests: - not_null - name: is_upgraded_service @@ -6148,7 +6148,7 @@ models: description: | Whether the service is an upgraded version of the default. In other words, if it's not Basic Screening. - tests: + data_tests: - not_null - accepted_values: values: @@ -6161,7 +6161,7 @@ models: Identifies the service type (Screening, Deposit Management, Protection) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -6176,7 +6176,7 @@ models: description: | The version of the New Dash. It corresponds to the release or migration phase from user point of view. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -6184,7 +6184,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -6199,7 +6199,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: chargeable_services @@ -6231,7 +6231,7 @@ models: - active_accommodations_per_deal_segmentation. - service_business_type - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -6245,38 +6245,38 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_booking data_type: bigint description: Unique identifier of the Booking. - tests: + data_tests: - not_null - name: service_name data_type: string description: Name of the chargeable service. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: id_accommodation data_type: bigint description: Unique identifier of an accommodation, or listing. - tests: + data_tests: - not_null - name: is_upgraded_service @@ -6284,7 +6284,7 @@ models: description: | Whether the service is an upgraded version of the default. In other words, if it's not Basic Screening. - tests: + data_tests: - not_null - accepted_values: values: @@ -6297,7 +6297,7 @@ models: Identifies the service type (Screening, Deposit Management, Protection) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -6312,7 +6312,7 @@ models: description: | The version of the New Dash. It corresponds to the release or migration phase from user point of view. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -6320,7 +6320,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -6335,7 +6335,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: chargeable_services @@ -6367,7 +6367,7 @@ models: - active_accommodations_per_deal_segmentation, - service_business_type - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -6381,38 +6381,38 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: id_booking data_type: bigint description: Unique identifier of the Booking. - tests: + data_tests: - not_null - name: service_name data_type: string description: Name of the chargeable service. - tests: + data_tests: - not_null - name: id_deal data_type: string description: Unique identifier of an account. - tests: + data_tests: - not_null - name: id_accommodation data_type: bigint description: Unique identifier of an accommodation, or listing. - tests: + data_tests: - not_null - name: is_upgraded_service @@ -6420,7 +6420,7 @@ models: description: | Whether the service is an upgraded version of the default. In other words, if it's not Basic Screening. - tests: + data_tests: - not_null - accepted_values: values: @@ -6433,7 +6433,7 @@ models: Identifies the service type (Screening, Deposit Management, Protection) according to New Pricing documentation. Cannot be null. - tests: + data_tests: - not_null - accepted_values: values: @@ -6448,7 +6448,7 @@ models: description: | The version of the New Dash. It corresponds to the release or migration phase from user point of view. - tests: + data_tests: - not_null - name: active_accommodations_per_deal_segmentation @@ -6456,7 +6456,7 @@ models: description: | Segment value based on the number of listings booked in 12 months for a given deal and date. - tests: + data_tests: - not_null - accepted_values: values: @@ -6471,7 +6471,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: chargeable_services @@ -6493,7 +6493,7 @@ models: as it only considers services chargeable after the user has moved to New Dash. The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -6505,20 +6505,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - total_chargeable_services @@ -6537,7 +6537,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: total_chargeable_services @@ -6573,7 +6573,7 @@ models: as it only considers services chargeable after the user has moved to New Dash. The primary key of this model is end_date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - end_date @@ -6585,20 +6585,20 @@ models: data_type: date description: | The start date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: end_date data_type: date description: | The end date of the time range considered for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - total_chargeable_services @@ -6617,7 +6617,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: total_chargeable_services @@ -6653,7 +6653,7 @@ models: as it only considers services chargeable after the user has moved to New Dash. The primary key of this model is date, dimension and dimension_value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -6665,13 +6665,13 @@ models: data_type: date description: | The daily date acting as time range for the metrics in this record. - tests: + data_tests: - not_null - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - assert_dimension_completeness: metric_column_names: - total_chargeable_services @@ -6690,7 +6690,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: total_chargeable_services diff --git a/models/intermediate/screen_and_protect/schema.yml b/models/intermediate/screen_and_protect/schema.yml index 041451b..b7a3a04 100644 --- a/models/intermediate/screen_and_protect/schema.yml +++ b/models/intermediate/screen_and_protect/schema.yml @@ -6,7 +6,7 @@ models: Records of verification requests from the Screen and Protect API. The table tracks verification requests, their outcomes, and related metadata about guests, listings, and partners. - tests: + data_tests: - at_least_one_null: columns: - monthly_volume_discount @@ -15,20 +15,20 @@ models: - name: id_verification data_type: text description: Unique identifier for the verification request. - tests: + data_tests: - unique - not_null - name: id_booking data_type: text description: Unique identifier for the booking associated with the verification. - tests: + data_tests: - not_null - name: id_user_partner data_type: text description: Identifier for the partner user initiating the verification. - tests: + data_tests: - not_null - name: id_accommodation @@ -39,7 +39,7 @@ models: data_type: bigint description: "Id of the currency, works as a foreign key to the currency table" - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -49,13 +49,13 @@ models: data_type: boolean description: | Indicates if the booking is protected or not. - tests: + data_tests: - not_null - name: protection_type data_type: text description: Specific protection type for the request. - tests: + data_tests: - not_null - accepted_values: values: @@ -70,7 +70,7 @@ models: description: Field used for protection type "STANDALONE PROTECTION" to indicate the starting level of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100000 @@ -81,7 +81,7 @@ models: description: Field used for protection type "SCREEN & PROTECT", "BASIC PROTECTION" or "DAMAGE WAIVER" to show the basic amount of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100000 @@ -92,7 +92,7 @@ models: description: Field used for protection type "SCREEN & PROTECT", or "STANDALONE PROTECTION" to show the basic amount of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 50000000 @@ -105,7 +105,7 @@ models: - name: verification_status data_type: text description: Outcome of the verification process. - tests: + data_tests: - not_null - accepted_values: values: @@ -117,7 +117,7 @@ models: data_type: numeric description: The percentage or value of the price increase applied to the user's account. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: true @@ -126,7 +126,7 @@ models: data_type: date description: The date when the price increase becomes effective. This is the first day of the month. - tests: + data_tests: - is_first_day_of_month - name: monthly_volume_discount @@ -134,7 +134,7 @@ models: description: The discount percentage or value offered based on the volume of bookings achieved within a month. No user can have more than one discount per month. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100 @@ -144,7 +144,7 @@ models: data_type: numeric description: The minimum number of bookings required to qualify for the monthly volume discount. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: true @@ -153,14 +153,14 @@ models: data_type: date description: The date when the monthly volume discount period begins. This is the first day of the month. - tests: + data_tests: - is_first_day_of_month - name: monthly_volume_discount_end_date_utc data_type: date description: The date when the monthly volume discount period ends. This is the last day of the month. - tests: + data_tests: - is_last_day_of_month - name: monthly_general_discount @@ -168,7 +168,7 @@ models: description: The general discount percentage or value applied to all bookings within the applicable period. No user can have more than one discount per month. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100 @@ -178,14 +178,14 @@ models: data_type: date description: The date when the general discount period begins. This is the first day of the month. - tests: + data_tests: - is_first_day_of_month - name: monthly_general_discount_end_date_utc data_type: date description: The date when the general discount period ends. This is the last day of the month. - tests: + data_tests: - is_last_day_of_month - name: verification_status_reason @@ -203,7 +203,7 @@ models: - name: watch_list data_type: text description: Indicates if the guest was flagged on a watchlist. - tests: + data_tests: - accepted_values: values: - "MATCH" @@ -228,13 +228,13 @@ models: - name: is_cancelled data_type: boolean description: Indicates if the booking was canceled. - tests: + data_tests: - not_null - name: cancelled_at_utc data_type: timestamp without time zone description: Timestamp when the booking was canceled. - tests: + data_tests: - not_null: where: is_cancelled = true @@ -297,44 +297,44 @@ models: - name: status_updated_at_utc data_type: timestamp without time zone description: Timestamp of the last status update for the verification. - tests: + data_tests: - not_null - name: status_updated_date_utc data_type: date description: Date of the last status update for the verification. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp without time zone description: Timestamp of the last update to the record. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: Date of the last update to the record. - tests: + data_tests: - not_null - name: creation_at_utc data_type: timestamp without time zone description: | Timestamp of when the reservation was created. - tests: + data_tests: - not_null - name: creation_date_utc data_type: date description: | Date of when the reservation was created. - tests: + data_tests: - not_null - name: cosmos_created_date_utc data_type: date description: | Date of when the verification request was created in Cosmos DB. - tests: + data_tests: - not_null diff --git a/models/intermediate/xero/schema.yml b/models/intermediate/xero/schema.yml index 42c35c6..5e0e38d 100644 --- a/models/intermediate/xero/schema.yml +++ b/models/intermediate/xero/schema.yml @@ -4,31 +4,31 @@ models: - name: int_xero__invoices columns: - name: id_invoice - tests: + data_tests: - not_null - unique - name: int_xero__credit_notes columns: - name: id_credit_note - tests: + data_tests: - not_null - unique - name: int_xero__invoice_line_items columns: - name: id_line_item - tests: + data_tests: - not_null - unique - name: int_xero__credit_note_line_items columns: - name: id_line_item - tests: + data_tests: - not_null - unique - name: int_xero__bank_transactions columns: - name: id_bank_transaction - tests: + data_tests: - not_null - unique @@ -63,7 +63,7 @@ models: - name: id_line_item data_type: text description: "" - tests: + data_tests: - not_null - unique @@ -75,7 +75,7 @@ models: data_type: text description: | Indicates whether the record belongs in an invoice or a credit note. - tests: + data_tests: - not_null - accepted_values: values: @@ -137,7 +137,7 @@ models: - name: document_currency_iso_4217 data_type: character varying description: "" - tests: + data_tests: - not_null - length_between: min_length: 3 @@ -150,7 +150,7 @@ models: - name: id_document data_type: character varying description: "" - tests: + data_tests: - not_null - name: reference @@ -172,7 +172,7 @@ models: - name: document_type data_type: character varying description: "" - tests: + data_tests: - not_null - accepted_values: values: @@ -188,14 +188,14 @@ models: - name: exchange_rate_to_gbp data_type: numeric description: "" - tests: + data_tests: - not_null - not_negative - name: document_status data_type: character varying description: "" - tests: + data_tests: - not_null - accepted_values: values: @@ -209,7 +209,7 @@ models: - name: line_amount_tax_inclusiveness data_type: character varying description: "" - tests: + data_tests: - accepted_values: values: - Inclusive diff --git a/models/reporting/athena/schema.yml b/models/reporting/athena/schema.yml index c7ab78c..55b97a5 100644 --- a/models/reporting/athena/schema.yml +++ b/models/reporting/athena/schema.yml @@ -10,7 +10,7 @@ models: - name: id_verification data_type: text description: "unique Superhog generated id for this verification" - tests: + data_tests: - unique - not_null @@ -19,7 +19,7 @@ models: description: "unique Superhog generated id for a booking. note that this could be duplicated and both will be charged, it's up to the user to not generate or cancel duplicate verifications" - tests: + data_tests: - not_null - name: verification_status @@ -29,13 +29,13 @@ models: - name: is_cancelled data_type: boolean description: "indicates if the booking has been cancelled or not." - tests: + data_tests: - not_null - name: ok_status_fee_in_gbp data_type: integer description: "total fee charged on checkout, this is only charged for approved verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -45,11 +45,11 @@ models: - name: created_date_utc data_type: date description: "Date of creation of the verification in the system" - tests: + data_tests: - not_null - name: checkout_date_utc data_type: date description: "Date of checkout for the booking" - tests: + data_tests: - not_null diff --git a/models/reporting/check_in_hero/schema.yml b/models/reporting/check_in_hero/schema.yml index 5aa74ce..c66e10e 100644 --- a/models/reporting/check_in_hero/schema.yml +++ b/models/reporting/check_in_hero/schema.yml @@ -9,26 +9,26 @@ models: - name: id_record data_type: text description: Unique identifier for the record. - tests: + data_tests: - unique - not_null - name: id_user_partner data_type: text description: Identifier for the partner user associated with the check-in. - tests: + data_tests: - not_null - name: id_reservation data_type: text description: Unique identifier for the reservation associated with the check-in. - tests: + data_tests: - not_null - name: id_accommodation data_type: text description: Unique identifier for the accommodation associated with the reservation. - tests: + data_tests: - not_null - name: guest_last_name @@ -54,7 +54,7 @@ models: - name: reservation_total_amount_in_local_currency data_type: numeric description: Total cost amount in guest currency for the reservation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: true @@ -63,19 +63,19 @@ models: data_type: text description: | Currency ISO code used by guest for the reservation. - tests: + data_tests: - not_null - name: channel data_type: text description: Booking channel or source. - tests: + data_tests: - not_null - name: checkin_date_utc data_type: date description: Check-in date for the booking. - tests: + data_tests: - not_null - name: checkin_time_utc @@ -85,13 +85,13 @@ models: - name: checkout_date_utc data_type: date description: Check-out date for the booking. - tests: + data_tests: - not_null - name: number_of_nights data_type: integer description: Number of nights for the reservation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 1 @@ -130,29 +130,29 @@ models: - name: updated_at_utc data_type: timestamp without time zone description: Timestamp of the last update to the record. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: Date of the last update to the record. - tests: + data_tests: - not_null - name: cosmos_creation_at_utc data_type: timestamp without time zone description: Timestamp when the record was created in Cosmos DB. - tests: + data_tests: - not_null - name: cosmos_creation_date_utc data_type: date description: Date when the record was created in Cosmos DB. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: Date when the record was created. - tests: + data_tests: - not_null diff --git a/models/reporting/core/schema.yml b/models/reporting/core/schema.yml index 1e68518..3aafcfe 100644 --- a/models/reporting/core/schema.yml +++ b/models/reporting/core/schema.yml @@ -19,7 +19,7 @@ models: - name: id_payment data_type: bigint description: Superhog id for this Payment. - tests: + data_tests: - unique - not_null @@ -30,13 +30,13 @@ models: - name: payment_due_at_utc data_type: timestamp without time zone description: The point in time at which this payment had to be paid. - tests: + data_tests: - not_null - name: payment_due_date_utc data_type: date description: The date on which this payment had to be paid. - tests: + data_tests: - not_null - name: payment_paid_at_utc @@ -88,13 +88,13 @@ models: - name: id_guest_user data_type: character varying description: The UUID of the guest user in the Superhog backend. - tests: + data_tests: - not_null - name: id_verification data_type: bigint description: The ID of the verification that generated this payment. - tests: + data_tests: - not_null - name: verification_payment_type @@ -104,7 +104,7 @@ models: - name: amount_in_txn_currency data_type: numeric description: The payment amount in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. (To be decommissioned) - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -112,13 +112,13 @@ models: - name: currency data_type: character varying description: The currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. - tests: + data_tests: - not_null - name: amount_in_gbp data_type: numeric description: The payment amount value, converted to GBP, using the exchange rate for the day on which the payment happened. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -126,7 +126,7 @@ models: - name: payment_status data_type: character varying description: "The status of the payment. It can be one of: Paid, Refunded, Refund Failed, Cancelled, Paid Manually, Unpaid." - tests: + data_tests: - not_null - name: notes @@ -139,7 +139,7 @@ models: - name: total_amount_in_txn_currency data_type: numeric description: The payment amount in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -147,7 +147,7 @@ models: - name: amount_without_taxes_in_txn_currency data_type: numeric description: The payment amount without taxes in the currency in which the transaction actually happened. If the guest paid in Australian Dollars, this is measured in AUD. (To be decommissioned) - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -155,7 +155,7 @@ models: - name: total_amount_in_gbp data_type: numeric description: The payment amount value, converted to GBP, using the exchange rate for the day on which the payment happened. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -163,7 +163,7 @@ models: - name: amount_without_taxes_in_gbp data_type: numeric description: The payment amount value without taxes, converted to GBP, using the exchange rate for the day on which the payment happened. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -185,7 +185,7 @@ models: - name: id_booking data_type: bigint description: The unique, Superhog generated id for this booking. - tests: + data_tests: - unique - not_null @@ -253,7 +253,7 @@ models: description: | Unique, incremental, internal ID for the related verification request. - tests: + data_tests: - not_null - unique @@ -632,7 +632,7 @@ models: - name: id_user data_type: character varying description: Unique, incremental, internal ID for the user. - tests: + data_tests: - unique - not_null @@ -795,7 +795,7 @@ models: - name: id_user_host data_type: character varying description: Unique id value for the user - tests: + data_tests: - not_null - unique @@ -853,7 +853,7 @@ models: - name: id_verification_request data_type: bigint description: Unique id value for the verification request - tests: + data_tests: - not_null - unique @@ -871,7 +871,7 @@ models: - PMS - OSL - API/MANUAL - tests: + data_tests: - not_null - accepted_values: values: @@ -944,7 +944,7 @@ models: - name: id_user_host data_type: character varying description: Unique id value for the user - tests: + data_tests: - not_null - name: id_deal @@ -994,7 +994,7 @@ models: - name: id_accommodation data_type: bigint description: "Id of the accommodation or listing. It's the unique key for this model." - tests: + data_tests: - not_null - unique @@ -1037,7 +1037,7 @@ models: - name: id_booking data_type: bigint description: "The unique, Superhog generated id for this booking." - tests: + data_tests: - unique - not_null @@ -1048,7 +1048,7 @@ models: - name: id_user_host data_type: character varying description: The UUID of the Superhog user playing the host role in the booking. - tests: + data_tests: - not_null - name: id_accommodation @@ -1066,7 +1066,7 @@ models: - NoFlags - Flagged - IncompleteInformation" - tests: + data_tests: - accepted_values: values: - "Approved" @@ -1129,7 +1129,7 @@ models: description: | The unique identifier of this table. It corresponds to the host users that have been migrated to the New Dashboard. - tests: + data_tests: - not_null - unique @@ -1142,7 +1142,7 @@ models: description: | The migration phase in which this user was migrated, for informative purposes. - tests: + data_tests: - not_null - name: has_user_moved_from_old_dash @@ -1155,7 +1155,7 @@ models: data_type: date description: | The estimated date in which this user was migrated. - tests: + data_tests: - not_null - name: company_name diff --git a/models/reporting/edeposit/schema.yml b/models/reporting/edeposit/schema.yml index e896eae..566d6b1 100644 --- a/models/reporting/edeposit/schema.yml +++ b/models/reporting/edeposit/schema.yml @@ -12,7 +12,7 @@ models: - name: id_verification data_type: text description: "unique Superhog generated id for this verification" - tests: + data_tests: - unique - not_null @@ -21,19 +21,19 @@ models: description: "unique Superhog generated id for a booking. note that there might be duplicate bookings on the original data but we remove them keeping only the verification with the most recent update." - tests: + data_tests: - not_null - name: id_user_partner data_type: text description: "unique Superhog generated id for partner" - tests: + data_tests: - not_null - name: id_accommodation data_type: text description: "unique Superhog generated id for a listing" - tests: + data_tests: - not_null - name: listing_town @@ -63,7 +63,7 @@ models: - name: currency data_type: text description: "currency in which the transaction actually happened" - tests: + data_tests: - not_null - name: nightly_fee_local @@ -77,7 +77,7 @@ models: - name: ok_status_fee_in_txn_currency data_type: numeric description: "fee charged in used currency for approved or flagged verifications and not cancelled" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -86,7 +86,7 @@ models: - name: ok_status_fee_in_gbp data_type: numeric description: "fee charged in gbp for approved or flagged verifications and not cancelled" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -95,7 +95,7 @@ models: - name: rejected_fee_in_txn_currency data_type: numeric description: "fee charged in used currency for rejected verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -104,7 +104,7 @@ models: - name: rejected_fee_in_gbp data_type: numeric description: "fee charged in gbp for rejected verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -113,7 +113,7 @@ models: - name: cancelled_fee_in_txn_currency data_type: numeric description: "fee charged in used currency for cancelled verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -122,7 +122,7 @@ models: - name: cancelled_fee_in_gbp data_type: numeric description: "fee charged in gbp for cancelled verifications" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -131,7 +131,7 @@ models: - name: created_date_utc data_type: date description: "Date of creation of the verification in the system" - tests: + data_tests: - not_null - name: cancelled_date_utc @@ -141,11 +141,11 @@ models: - name: checkin_date_utc data_type: date description: "Date of checkin for the booking" - tests: + data_tests: - not_null - name: checkout_date_utc data_type: date description: "Date of checkout for the booking" - tests: + data_tests: - not_null diff --git a/models/reporting/general/schema.yml b/models/reporting/general/schema.yml index 3cecbd0..1194b8c 100644 --- a/models/reporting/general/schema.yml +++ b/models/reporting/general/schema.yml @@ -203,18 +203,18 @@ models: description: A unique ID for the record, derived from concatenating the currencies, date, source and version. Currency order is relevant (EURUSD != USDEUR). - tests: + data_tests: - not_null - unique - name: from_currency data_type: character description: The source currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: to_currency data_type: character description: The target currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: rate data_type: numeric @@ -228,13 +228,13 @@ models: always be one. The rate can be smaller than one, but can't be negative. - tests: + data_tests: - not_negative_or_zero - not_null - name: rate_date_utc data_type: date description: The date in which the rate record is relevant. - tests: + data_tests: - not_null - name: source data_type: text @@ -249,7 +249,7 @@ models: in nature) or `guess` (the rate sits in the past and is a guess in nature). Note that one currency pair can have multiple rate versions on the same date. - tests: + data_tests: - accepted_values: values: - guess @@ -262,7 +262,7 @@ models: For external sources, this will be the point in time when the information was obtained from them. For stuff we make up here in the DWH, this will be the point in time when we made the assumption. - tests: + data_tests: - not_null - name: simple_exchange_rates @@ -274,7 +274,7 @@ models: The time granularity is daily. Each record holds a currency pair for a specific day. You will only find one conversion rate per currency pair and date. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - from_currency @@ -284,22 +284,22 @@ models: - name: from_currency data_type: character description: The source currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: to_currency data_type: character description: The source currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: rate data_type: numeric description: The target currency, represented as an ISO 4217 code. - tests: + data_tests: - not_null - name: rate_date_utc data_type: date description: The date in which the rate record is relevant. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp with time zone @@ -307,7 +307,7 @@ models: For external sources, this will be the point in time when the information was obtained from them. For stuff we make up here in the DWH, this will be the point in time when we made the assumption. - tests: + data_tests: - not_null - name: mtd_aggregated_metrics @@ -317,7 +317,7 @@ models: It's the main source of information for the Main KPIs reporting, specifically on the MTD (Month To Date) and the Monthly Overview. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -329,25 +329,25 @@ models: - name: year data_type: int description: Year number of the given date. - tests: + data_tests: - not_null - name: month data_type: int description: Month number of the given date. - tests: + data_tests: - not_null - name: day data_type: int description: Day monthly number of the given date. - tests: + data_tests: - not_null - name: is_end_of_month data_type: boolean description: Is end of month, 1 for yes, 0 for no. - tests: + data_tests: - not_null - name: is_current_month @@ -355,7 +355,7 @@ models: description: | Checks if the date is within the current executed month, 1 for yes, 0 for no. - tests: + data_tests: - not_null - name: is_end_of_month_or_yesterday @@ -363,7 +363,7 @@ models: description: | Checks if the date is end of month or yesterday, 1 for yes, 0 for no. - tests: + data_tests: - not_null - name: first_day_month @@ -371,7 +371,7 @@ models: description: | First day of the month corresponding to the date field. It comes from int_dates_mtd logic. - tests: + data_tests: - not_null - name: date @@ -379,7 +379,7 @@ models: description: | Main date for the computation, that is used for filters. It comes from int_dates_mtd logic. - tests: + data_tests: - not_null - latest_date_is_yesterday @@ -391,13 +391,13 @@ models: dimension_display; this is, the name of the dimension for displaying purposes. - tests: + data_tests: - not_null - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: previous_year_date @@ -410,7 +410,7 @@ models: - name: metric data_type: text description: Name of the business metric. - tests: + data_tests: - not_null - name: order_by @@ -422,7 +422,7 @@ models: - name: number_format data_type: text description: Allows for grouping and formatting for displaying purposes. - tests: + data_tests: - accepted_values: values: [ @@ -475,7 +475,7 @@ models: enforces that a booking/guest journey/listing/etc has a host with a deal assigned, which is not necessarily the case. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -485,20 +485,20 @@ models: - name: date data_type: date description: The last day of the month for historic metrics. - tests: + data_tests: - not_null - name: id_deal data_type: character varying description: Id of the deal associated to the host. - tests: + data_tests: - not_null - name: main_deal_name data_type: string description: | Main name for this ID deal. - tests: + data_tests: - not_null - name: main_billing_country_iso_3_per_deal @@ -510,19 +510,19 @@ models: - name: year data_type: int description: year number of the given date. - tests: + data_tests: - not_null - name: month data_type: int description: month number of the given date. - tests: + data_tests: - not_null - name: day data_type: int description: day monthly number of the given date. - tests: + data_tests: - not_null - name: monthly_growth_score_by_deal @@ -562,7 +562,7 @@ models: Lastly, this model provides informative date fields, deal attributes, absolute metric values and MoM & YoY relative incrementals to enrich reporting. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -575,7 +575,7 @@ models: Date corresponding to the last day of the month. Given month metrics are inclusive to this date. Together with id_deal, it acts as the primary key of this model. - tests: + data_tests: - not_null - name: id_deal @@ -583,21 +583,21 @@ models: description: | Unique identifier of a Deal. Together with date, it acts as the primary key of this model. - tests: + data_tests: - not_null - name: main_deal_name data_type: string description: | Main name for a Deal, representing the client. - tests: + data_tests: - not_null - name: has_active_pms data_type: boolean description: | Does the deal have an active associated PMS. - tests: + data_tests: - not_null - name: active_pms_list @@ -646,7 +646,7 @@ models: Informative field. It indicates the first day of the month corresponding to date. If date = 2024-09-30, this field will be 2024-09-01. - tests: + data_tests: - not_null - name: previous_1_month_first_day_month @@ -716,7 +716,7 @@ models: for a specific deal. This value corresponds to the given month. This value can be negative, but not null. - tests: + data_tests: - not_null - name: previous_1_month_revenue_in_gbp @@ -767,7 +767,7 @@ models: the previous month. It can be null if any revenue used in the computation is null or it's negative. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -781,7 +781,7 @@ models: It can be null if any revenue used in the computation is null or it's negative. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -794,7 +794,7 @@ models: months ago. It can be null if any revenue used in the computation is null or it's negative. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -808,7 +808,7 @@ models: It can be null if any revenue used in the computation is null or it's negative. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -819,7 +819,7 @@ models: Monthly value representing created bookings for a specific deal. This value corresponds to the given month. This value cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -833,7 +833,7 @@ models: the previous month. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -846,7 +846,7 @@ models: monthly amount generated 12 months ago. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -860,7 +860,7 @@ models: It can be null if the bookings created in the previous month are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -874,7 +874,7 @@ models: It can be null if the bookings created 12 months ago are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -885,7 +885,7 @@ models: Monthly value representing the listings booked in month for a specific deal. This value corresponds to the given month. This value cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -899,7 +899,7 @@ models: the previous month. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -912,7 +912,7 @@ models: monthly amount generated 12 months ago. This value can be null, thus indicating that no history is available. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -926,7 +926,7 @@ models: It can be null if the listings booked in month in the previous month are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -940,7 +940,7 @@ models: It can be null if the listings booked in month of 12 months ago are null. This field is used for the growth score computation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: -1 strictly: false @@ -954,7 +954,7 @@ models: aggregated_revenue_to_first_day_month. It can be negative if the sum is negative. It cannot be null. - tests: + data_tests: - not_null - name: effective_deal_revenue_12_months_window @@ -968,7 +968,7 @@ models: thus this value should not be reported. It is used for the deal contribution share with respect to the global revenue. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -985,7 +985,7 @@ models: thus this value should not be reported. It is used for the deal contribution share with respect to the global revenue. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -997,7 +997,7 @@ models: Represents the size of the deal in terms of revenue. In other words, what's the percentage of the global revenue that can be attributed to this deal. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1011,7 +1011,7 @@ models: If more than one deal have the same share, the order is not under control. It cannot be null. - tests: + data_tests: - not_null - name: deal_created_bookings_12_months_window @@ -1022,7 +1022,7 @@ models: aggregated_revenue_from_first_day_month to aggregated_revenue_to_first_day_month. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1037,7 +1037,7 @@ models: aggregated_revenue_to_first_day_month. It is used for the deal contribution share with respect to the global created bookings. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1050,7 +1050,7 @@ models: In other words, what's the percentage of the global created bookings that can be attributed to this deal. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1064,7 +1064,7 @@ models: If more than one deal have the same share, the order is not under control. It cannot be null. - tests: + data_tests: - not_null - name: deal_avg_listings_booked_in_month_12_months_window @@ -1075,7 +1075,7 @@ models: aggregated_revenue_from_first_day_month to aggregated_revenue_to_first_day_month. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1091,7 +1091,7 @@ models: It is used for the deal contribution share with respect to the global average listings booked in month. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1105,7 +1105,7 @@ models: In other words, what's the percentage of the global average listings booked in month that can be attributed to this deal. It cannot be null. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1119,7 +1119,7 @@ models: If more than one deal have the same share, the order is not under control. It cannot be null. - tests: + data_tests: - not_null - name: avg_mom_growth_score @@ -1130,7 +1130,7 @@ models: MoM shifted by one month of revenue. It indicates the tendency of growth of the deal without taking into account its revenue size. It cannot be null. - tests: + data_tests: - not_null - name: avg_yoy_growth_score @@ -1141,7 +1141,7 @@ models: YoY shifted by one month of revenue. It indicates the tendency of growth of the deal without taking into account its revenue size. It cannot be null. - tests: + data_tests: - not_null - name: avg_growth_score @@ -1152,7 +1152,7 @@ models: YoY and MoM shifted by one month of revenue. It indicates the tendency of growth of the deal without taking into account its revenue size. It cannot be null. - tests: + data_tests: - not_null - name: weighted_avg_growth_score @@ -1164,7 +1164,7 @@ models: It's the main indicator towards measuring both growth (if positive) or decay (if negative) while weighting the financial impact this deal tendency can have. - tests: + data_tests: - not_null - name: categorisation_weighted_avg_growth_score @@ -1175,7 +1175,7 @@ models: losers, flat, winners and top winners. Currently the categorisation is based on the score itself rather than selecting a top up/down. - tests: + data_tests: - not_null - accepted_values: values: @@ -1202,7 +1202,7 @@ models: description: | The identifier of the booking. Acts as Primary Key to this table. Cannot be null. - tests: + data_tests: - not_null - unique @@ -1210,7 +1210,7 @@ models: data_type: string description: | Unique identifier of the account. It cannot be null. - tests: + data_tests: - not_null - name: main_billing_country @@ -1228,7 +1228,7 @@ models: This field should be modified at the moment we have a proper way to retrieve a common account name per deal. It can contain duplicates. - tests: + data_tests: - not_null - name: hubspot_deal_name @@ -1246,7 +1246,7 @@ models: data_type: string description: | The current status of the booking. Cannot be null. - tests: + data_tests: - not_null - name: program_name @@ -1254,7 +1254,7 @@ models: description: | The name of the program, or product bundle, applied to the booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_created_date_utc @@ -1262,7 +1262,7 @@ models: description: | Date of when the Booking record was created in the Backend. Cannot be null. - tests: + data_tests: - not_null - name: booking_check_in_date_utc @@ -1270,14 +1270,14 @@ models: description: | Date of the Check-in of the Booking. Cannot be null. - tests: + data_tests: - not_null - name: booking_check_out_date_utc data_type: date description: | Date of the Check-out of the Booking. - tests: + data_tests: - not_null - name: booking_number_of_nights @@ -1296,7 +1296,7 @@ models: description: | Specifies the New Dash Version in which these users were moved or joined. - tests: + data_tests: - not_null - name: user_in_new_dash_since_date_utc @@ -1350,7 +1350,7 @@ models: not necessarily mean that it won't be in the future. Similarly, if the booking is chargeable it does not necessarily mean that is actually charged. It cannot be null. - tests: + data_tests: - not_null - name: is_booking_cancelled @@ -1389,7 +1389,7 @@ models: additional metrics. The data is segmented by deal and time window for detailed analysis. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -1402,20 +1402,20 @@ models: description: | The last day of the month or yesterday for historic metrics. It's the same date as for KPIs related models. - tests: + data_tests: - not_null - name: id_deal data_type: character varying description: Id of the deal associated to the host. - tests: + data_tests: - not_null - name: time_window data_type: character varying description: | Identifier of the time window used for the aggregation of the metrics. - tests: + data_tests: - not_null - accepted_values: values: @@ -1445,14 +1445,14 @@ models: data_type: string description: | Main name for this ID deal. - tests: + data_tests: - not_null - name: has_active_pms data_type: boolean description: | Does the deal have an active associated PMS. - tests: + data_tests: - not_null - name: active_pms_list @@ -1503,7 +1503,7 @@ models: Total amount of bookings created by the deal in the time window. It can be null if no bookings were created. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1514,7 +1514,7 @@ models: Average amount of listings booked in month by the deal in the time window. It can be null if no listings were booked. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1555,7 +1555,7 @@ models: Total amount of payments in GBP made by the guest in the time window. It can be null if no payments were made by the guest. It can be negative. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1574,7 +1574,7 @@ models: Total amount of resolution payments made to the host in the time window. It can be null if no resolution payments were made by the host. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1609,7 +1609,7 @@ models: - name: id_verification data_type: text description: "unique Superhog generated id for this verification" - tests: + data_tests: - unique - not_null @@ -1622,7 +1622,7 @@ models: - name: id_user_partner data_type: text description: "unique Superhog generated id for partner" - tests: + data_tests: - not_null - name: id_accommodation @@ -1632,7 +1632,7 @@ models: - name: version data_type: text description: "value to identify if it is Guesty (V1) or E-deposit (V2)" - tests: + data_tests: - accepted_values: values: - V1 @@ -1641,7 +1641,7 @@ models: - name: verification_source data_type: text description: "source of the verification for the booking" - tests: + data_tests: - accepted_values: values: - Guesty @@ -1816,7 +1816,7 @@ models: - name: id_deal data_type: character varying description: "Unique ID for this deal." - tests: + data_tests: - unique - not_null @@ -1829,7 +1829,7 @@ models: description: "Count of distinct names the deal has in Core. It might be the case that a deal has ony NULL value for a name, so the count will be 0" - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1843,7 +1843,7 @@ models: description: "Count of distinct names the deal has in Hubspot. It might be the case that a deal has ony NULL value for a name, so the count will be 0" - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false @@ -1857,7 +1857,7 @@ models: description: "Count of distinct names the deal has in Xero. It might be the case that a deal has ony NULL value for a name, so the count will be 0" - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: false diff --git a/models/reporting/kpis/schema.yml b/models/reporting/kpis/schema.yml index 58f1461..3682d8e 100644 --- a/models/reporting/kpis/schema.yml +++ b/models/reporting/kpis/schema.yml @@ -15,7 +15,7 @@ models: - has_id_check, - main_billing_country_iso_3_per_deal. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date_day @@ -27,13 +27,13 @@ models: - name: date_day data_type: date description: "Date of when Guest Journeys have been completed." - tests: + data_tests: - not_null - name: date_week data_type: string description: "Week number of when Guest Journeys have been completed." - tests: + data_tests: - not_null - name: py_date_day @@ -45,7 +45,7 @@ models: - name: has_payment data_type: string description: Has there been any guest payments on the guest journey. - tests: + data_tests: - not_null - accepted_values: values: @@ -56,7 +56,7 @@ models: data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -67,7 +67,7 @@ models: data_type: string description: | Main billing country of the host. - tests: + data_tests: - not_null - name: created_guest_journeys_not_cancelled @@ -75,7 +75,7 @@ models: description: | Count of daily guest journeys created, excluding cancelled bookings, in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: created_guest_journeys_not_cancelled date_column: date_day @@ -85,7 +85,7 @@ models: description: | Count of daily guest journeys started, excluding cancelled bookings, in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: started_guest_journeys_not_cancelled date_column: date_day @@ -95,7 +95,7 @@ models: description: | Count of daily guest journeys completed, excluding cancelled bookings, in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: completed_guest_journeys_not_cancelled date_column: date_day @@ -105,7 +105,7 @@ models: description: | Count of daily guest journeys created in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: created_guest_journeys date_column: date_day @@ -115,7 +115,7 @@ models: description: | Count of daily guest journeys started in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: started_guest_journeys date_column: date_day @@ -125,7 +125,7 @@ models: description: | Count of daily guest journeys completed in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: completed_guest_journeys date_column: date_day @@ -135,7 +135,7 @@ models: description: | Count of daily guest journeys with CSAT (customer satisfaction score) in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: total_csat_score_count date_column: date_day @@ -150,7 +150,7 @@ models: description: | Sum of deposit fees paid by guests, without taxes, in GBP in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: deposit_fees_in_gbp date_column: date_day @@ -160,7 +160,7 @@ models: description: | Sum of waiver payments paid by guests, without taxes, in GBP in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: waiver_payments_in_gbp date_column: date_day @@ -170,7 +170,7 @@ models: description: | Sum of checkin cover fees paid by guests, without taxes, in GBP in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: checkin_cover_fees_in_gbp date_column: date_day @@ -180,7 +180,7 @@ models: description: | Sum of total payments paid by guests, without taxes, in GBP in a given date and per specified dimension. - tests: + data_tests: - kpis_daily_outlier_detector: column_name: total_guest_payments_in_gbp date_column: date_day @@ -263,7 +263,7 @@ models: of time granularity, dimension, dimension value and list of metrics with their value. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - date @@ -277,13 +277,13 @@ models: description: | The end date of the time range specified in the time_granularity for the dimension, dimension_value and metrics in this record. - tests: + data_tests: - not_null - name: time_granularity data_type: string description: The time dimension. - tests: + data_tests: - accepted_values: values: - Daily @@ -293,7 +293,7 @@ models: - name: dimension data_type: string description: The dimension or granularity of the metrics. - tests: + data_tests: - accepted_values: values: - "Global" @@ -308,7 +308,7 @@ models: - name: dimension_value data_type: string description: The value or segment available for the selected dimension. - tests: + data_tests: - not_null - name: created_services @@ -368,7 +368,7 @@ models: - name: has_payment data_type: string description: Has there been any guest payments on the guest journey. - tests: + data_tests: - not_null - accepted_values: values: @@ -379,7 +379,7 @@ models: data_type: string description: Does the verification in the guest journey includes Government Id Check for the bookings. - tests: + data_tests: - not_null - accepted_values: values: @@ -390,7 +390,7 @@ models: data_type: string description: | Main billing country of the host aggregated at Deal level. - tests: + data_tests: - not_null - name: timeframe @@ -398,7 +398,7 @@ models: description: | Timeframe considered for the aggregation, it could be Year-to-date, Month-to-date or Week-to-date - tests: + data_tests: - not_null - accepted_values: values: diff --git a/models/reporting/screen_and_protect/schema.yml b/models/reporting/screen_and_protect/schema.yml index 9979e50..9ce2f81 100644 --- a/models/reporting/screen_and_protect/schema.yml +++ b/models/reporting/screen_and_protect/schema.yml @@ -10,20 +10,20 @@ models: - name: id_verification data_type: text description: Unique identifier for the verification request. - tests: + data_tests: - unique - not_null - name: id_booking data_type: text description: Unique identifier for the booking associated with the verification. - tests: + data_tests: - not_null - name: id_user_partner data_type: text description: Identifier for the partner user initiating the verification. - tests: + data_tests: - not_null - name: id_accommodation @@ -34,13 +34,13 @@ models: data_type: boolean description: | Indicates if the booking is protected or not. - tests: + data_tests: - not_null - name: protection_type data_type: text description: Specific protection type for the request. - tests: + data_tests: - not_null - accepted_values: values: @@ -55,7 +55,7 @@ models: description: Field used for protection type "STANDALONE PROTECTION" to indicate the starting level of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100000 @@ -66,7 +66,7 @@ models: description: Field used for protection type "SCREEN & PROTECT", "BASIC PROTECTION" or "DAMAGE WAIVER" to show the basic amount of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100000 @@ -77,7 +77,7 @@ models: description: Field used for protection type "SCREEN & PROTECT", or "STANDALONE PROTECTION" to show the basic amount of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 50000000 @@ -90,7 +90,7 @@ models: - name: verification_status data_type: text description: Outcome of the verification process. - tests: + data_tests: - not_null - accepted_values: values: @@ -113,7 +113,7 @@ models: - name: watch_list data_type: text description: Indicates if the guest was flagged on a watchlist. - tests: + data_tests: - accepted_values: values: - "MATCH" @@ -138,13 +138,13 @@ models: - name: is_cancelled data_type: boolean description: Indicates if the booking was canceled. - tests: + data_tests: - not_null - name: cancelled_at_utc data_type: timestamp without time zone description: Timestamp when the booking was canceled. - tests: + data_tests: - not_null: where: is_cancelled = true @@ -207,44 +207,44 @@ models: - name: status_updated_at_utc data_type: timestamp without time zone description: Timestamp of the last status update for the verification. - tests: + data_tests: - not_null - name: status_updated_date_utc data_type: date description: Date of the last status update for the verification. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp without time zone description: Timestamp of the last update to the record. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: Date of the last update to the record. - tests: + data_tests: - not_null - name: creation_at_utc data_type: timestamp without time zone description: | Timestamp of when the reservation was created. - tests: + data_tests: - not_null - name: creation_date_utc data_type: date description: | Date of when the reservation was created. - tests: + data_tests: - not_null - name: cosmos_created_date_utc data_type: date description: | Date of when the verification request was created in Cosmos DB. - tests: + data_tests: - not_null diff --git a/models/reporting/xero/schema.yml b/models/reporting/xero/schema.yml index 7df3c2e..b36b7d6 100644 --- a/models/reporting/xero/schema.yml +++ b/models/reporting/xero/schema.yml @@ -795,7 +795,7 @@ models: - name: id_bank_transaction data_type: character varying description: Xero's unique identifier for the transaction. - tests: + data_tests: - not_null - unique @@ -841,7 +841,7 @@ models: negative, amounts we receive are positive. You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transactions - tests: + data_tests: - not_null - accepted_values: values: @@ -861,7 +861,7 @@ models: receiving transactions show as 1. This helps in converting the transaction amounts in the right sign, since Xero brings all amounts as positive by default. - tests: + data_tests: - not_null - accepted_values: values: @@ -876,7 +876,7 @@ models: Can be one of: AUTHORISED, DELETED. You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transaction-status-codes - tests: + data_tests: - not_null - accepted_values: values: @@ -900,7 +900,7 @@ models: description: | Total of bank transaction tax inclusive, in the currency the transaction is denominated in. - tests: + data_tests: - not_null - name: total_amount_in_gbp @@ -933,7 +933,7 @@ models: - name: transaction_currency_iso_4217 data_type: character varying description: The ISO 4217 code for the currency of the transaction. - tests: + data_tests: - not_null - length_between: min_length: 3 @@ -956,7 +956,7 @@ models: For example, if the transaction is 135 ZAR, and this rate is 0.0167, the transaction value in GBP is 2.25 (135ZAR * 0.0167GBP/ZAR = 2.25GBP). - tests: + data_tests: - not_negative - name: line_amount_tax_inclusiveness @@ -965,7 +965,7 @@ models: Indicates whether the amounts included in line items are tax inclusive (Inclusive), tax exclusive (Exclusive) or simply, there are no taxes on the invoice (NoTax). - tests: + data_tests: - accepted_values: values: - Inclusive @@ -975,7 +975,7 @@ models: - name: is_reconciled data_type: boolean description: A flag indicating if the transaction has been reconciled. - tests: + data_tests: - not_null - name: has_attachments @@ -1011,13 +1011,13 @@ models: - name: id_bank_transaction data_type: character varying description: Xero's unique identifier for the transaction. - tests: + data_tests: - not_null - name: id_line_item data_type: text description: Xero's unique identifier for the line item. - tests: + data_tests: - not_null - unique @@ -1121,7 +1121,7 @@ models: - name: id_line_item data_type: text description: Xero's unique identifier for the line item. - tests: + data_tests: - not_null - unique @@ -1156,7 +1156,7 @@ models: - name: id_line_item data_type: text description: "" - tests: + data_tests: - not_null - unique @@ -1168,7 +1168,7 @@ models: data_type: text description: | Indicates whether the record belongs in an invoice or a credit note. - tests: + data_tests: - not_null - accepted_values: values: @@ -1218,7 +1218,7 @@ models: - name: document_currency_iso_4217 data_type: character varying description: "" - tests: + data_tests: - not_null - length_between: min_length: 3 @@ -1231,7 +1231,7 @@ models: - name: id_document data_type: character varying description: "" - tests: + data_tests: - not_null - name: reference @@ -1253,7 +1253,7 @@ models: - name: document_type data_type: character varying description: "" - tests: + data_tests: - not_null - accepted_values: values: @@ -1269,14 +1269,14 @@ models: - name: exchange_rate_to_gbp data_type: numeric description: "" - tests: + data_tests: - not_null - not_negative - name: document_status data_type: character varying description: "" - tests: + data_tests: - not_null - accepted_values: values: @@ -1290,7 +1290,7 @@ models: - name: line_amount_tax_inclusiveness data_type: character varying description: "" - tests: + data_tests: - accepted_values: values: - Inclusive diff --git a/models/staging/athena/schema.yml b/models/staging/athena/schema.yml index 4d7bb9a..4949c24 100644 --- a/models/staging/athena/schema.yml +++ b/models/staging/athena/schema.yml @@ -12,21 +12,21 @@ models: - name: id_verification data_type: character varying description: "Unique id for the specific transaction." - tests: + data_tests: - unique - not_null - name: id_booking data_type: text description: "" - tests: + data_tests: - not_null: where: created_at_utc > '2024-04-01T00:00:00Z' and verification_status != 'InsufficientInformation' - name: id_user_partner data_type: text description: The unique ID of the partner calling the API. - tests: + data_tests: - not_null - name: id_accommodation @@ -38,7 +38,7 @@ models: description: | Indicates whether the verification is for V1 (Athena) or V2 (e-deposit). - tests: + data_tests: - not_null - accepted_values: values: @@ -51,7 +51,7 @@ models: of the user. Note that the Athena/e-deposit user also has a configured nightly fee. It's unclear at this point which one has priority for billing. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100 @@ -61,7 +61,7 @@ models: data_type: text description: | This field shows the outcome of the Verification itself. - tests: + data_tests: - not_null - accepted_values: values: @@ -85,7 +85,7 @@ models: description: | Null if the phone number shows no issues, otherwise it details the problems attached to the given phone number. - tests: + data_tests: - accepted_values: values: - "Phone number not reachable" @@ -95,7 +95,7 @@ models: - name: watch_list data_type: text description: "" - tests: + data_tests: - accepted_values: values: - "Match" @@ -119,7 +119,7 @@ models: Indicates if the booking has been cancelled or not. At the source, null and false values have the same meaning, so here we turn nulls into false to keep thing simple. - tests: + data_tests: - not_null - accepted_values: values: @@ -129,7 +129,7 @@ models: - name: cancelled_at_utc data_type: timestamp without time zone description: If the booking was cancelled, when did we learn about it. - tests: + data_tests: - not_null: where: is_cancelled = true @@ -207,7 +207,7 @@ models: description: | Timestamp of the last time the record was modified before screening happened. Only relevant for V1 records. - tests: + data_tests: - not_null: where: version = 'V1' @@ -216,7 +216,7 @@ models: description: | Date of the last time the record was modified before screening happened. Only relevant for V1 records. - tests: + data_tests: - not_null: where: version = 'V1' @@ -225,7 +225,7 @@ models: description: | Timestamp of the last edit of the record, as set by the Athena/e-deposit application. - tests: + data_tests: - not_null - name: updated_date_utc @@ -233,7 +233,7 @@ models: description: | Date of the last edit of the record, as set by the Athena/e-deposit application. - tests: + data_tests: - not_null - name: athena_creation_at_utc @@ -252,18 +252,18 @@ models: data_type: timestamp without time zone description: | The internal application timestamp of when this record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: timestamp without time zone description: | The internal application date of when this record was created. - tests: + data_tests: - not_null - name: cosmos_db_timestamp_utc data_type: timestamp with time zone description: The internal Cosmos DB timestamp of the last record update. - tests: + data_tests: - not_null diff --git a/models/staging/check_in_hero/schema.yml b/models/staging/check_in_hero/schema.yml index ea18942..ec6a631 100644 --- a/models/staging/check_in_hero/schema.yml +++ b/models/staging/check_in_hero/schema.yml @@ -9,26 +9,26 @@ models: - name: id_record data_type: text description: Unique identifier for the record. - tests: + data_tests: - unique - not_null - name: id_user_partner data_type: text description: Identifier for the partner user associated with the check-in. - tests: + data_tests: - not_null - name: id_reservation data_type: text description: Unique identifier for the reservation associated with the check-in. - tests: + data_tests: - not_null - name: id_accommodation data_type: text description: Unique identifier for the accommodation associated with the reservation. - tests: + data_tests: - not_null - name: guest_last_name @@ -54,7 +54,7 @@ models: - name: reservation_total_amount_in_local_currency data_type: numeric description: Total cost amount in guest currency for the reservation. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 strictly: true @@ -63,19 +63,19 @@ models: data_type: text description: | Currency ISO code used by guest for the reservation. - tests: + data_tests: - not_null - name: channel data_type: text description: Booking channel or source. - tests: + data_tests: - not_null - name: checkin_date_utc data_type: date description: Check-in date for the booking. - tests: + data_tests: - not_null - name: checkin_time_utc @@ -85,7 +85,7 @@ models: - name: checkout_date_utc data_type: date description: Check-out date for the booking. - tests: + data_tests: - not_null - name: listing_name @@ -119,35 +119,35 @@ models: - name: updated_at_utc data_type: timestamp without time zone description: Timestamp of the last update to the record. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: Date of the last update to the record. - tests: + data_tests: - not_null - name: cosmos_creation_at_utc data_type: timestamp without time zone description: Timestamp when the record was created in Cosmos DB. - tests: + data_tests: - not_null - name: cosmos_creation_date_utc data_type: date description: Date when the record was created in Cosmos DB. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: Date when the record was created. - tests: + data_tests: - not_null - name: cosmos_db_timestamp_utc data_type: timestamp with time zone description: Internal Cosmos DB timestamp of the last record update. - tests: + data_tests: - not_null diff --git a/models/staging/core/_core_sources.yml b/models/staging/core/_core_sources.yml index eef14dc..ef159ba 100644 --- a/models/staging/core/_core_sources.yml +++ b/models/staging/core/_core_sources.yml @@ -11,7 +11,7 @@ sources: data_type: character varying quote: True description: "UUID for the user." - tests: + data_tests: - unique - not_null - dbt_expectations.expect_column_values_to_match_regex: @@ -20,14 +20,14 @@ sources: data_type: bigint quote: True description: "WIP. Is this an increment unique ID?" - tests: + data_tests: - unique - not_null - name: Email data_type: character varying quote: True description: "Email for this user." - tests: + data_tests: - unique - not_null - name: Title @@ -39,20 +39,20 @@ sources: quote: True description: "The Hubspot Deal Id that this user account belongs to. Multiple users can all be part of one Deal." # This test can't be enforced yet due to some bad test data in the production database. Once that's deal with, this should be activated. - #tests: + #data_tests: # - dbt_expectations.expect_column_values_to_match_regex: # regex: "^[0-9]{10,11}$" - name: Deleted data_type: boolean quote: True description: "WIP. I'm guessing this signals that the user wanted to be deleted?" - tests: + data_tests: - not_null - name: JoinDate data_type: timestamp without time zone quote: True description: "Timestamp on which the user was created." - tests: + data_tests: - not_null - name: LastName data_type: character varying @@ -62,7 +62,7 @@ sources: data_type: character varying quote: True description: "" - tests: + data_tests: - not_null - name: FirstName data_type: character varying @@ -103,7 +103,7 @@ sources: A user can be created by another user. If this user has been created by another user, this is the UUID of the creator. Else, this is null. - tests: + data_tests: - dbt_expectations.expect_column_values_to_match_regex: regex: "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" row_condition: '"CreatedUserId" is not null' @@ -151,7 +151,7 @@ sources: data_type: boolean quote: True description: "" - tests: + data_tests: - not_null - name: _airbyte_raw_id data_type: character varying @@ -159,7 +159,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 diff --git a/models/staging/core/schema.yml b/models/staging/core/schema.yml index 7c57d11..45ecf3d 100644 --- a/models/staging/core/schema.yml +++ b/models/staging/core/schema.yml @@ -103,80 +103,80 @@ models: columns: - name: id_superhoguser description: "The primary key for this table" - tests: + data_tests: - unique - not_null - name: stg_core__accommodation columns: - name: id_accommodation - tests: + data_tests: - unique - not_null - name: stg_core__accommodation_to_user columns: - name: id_accommodation_to_user - tests: + data_tests: - unique - not_null - name: stg_core__verification_set columns: - name: id_verification_set - tests: + data_tests: - unique - not_null - name: stg_core__guest_satisfaction_responses columns: - name: id_verification_request - tests: + data_tests: - unique - not_null - name: stg_core__role columns: - name: id_role - tests: + data_tests: - unique - not_null - name: role_name - tests: + data_tests: - unique - not_null - name: stg_core__user_role columns: - name: id_role - tests: + data_tests: - not_null - name: id_user - tests: + data_tests: - not_null - name: stg_core__claim columns: - name: id_claim - tests: + data_tests: - unique - not_null - name: stg_core__user_product_bundle columns: - name: id_user_product_bundle - tests: + data_tests: - unique - not_null - name: stg_core__booking_to_product_bundle columns: - name: id_booking_to_product_bundle - tests: + data_tests: - unique - not_null - name: stg_core__accommodation_to_product_bundle columns: - name: id_accommodation_to_product_bundle - tests: + data_tests: - unique - not_null - name: stg_core__edeposit_user @@ -187,21 +187,21 @@ models: - name: id data_type: bigint description: "Record id for this table" - # tests: + # data_tests: # - unique # - not_null - name: id_user_partner data_type: character varying description: "Unique id for partner user" - # tests: + # data_tests: # - unique # - not_null - name: currency data_type: character varying description: "Three-letter ISO code assigned to the currency used by user." - # tests: + # data_tests: # - not_null # - dbt_expectations.expect_column_values_to_match_regex: # regex: "^[A-Z]{3}$" @@ -209,7 +209,7 @@ models: - name: nightly_fee data_type: numeric description: "Fee charged per night on booking" - # tests: + # data_tests: # - not_null # - dbt_expectations.expect_column_values_to_be_between: # min_value: 0 @@ -219,7 +219,7 @@ models: - name: cancellation_fee data_type: numeric description: "Fee charged per cancelled booking" - # tests: + # data_tests: # - not_null # - dbt_expectations.expect_column_values_to_be_between: # min_value: 0 @@ -229,7 +229,7 @@ models: - name: protection_lower_level data_type: numeric description: "Amount of protection given when verification is 'Passed'" - # tests: + # data_tests: # - not_null # - dbt_expectations.expect_column_values_to_be_between: # min_value: 0 @@ -238,7 +238,7 @@ models: - name: protection_upper_level data_type: numeric description: "Amount of protection given when verification is 'Flagged'" - # tests: + # data_tests: # - not_null # - dbt_expectations.expect_column_values_to_be_between: # min_value: 0 @@ -247,13 +247,13 @@ models: - name: created_at_utc data_type: timestamp without time zone description: "Timestamp of when user was created" - # tests: + # data_tests: # - not_null - name: updated_at_utc data_type: timestamp without time zone description: "Timestamp of when user was last updated" - # tests: + # data_tests: # - not_null - name: dwh_extracted_at_utc @@ -280,7 +280,7 @@ models: - name: id_payment_validation_set_to_currency data_type: bigint description: Record id for this table - tests: + data_tests: - unique - not_null @@ -390,7 +390,7 @@ models: just means they are indefinitely active until someone changes it. Plans can also have a planned end time which sits in the future. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: # The end timestamp should always be after the start timestamp column_A: end_at_utc @@ -407,7 +407,7 @@ models: - name: id_payaway_plan data_type: bigint description: The unique id for this plan. - tests: + data_tests: - unique - not_null @@ -415,14 +415,14 @@ models: data_type: bigint description: | The Superhog ID of the currency that this record applies to. - tests: + data_tests: - not_null - name: id_user_host data_type: character varying description: | The Superhog ID of the host user this record applies to. - tests: + data_tests: - not_null - name: start_at_utc @@ -430,7 +430,7 @@ models: description: | The point in time in which this plan became active. It can never be null. - tests: + data_tests: - not_null - name: end_at_utc @@ -445,7 +445,7 @@ models: data_type: boolean description: | Syntactic sugar for checking if the plan has a specified end date. - tests: + data_tests: - not_null - name: payaway_percentage @@ -465,7 +465,7 @@ models: Waiver Amount * payaway_percentage, payaway_minimum_commission_local_curr ) - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -479,7 +479,7 @@ models: the currency of the guest payment (so if this record is in dollars, it means it applies to guest payments made in dollars). We will never charge less than this. This can be 0. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -489,21 +489,21 @@ models: data_type: timestamp description: | Timestamp of when the pay away plan was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when the pay away plan to currency was last updated - tests: + data_tests: - not_null - name: dwh_extracted_at_utc data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__product_service @@ -516,14 +516,14 @@ models: data_type: integer description: | Identifier of the product service. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: product_service_name data_type: string description: | Name of the product service. Uniquely identifies the product service. - tests: + data_tests: - unique - not_null - name: product_service_display_name @@ -531,7 +531,7 @@ models: description: | A more readable way to display the product service. It's mainly product_service_name with spaces in between words. - tests: + data_tests: - unique - not_null - name: product_service_description @@ -553,7 +553,7 @@ models: Ideally, we should modelise the relation "this product bundle has these product services" with a dedicated model in DWH that duplicates the id_product_bundle as many times as id_product_service are applied, to ease up analytical needs. - tests: + data_tests: - not_null - unique - name: service_business_type @@ -561,7 +561,7 @@ models: description: | Specifies the business type of the service, in essence, whether it is a Screening service or a Deposit Management service. - tests: + data_tests: - not_null - accepted_values: values: @@ -573,14 +573,14 @@ models: description: | Flag that determines if the service is a default one (True) or an upgraded service (False). - tests: + data_tests: - not_null - name: dwh_extracted_at_utc data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__product_service_to_price @@ -595,7 +595,7 @@ models: also contains the history of previous, currently inactive, product services prices. Lastly, custom pricing per user is not possible. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: ends_at_utc column_B: starts_at_utc @@ -606,26 +606,26 @@ models: data_type: integer description: | Identifier of the product service to price. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_product_service data_type: integer description: | Identifier of the product service. - tests: + data_tests: - not_null - name: id_currency data_type: integer description: | Identifier of the currency. - tests: + data_tests: - not_null - name: payment_type data_type: string description: | Type of the payment. - tests: + data_tests: - not_null - accepted_values: values: @@ -637,7 +637,7 @@ models: Represents how the price value should be taken into account, either if the price is representing the total amount at booking level or it's a nightly fee. - tests: + data_tests: - not_null - accepted_values: values: @@ -647,7 +647,7 @@ models: data_type: string description: | Represents at which moment in time this service should be invoiced. - tests: + data_tests: - not_null - accepted_values: values: @@ -660,7 +660,7 @@ models: data_type: decimal description: | Price amount of a given product service in the currency stated in id_currency. - tests: + data_tests: - not_null - name: product_service_price_name data_type: string @@ -670,7 +670,7 @@ models: data_type: timestamp description: | Timestamp of when this product service to price starts to be active. - tests: + data_tests: - not_null - name: ends_at_utc data_type: timestamp @@ -701,14 +701,14 @@ models: data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__protection_plan description: | Contains all the protection plans, also referred to protection services, operated by Truvi (Superhog) in the scope of New Pricing. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: ends_at_utc column_B: starts_at_utc @@ -719,7 +719,7 @@ models: data_type: integer description: | Identifier of the product service to price. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: protection_name @@ -741,7 +741,7 @@ models: data_type: timestamp description: | Timestamp of when this protection plan starts to be active. - tests: + data_tests: - not_null - name: ends_at_utc data_type: timestamp @@ -773,13 +773,13 @@ models: description: | Flag that determines if the service is a default one (True) or an upgraded service (False). - tests: + data_tests: - not_null - name: dwh_extracted_at_utc data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__protection_plan_to_price @@ -795,7 +795,7 @@ models: also contains the history of previous, currently inactive, protection plan prices. Lastly, custom pricing per user is not allowed. - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: ends_at_utc column_B: starts_at_utc @@ -806,26 +806,26 @@ models: data_type: integer description: | Identifier of the protection plan to price. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_protection_plan data_type: integer description: | Identifier of the protection plan. - tests: + data_tests: - not_null - name: id_currency data_type: integer description: | Identifier of the currency. - tests: + data_tests: - not_null - name: payment_type data_type: string description: | Type of the payment. - tests: + data_tests: - not_null - accepted_values: values: @@ -837,7 +837,7 @@ models: Represents how the price value should be taken into account, either if the price is representing the total amount at booking level or it's a nightly fee. - tests: + data_tests: - not_null - accepted_values: values: @@ -847,7 +847,7 @@ models: data_type: string description: | Represents at which moment in time this service should be invoiced. - tests: + data_tests: - not_null - accepted_values: values: @@ -860,7 +860,7 @@ models: data_type: decimal description: | Price amount of a given protection plan in the currency stated in id_currency. - tests: + data_tests: - not_null - name: protection_plan_price_name data_type: string @@ -870,7 +870,7 @@ models: data_type: timestamp description: | Timestamp of when this protection plan to price starts to be active. - tests: + data_tests: - not_null - name: ends_at_utc data_type: timestamp @@ -901,7 +901,7 @@ models: data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__protection_plan_cover @@ -916,38 +916,38 @@ models: data_type: integer description: | Identifier of the protection plan cover. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_protection_plan data_type: integer description: | Identifier of the protection plan. - tests: + data_tests: - not_null - name: id_currency data_type: integer description: | Identifier of the currency. - tests: + data_tests: - not_null - name: baseline_protection_cover_local_curr data_type: decimal description: | Baseline cover amount of a given protection plan in the currency stated in id_currency. - tests: + data_tests: - not_null - name: lower_protection_cover_local_curr data_type: decimal description: | Lower cover amount of a given protection plan in the currency stated in id_currency. - tests: + data_tests: - not_null - name: maximum_protection_cover_local_curr data_type: decimal description: | Maximum cover amount of a given protection plan in the currency stated in id_currency. - tests: + data_tests: - not_null - name: protection_plan_cover_name data_type: string @@ -973,7 +973,7 @@ models: data_type: timestamp description: | Timestamp of when this data was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__booking_view @@ -986,14 +986,14 @@ models: data_type: integer description: | Identifier of the booking view. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_booking data_type: integer description: | Identifier of the booking. Acts as foreign key for the Booking table. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp @@ -1020,14 +1020,14 @@ models: data_type: integer description: | Identifier of the booking view to service. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: id_booking_view data_type: integer description: | Identifier of the booking view. Acts as the foreign key for the Booking View table. - tests: + data_tests: - not_null - name: id_verification data_type: integer @@ -1045,20 +1045,20 @@ models: data_type: string description: | Name of the service that applies to a certain Booking View. - tests: + data_tests: - not_null - name: service_protection_amount data_type: string description: | Amount protected, as a range. This amount can change depending on the applied service and the result of the service status. - tests: + data_tests: - not_null - name: service_status data_type: string description: | Status of the applied service on the Booking View. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp @@ -1091,7 +1091,7 @@ models: data_type: integer description: | Identifier of the Product Service Billing Item. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null @@ -1100,7 +1100,7 @@ models: description: | Identifier of the booking. Acts as foreign key for the Booking table. A Booking can have multiple Billing Items applied. - tests: + data_tests: - not_null - name: id_booking_state @@ -1108,7 +1108,7 @@ models: description: | Identifier of the booking state. Acts as foreign key for the Booking State table. - tests: + data_tests: - not_null - name: id_product_service_to_price @@ -1117,21 +1117,21 @@ models: Identifier of the product service to price. Acts as foreign key for the Product Service To Price table. Necessary to retrieve the user specs and the currency in which the Price (amount_local_curr) is applied. - tests: + data_tests: - not_null - name: chargeable_at_utc data_type: timestamp description: | Timestamp of when this Product Service Billing Item can be charged. - tests: + data_tests: - not_null - name: chargeable_date_utc data_type: date description: | Date of when this Product Service Billing Item can be charged. - tests: + data_tests: - not_null - name: amount_local_curr @@ -1139,35 +1139,35 @@ models: description: | Price of the Billing Item, in local currency. Could be positive or negative, depending on if the line aims to add or remove a previously created amount. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp description: | Timestamp of when this Product Service Billing Item record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this Product Service Billing Item record was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this Product Service Billing Item record was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this Product Service Billing Item record was last updated. - tests: + data_tests: - not_null - name: dwh_extracted_at_utc @@ -1189,7 +1189,7 @@ models: data_type: integer description: | Identifier of the Protection Plan Billing Item. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null @@ -1198,7 +1198,7 @@ models: description: | Identifier of the booking. Acts as foreign key for the Booking table. A Booking can have multiple Billing Items applied. - tests: + data_tests: - not_null - name: id_booking_state @@ -1206,7 +1206,7 @@ models: description: | Identifier of the booking state. Acts as foreign key for the Booking State table. - tests: + data_tests: - not_null - name: id_protection_plan_to_price @@ -1215,21 +1215,21 @@ models: Identifier of the protection plan to price. Acts as foreign key for the Protection Plan To Price table. Necessary to retrieve the user specs and the currency in which the Price (amount_local_curr) is applied. - tests: + data_tests: - not_null - name: chargeable_at_utc data_type: timestamp description: | Timestamp of when this Protection Plan Billing Item can be charged. - tests: + data_tests: - not_null - name: chargeable_date_utc data_type: date description: | Date of when this Protection Plan Billing Item can be charged. - tests: + data_tests: - not_null - name: amount_local_curr @@ -1237,35 +1237,35 @@ models: description: | Price of the Billing Item, in local currency. Could be positive or negative, depending on if the line aims to add or remove a previously created amount. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp description: | Timestamp of when this Protection Plan Billing Item record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this Protection Plan Billing Item record was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this Protection Plan Billing Item record was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this Protection Plan Billing Item record was last updated. - tests: + data_tests: - not_null - name: dwh_extracted_at_utc @@ -1283,7 +1283,7 @@ models: data_type: integer description: | Identifier of the Verification Request Feature Flag. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null @@ -1293,14 +1293,14 @@ models: Identifier of the Verification Request. Acts as foreign key to the Verification Request table. It can be duplicated across different Feature Flags - meaning the same verification request can be part of none, one, or several A/B tests. - tests: + data_tests: - not_null - name: feature_flag_name data_type: string description: | Name of the Feature Flag, or the Guest Journey A/B test. Cannot be null. - tests: + data_tests: - not_null - name: feature_flag_variation @@ -1321,28 +1321,28 @@ models: data_type: timestamp description: | Timestamp of when this Verification Request Feature Flag record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this Verification Request Feature Flag record was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this Verification Request Feature Flag record was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this Verification Request Feature Flag record was last updated. - tests: + data_tests: - not_null - name: dwh_extracted_at_utc @@ -1356,7 +1356,7 @@ models: It includes all users from all different API systems so the data contained in the json document differs between them." - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_apim_user @@ -1369,7 +1369,7 @@ models: key for this table. Not necessarily unique because the same user can exist in more than one API system. - tests: + data_tests: - not_null - name: id_apim_user_type @@ -1377,7 +1377,7 @@ models: description: | "id of the user type, works as a foreign key to the apim_user_type table" - tests: + data_tests: - not_null - name: json_document_user_data @@ -1389,35 +1389,35 @@ models: data_type: timestamp description: | Timestamp of when this user was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: date description: | Date of when this user was created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: | Timestamp of when this user was last updated. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: | Date of when this user was last updated. - tests: + data_tests: - not_null - name: dwh_extracted_at_utc data_type: timestamp description: | Timestamp of when this record was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__apim_user_type @@ -1427,27 +1427,27 @@ models: data_type: bigint description: | Unique identifier of the type of user. Acts as the primary key for this table. - tests: + data_tests: - unique - not_null - name: user_type_name data_type: character varying description: "Name of the user type" - tests: + data_tests: - unique - name: dwh_extracted_at_utc data_type: timestamp with time zone description: | Timestamp of when this record was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__basic_protection description: "Contains the basic protection fees and protection amounts for different protection options and currencies." - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: end_at_utc column_B: start_at_utc @@ -1457,7 +1457,7 @@ models: data_type: bigint description: "Unique identifier of the basic protection. Acts as the primary key for this table." - tests: + data_tests: - not_null - unique @@ -1465,7 +1465,7 @@ models: data_type: numeric description: "Nightly fee in local currency for long stay bookings. Bookings of more than 30 days are considered long." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1475,7 +1475,7 @@ models: - name: short_stay_fee_in_local_currency data_type: numeric description: "Nightly fee in local currency for short stay bookings" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1486,7 +1486,7 @@ models: data_type: bigint description: "Id of the currency, works as a foreign key to the currency table" - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -1495,7 +1495,7 @@ models: - name: protection_basic_amount_in_local_currency data_type: bigint description: "Amount in local currency of basic protection coverage" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1505,13 +1505,13 @@ models: - name: start_at_utc data_type: timestamp description: "Timestamp of when this basic protection record is active" - tests: + data_tests: - not_null - name: start_date_utc data_type: date description: "Date of when this basic protection record is active" - tests: + data_tests: - not_null - name: end_at_utc @@ -1530,13 +1530,13 @@ models: data_type: timestamp description: | Timestamp of when this record was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__damage_waiver description: "Contains the damage waiver fees and protection amounts for different protection options and currencies." - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: end_at_utc column_B: start_at_utc @@ -1546,14 +1546,14 @@ models: data_type: bigint description: "Unique identifier of the damage waiver. Acts as the primary key for this table." - tests: + data_tests: - not_null - unique - name: booking_fee_in_local_currency data_type: numeric description: "Nightly fee in local currency for bookings" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1564,7 +1564,7 @@ models: data_type: bigint description: "Id of the currency, works as a foreign key to the currency table" - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -1573,7 +1573,7 @@ models: - name: protection_basic_amount_in_local_currency data_type: bigint description: "Amount in local currency of basic protection coverage" - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1583,13 +1583,13 @@ models: - name: start_at_utc data_type: timestamp description: "Timestamp of when this basic protection record is active" - tests: + data_tests: - not_null - name: start_date_utc data_type: date description: "Date of when this basic protection record is active" - tests: + data_tests: - not_null - name: end_at_utc @@ -1608,13 +1608,13 @@ models: data_type: timestamp description: | Timestamp of when this record was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__screen_and_protect description: "Contains the screen and protect fees and protection amounts for different protection options and currencies." - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: end_at_utc column_B: start_at_utc @@ -1624,7 +1624,7 @@ models: data_type: bigint description: "Unique identifier of the Screen and Protect record. Acts as the primary key for this table." - tests: + data_tests: - not_null - unique @@ -1632,7 +1632,7 @@ models: data_type: numeric description: "Nightly fee in local currency for long stay bookings. Bookings of more than 30 days are considered long." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1642,7 +1642,7 @@ models: - name: short_stay_fee_in_local_currency data_type: numeric description: "Nightly fee in local currency for short stay bookings." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1653,7 +1653,7 @@ models: data_type: bigint description: "Id of the currency, works as a foreign key to the currency table." - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -1662,7 +1662,7 @@ models: - name: protection_basic_amount_in_local_currency data_type: bigint description: "Amount in local currency of basic protection coverage." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1672,7 +1672,7 @@ models: - name: protection_extended_amount_in_local_currency data_type: bigint description: "Amount in local currency of extended protection coverage." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1682,13 +1682,13 @@ models: - name: start_at_utc data_type: timestamp without time zone description: "Timestamp when this Screen and Protect record becomes active." - tests: + data_tests: - not_null - name: start_date_utc data_type: date description: "Date when this Screen and Protect record becomes active." - tests: + data_tests: - not_null - name: end_at_utc @@ -1705,13 +1705,13 @@ models: data_type: timestamp with time zone description: | Timestamp of when this record was extracted into DWH. - tests: + data_tests: - not_null - name: stg_core__standalone_protection description: "Contains the standalone protection fees and protection amounts for different protection options and currencies." - tests: + data_tests: - dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B: column_A: end_at_utc column_B: start_at_utc @@ -1721,7 +1721,7 @@ models: data_type: bigint description: "Unique identifier for the standalone protection record. Acts as the primary key for this table." - tests: + data_tests: - not_null - unique @@ -1729,7 +1729,7 @@ models: data_type: numeric description: "Nightly fee in local currency for long stay bookings. Bookings of more than 30 days are considered long." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1739,7 +1739,7 @@ models: - name: short_stay_fee_in_local_currency data_type: numeric description: "Nightly fee in local currency for short stay bookings." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1750,7 +1750,7 @@ models: data_type: bigint description: "Id of the currency, works as a foreign key to the currency table." - tests: + data_tests: - not_null - relationships: to: ref('stg_core__currency') @@ -1759,7 +1759,7 @@ models: - name: protection_starting_amount_in_local_currency data_type: bigint description: "Starting amount in local currency of protection coverage." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1769,7 +1769,7 @@ models: - name: protection_extended_amount_in_local_currency data_type: bigint description: "Extended amount in local currency of protection coverage." - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -1779,13 +1779,13 @@ models: - name: start_at_utc data_type: timestamp without time zone description: "Timestamp when this standalone protection record becomes active." - tests: + data_tests: - not_null - name: start_date_utc data_type: date description: "Date when this standalone protection record becomes active." - tests: + data_tests: - not_null - name: end_at_utc @@ -1801,7 +1801,7 @@ models: - name: dwh_extracted_at_utc data_type: timestamp with time zone description: "Timestamp of when this record was extracted into DWH." - tests: + data_tests: - not_null - name: stg_core__account_type @@ -1814,7 +1814,7 @@ models: description: | Unique identifier of the account type. Acts as the primary key for this table. - tests: + data_tests: - not_null - unique @@ -1823,7 +1823,7 @@ models: description: | Name of the account, in upper case, without spacing. Cannot be null. Must be unique. - tests: + data_tests: - not_null - unique @@ -1833,7 +1833,7 @@ models: A more nicer way to display the name of the account, better fit for reporting purposes. Cannot be null. Must be unique. - tests: + data_tests: - not_null - unique @@ -1841,5 +1841,5 @@ models: data_type: timestamp with time zone description: | Timestamp of when this record was extracted into DWH. - tests: + data_tests: - not_null diff --git a/models/staging/edeposit/schema.yml b/models/staging/edeposit/schema.yml index 1d56ff4..766247b 100644 --- a/models/staging/edeposit/schema.yml +++ b/models/staging/edeposit/schema.yml @@ -12,21 +12,21 @@ models: - name: id_verification data_type: character varying description: "Unique id for the specific transaction." - tests: + data_tests: - unique - not_null - name: id_booking data_type: text description: "" - tests: + data_tests: - not_null: where: created_at_utc > '2024-04-01T00:00:00Z' and verification_status != 'InsufficientInformation' - name: id_user_partner data_type: text description: The unique ID of the partner calling the API. - tests: + data_tests: - not_null - name: id_accommodation @@ -38,7 +38,7 @@ models: description: | Indicates whether the verification is for V1 (Athena) or V2 (e-deposit). - tests: + data_tests: - not_null - accepted_values: values: @@ -51,7 +51,7 @@ models: of the user. Note that the Athena/e-deposit user also has a configured nightly fee. It's unclear at this point which one has priority for billing. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100 @@ -61,7 +61,7 @@ models: data_type: text description: | This field shows the outcome of the Verification itself. - tests: + data_tests: - not_null - accepted_values: values: @@ -85,7 +85,7 @@ models: description: | Null if the phone number shows no issues, otherwise it details the problems attached to the given phone number. - tests: + data_tests: - accepted_values: values: - "Phone number not reachable" @@ -95,7 +95,7 @@ models: - name: watch_list data_type: text description: "" - tests: + data_tests: - accepted_values: values: - "Match" @@ -119,7 +119,7 @@ models: Indicates if the booking has been cancelled or not. At the source, null and false values have the same meaning, so here we turn nulls into false to keep thing simple. - tests: + data_tests: - not_null - accepted_values: values: @@ -129,7 +129,7 @@ models: - name: cancelled_at_utc data_type: timestamp without time zone description: If the booking was cancelled, when did we learn about it. - tests: + data_tests: - not_null: where: is_cancelled = true @@ -207,7 +207,7 @@ models: description: | Timestamp of the last time the record was modified before screening happened. Only relevant for V1 records. - tests: + data_tests: - not_null: where: version = 'V1' @@ -216,7 +216,7 @@ models: description: | Date of the last time the record was modified before screening happened. Only relevant for V1 records. - tests: + data_tests: - not_null: where: version = 'V1' @@ -225,7 +225,7 @@ models: description: | Timestamp of the last edit of the record, as set by the Athena/e-deposit application. - tests: + data_tests: - not_null - name: updated_date_utc @@ -233,7 +233,7 @@ models: description: | Date of the last edit of the record, as set by the Athena/e-deposit application. - tests: + data_tests: - not_null - name: athena_creation_at_utc @@ -252,18 +252,18 @@ models: data_type: timestamp without time zone description: | The internal application timestamp of when this record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: timestamp without time zone description: | The internal application date of when this record was created. - tests: + data_tests: - not_null - name: cosmos_db_timestamp_utc data_type: timestamp with time zone description: The internal Cosmos DB timestamp of the last record update. - tests: + data_tests: - not_null diff --git a/models/staging/hubspot/schema.yml b/models/staging/hubspot/schema.yml index c09226b..4324e96 100644 --- a/models/staging/hubspot/schema.yml +++ b/models/staging/hubspot/schema.yml @@ -7,7 +7,7 @@ models: - name: id_contact data_type: character varying description: "Unique id for each contact information." - tests: + data_tests: - unique - not_null @@ -22,37 +22,37 @@ models: - name: properties data_type: jsonb description: "Json with all contact information for this record." - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp with time zone description: "Timestamp of when this record was created." - tests: + data_tests: - not_null - name: created_date_utc data_type: timestamp without time zone description: "Date of when this record was created." - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp with time zone description: "Timestamp of when this record was last updated." - tests: + data_tests: - not_null - name: updated_date_utc data_type: timestamp without time zone description: "Date of when this record was last updated." - tests: + data_tests: - not_null - name: dwh_extracted_at_utc data_type: timestamp with time zone description: "Timestamp of when data was extracted to DWH." - tests: + data_tests: - not_null - name: stg_hubspot__form_submissions @@ -61,14 +61,14 @@ models: - name: id_form data_type: character varying description: "Unique id for each form submission." - tests: + data_tests: - not_null - unique - name: values data_type: jsonb description: "Json with value information for each form" - tests: + data_tests: - not_null - name: page_url @@ -78,31 +78,31 @@ models: - name: submitted_at_utc data_type: timestamp with time zone description: "Timestamp of when this record was created." - tests: + data_tests: - not_null - name: submitted_date_utc data_type: timestamp without time zone description: "Date of when this record was created." - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp with time zone description: "Timestamp of when this record was last updated." - tests: + data_tests: - not_null - name: updated_date_utc data_type: timestamp without time zone description: "Date of when this record was last updated." - tests: + data_tests: - not_null - name: dwh_extracted_at_utc data_type: timestamp with time zone description: "Timestamp of when data was extracted to DWH." - tests: + data_tests: - not_null - name: stg_hubspot__deal_pipelines @@ -115,33 +115,33 @@ models: - name: id_deal_pipeline data_type: character varying description: "Unique id for each pipeline." - tests: + data_tests: - not_null - unique - name: deal_pipeline_name data_type: character varying description: Name for the pipeline. - tests: + data_tests: - not_null - unique - name: is_active data_type: boolean description: Flag indicating if the pipeline is currently active. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp description: When was this record created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: When was this record last updated. - tests: + data_tests: - not_null - name: dwh_extracted_at_utc @@ -151,7 +151,7 @@ models: - name: stg_hubspot__deal_pipeline_stages description: | The different stages of deal pipelines. - tests: + data_tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: - id_deal_pipeline @@ -160,13 +160,13 @@ models: - name: id_deal_pipeline data_type: character varying description: ID of the deal pipeline this stage belongs to. - tests: + data_tests: - not_null - name: id_stage data_type: character varying description: Unique ID for this stage. - tests: + data_tests: - not_null - unique @@ -175,25 +175,25 @@ models: description: | The name of this stage. There might be name collisions across pipelines. - tests: + data_tests: - not_null - name: is_active data_type: boolean description: Flag indicating wheter the stage is currently active. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp description: When was this record created. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp description: When was this record last updated. - tests: + data_tests: - not_null - name: dwh_extracted_at_utc @@ -212,7 +212,7 @@ models: - name: id_deal data_type: character varying description: Unique ID for this deal. - tests: + data_tests: - unique - not_null diff --git a/models/staging/screen_and_protect/schema.yml b/models/staging/screen_and_protect/schema.yml index 76a1091..3d0bb50 100644 --- a/models/staging/screen_and_protect/schema.yml +++ b/models/staging/screen_and_protect/schema.yml @@ -10,20 +10,20 @@ models: - name: id_verification data_type: text description: Unique identifier for the verification request. - tests: + data_tests: - unique - not_null - name: id_booking data_type: text description: Unique identifier for the booking associated with the verification. - tests: + data_tests: - not_null - name: id_user_partner data_type: text description: Identifier for the partner user initiating the verification. - tests: + data_tests: - not_null - name: id_accommodation @@ -33,7 +33,7 @@ models: - name: protection_type data_type: text description: Specific protection type for the request. - tests: + data_tests: - not_null - accepted_values: values: @@ -48,7 +48,7 @@ models: description: Field used for protection type "STANDALONE PROTECTION" to indicate the starting amount of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100000 @@ -59,7 +59,7 @@ models: description: Field used for protection type "SCREEN & PROTECT", "BASIC PROTECTION" or "DAMAGE WAIVER" to show the basic amount of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 100000 @@ -70,7 +70,7 @@ models: description: Field used for protection type "SCREEN & PROTECT", or "STANDALONE PROTECTION" to show the basic amount of protection. In local currency. - tests: + data_tests: - dbt_expectations.expect_column_values_to_be_between: min_value: 0 max_value: 50000000 @@ -83,7 +83,7 @@ models: - name: verification_status data_type: text description: Outcome of the verification process. - tests: + data_tests: - not_null - accepted_values: values: @@ -106,7 +106,7 @@ models: - name: watch_list data_type: text description: Indicates if the guest was flagged on a watchlist. - tests: + data_tests: - accepted_values: values: - "MATCH" @@ -127,13 +127,13 @@ models: - name: is_cancelled data_type: boolean description: Indicates if the booking was canceled. - tests: + data_tests: - not_null - name: cancelled_at_utc data_type: timestamp without time zone description: Timestamp when the booking was canceled. - tests: + data_tests: - not_null: where: is_cancelled = true @@ -196,50 +196,50 @@ models: - name: status_updated_at_utc data_type: timestamp without time zone description: Timestamp of the last status update for the verification. - tests: + data_tests: - not_null - name: status_updated_date_utc data_type: date description: Date of the last status update for the verification. - tests: + data_tests: - not_null - name: updated_at_utc data_type: timestamp without time zone description: Timestamp of the last update to the record. - tests: + data_tests: - not_null - name: updated_date_utc data_type: date description: Date of the last update to the record. - tests: + data_tests: - not_null - name: creation_at_utc data_type: timestamp without time zone description: | Timestamp of when the reservation was created. - tests: + data_tests: - not_null - name: creation_date_utc data_type: date description: | Date of when the reservation was created. - tests: + data_tests: - not_null - name: cosmos_created_date_utc data_type: date description: | Date of when the verification request was created in Cosmos DB. - tests: + data_tests: - not_null - name: cosmos_db_timestamp_utc data_type: timestamp with time zone description: Internal Cosmos DB timestamp of the last record update. - tests: + data_tests: - not_null diff --git a/models/staging/screening/schema.yml b/models/staging/screening/schema.yml index 1aaa112..5959890 100644 --- a/models/staging/screening/schema.yml +++ b/models/staging/screening/schema.yml @@ -9,20 +9,20 @@ models: - name: id_verification data_type: character varying description: Unique id for the specific transaction. - tests: + data_tests: - unique - not_null - name: id_seon data_type: text description: The identifier in Seon. - tests: + data_tests: - not_null - name: id_user_partner data_type: text description: The unique ID of the partner calling the API. - tests: + data_tests: - not_null - name: id_watch_list @@ -33,7 +33,7 @@ models: data_type: text description: | noFlags if the email shows no issues, Flagged otherwise. - tests: + data_tests: - accepted_values: values: - "Flagged" @@ -43,7 +43,7 @@ models: data_type: text description: | noFlags if the phone number shows no issues, Flagged otherwise. - tests: + data_tests: - accepted_values: values: - "Flagged" @@ -53,7 +53,7 @@ models: data_type: text description: | noFlags if not in the watch list, Flagged otherwise. - tests: + data_tests: - accepted_values: values: - "Flagged" @@ -98,7 +98,7 @@ models: description: | Timestamp of the last edit of the record, as set by Screening API. - tests: + data_tests: - not_null - name: updated_date_utc @@ -106,25 +106,25 @@ models: description: | Date of the last edit of the record, as set by Screening API. - tests: + data_tests: - not_null - name: created_at_utc data_type: timestamp without time zone description: | The internal application timestamp of when this record was created. - tests: + data_tests: - not_null - name: created_date_utc data_type: timestamp without time zone description: | The internal application date of when this record was created. - tests: + data_tests: - not_null - name: cosmos_db_timestamp_utc data_type: timestamp with time zone description: The internal Cosmos DB timestamp of the last record update. - tests: + data_tests: - not_null diff --git a/models/staging/stripe/_stripe_sources.yml b/models/staging/stripe/_stripe_sources.yml index 46f0f19..3a5d88b 100644 --- a/models/staging/stripe/_stripe_sources.yml +++ b/models/staging/stripe/_stripe_sources.yml @@ -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 diff --git a/models/staging/xedotcom/schema.yml b/models/staging/xedotcom/schema.yml index 33785cd..4aa5478 100644 --- a/models/staging/xedotcom/schema.yml +++ b/models/staging/xedotcom/schema.yml @@ -13,18 +13,18 @@ models: description: A unique ID for the record, derived from concatenating the currencies and date. Currency order is relevant (EURUSD != USDEUR). data_type: text - tests: + data_tests: - not_null - unique - name: from_currency description: The source currency, represented as an ISO 4217 code. data_type: character - tests: + data_tests: - not_null - name: to_currency description: The target currency, represented as an ISO 4217 code. data_type: character - tests: + data_tests: - not_null - name: rate description: >- @@ -38,7 +38,7 @@ models: The rate can be smaller than one, but can't be negative. data_type: numeric - tests: + data_tests: - not_negative_or_zero - not_null - name: rate_date_utc diff --git a/models/staging/xero/schema.yml b/models/staging/xero/schema.yml index b02d4d7..088f881 100644 --- a/models/staging/xero/schema.yml +++ b/models/staging/xero/schema.yml @@ -10,7 +10,7 @@ models: - name: id_contact data_type: character varying description: Xero's unique identifier for the contact. - tests: + data_tests: - not_null - unique @@ -21,14 +21,14 @@ models: - name: contact_name data_type: character varying description: The name for the customer. - tests: + data_tests: - not_null - unique - name: is_customer data_type: boolean description: Flag that shows if the contact is a Superhog customer. - tests: + data_tests: - not_null - accepted_values: values: @@ -38,7 +38,7 @@ models: - name: is_supplier data_type: boolean description: Flag that shows if the contact is a Superhog supplier. - tests: + data_tests: - not_null - accepted_values: values: @@ -199,7 +199,7 @@ models: - name: id_invoice data_type: character varying description: Xero's unique identifier for the invoice. - tests: + data_tests: - not_null - unique @@ -216,7 +216,7 @@ models: description: | This field indicates whether the invoice is from Superhog towards a customer (value is "ACCREC") or from a supplier towards Superhog (value is "ACCPAY"). - tests: + data_tests: - not_null - accepted_values: values: @@ -226,31 +226,31 @@ models: - name: total_amount_local_curr data_type: numeric description: The total amount to be paid, in the currency the invoice is denominated in. - tests: + data_tests: - not_null - name: total_amount_wo_tax_local_curr data_type: numeric description: The total amount to be paid minus taxes, in the currency the invoice is denominated in. - tests: + data_tests: - not_null - name: total_tax_local_curr data_type: numeric description: The total tax, in the currency the invoice is denominated in. - tests: + data_tests: - not_null - name: total_due_local_curr data_type: numeric description: The total amount outstanding right now, in the currency the invoice is denominated in. - tests: + data_tests: - not_null - name: total_paid_local_curr data_type: numeric description: The total amount that has already been paid, in the currency the invoice is denominated in. - tests: + data_tests: - not_null - name: invoice_status @@ -261,7 +261,7 @@ models: Can be one of: PAID, VOIDED, DRAFT, DELETED, AUTHORISED, SUBMITTED. You can read more here: https://developer.xero.com/documentation/api/accounting/types#invoices - tests: + data_tests: - not_null - accepted_values: values: @@ -278,7 +278,7 @@ models: The contact related to this invoice. The customer if it's an Accounts Receivables one, the supplier if it's an Accounts Payables one. - tests: + data_tests: - not_null - name: invoice_due_date_utc @@ -297,7 +297,7 @@ models: - name: line_items data_type: jsonb description: An array with all the line items and their details. - tests: + data_tests: - not_null - name: reference @@ -321,7 +321,7 @@ models: - name: invoice_currency_iso_4217 data_type: character varying description: The ISO 4217 code for the currency which this invoice uses as unit of account. - tests: + data_tests: - not_null - length_between: min_length: 3 @@ -337,7 +337,7 @@ models: For example, if the invoice is 135 ZAR, and this rate is 0.0167, the invoice value in GBP is 2.25 (135ZAR * 0.0167GBP/ZAR = 2.25GBP). - tests: + data_tests: - not_null - not_negative @@ -399,7 +399,7 @@ models: Indicates whether the amounts included in line items are tax inclusive (Inclusive), tax exclusive (Exclusive) or simply, there are no taxes on the invoice (NoTax). - tests: + data_tests: - accepted_values: values: - Inclusive @@ -428,7 +428,7 @@ models: - name: id_credit_note data_type: character varying description: Xero's unique identifier for the credit note. - tests: + data_tests: - not_null - unique @@ -451,7 +451,7 @@ models: - name: credit_note_type data_type: character varying description: The type of the credit note (e.g., ACCRECCREDIT or ACCPAYCREDIT). - tests: + data_tests: - not_null - accepted_values: values: @@ -468,32 +468,32 @@ models: The implied exchange rate between the credit note currency and GBP. This is the XXX to GBP rate, indicating how many GBP one unit of XXX is worth. - tests: + data_tests: - not_null - not_negative - name: total_amount_local_curr data_type: numeric description: The total amount of the credit note in the local currency. - tests: + data_tests: - not_null - name: subtotal_local_curr data_type: numeric description: The subtotal of the credit note in the local currency, before tax. - tests: + data_tests: - not_null - name: total_tax_local_curr data_type: numeric description: The total tax amount of the credit note in the local currency. - tests: + data_tests: - not_null - name: remaining_credit_local_curr data_type: numeric description: The remaining credit amount in the local currency. - tests: + data_tests: - not_null - name: applied_amount @@ -508,7 +508,7 @@ models: Can be one of: PAID, VOIDED, DRAFT, DELETED, AUTHORISED, SUBMITTED. You can read more here: https://developer.xero.com/documentation/api/accounting/types#invoices - tests: + data_tests: - not_null - accepted_values: values: @@ -522,7 +522,7 @@ models: - name: full_contact_details data_type: jsonb description: The full contact details related to the credit note. - tests: + data_tests: - not_null - name: credit_note_due_date @@ -532,7 +532,7 @@ models: - name: line_items data_type: jsonb description: An array of line items associated with the credit note. - tests: + data_tests: - not_null - name: date_string @@ -573,7 +573,7 @@ models: Indicates whether the amounts included in line items are tax inclusive (Inclusive), tax exclusive (Exclusive) or simply, there are no taxes on the credit note (NoTax). - tests: + data_tests: - accepted_values: values: - Inclusive @@ -597,7 +597,7 @@ models: - name: id_bank_transaction data_type: character varying description: Xero's unique identifier for the transaction. - tests: + data_tests: - not_null - unique @@ -633,7 +633,7 @@ models: negative, amounts we receive are positive. You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transactions - tests: + data_tests: - not_null - accepted_values: values: @@ -653,7 +653,7 @@ models: receiving transactions show as 1. This helps in converting the transaction amounts in the right sign, since Xero brings all amounts as positive by default. - tests: + data_tests: - not_null - accepted_values: values: @@ -668,7 +668,7 @@ models: Can be one of: AUTHORISED, DELETED. You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transaction-status-codes - tests: + data_tests: - not_null - accepted_values: values: @@ -688,7 +688,7 @@ models: description: | Total of bank transaction tax inclusive, in the currency the transaction is denominated in. - tests: + data_tests: - not_null - name: total_amount_wo_tax_local_curr @@ -706,7 +706,7 @@ models: - name: transaction_currency_iso_4217 data_type: character varying description: The ISO 4217 code for the currency of the transaction. - tests: + data_tests: - not_null - length_between: min_length: 3 @@ -729,7 +729,7 @@ models: For example, if the transaction is 135 ZAR, and this rate is 0.0167, the transaction value in GBP is 2.25 (135ZAR * 0.0167GBP/ZAR = 2.25GBP). - tests: + data_tests: - not_negative - name: line_amount_tax_inclusiveness @@ -738,7 +738,7 @@ models: Indicates whether the amounts included in line items are tax inclusive (Inclusive), tax exclusive (Exclusive) or simply, there are no taxes on the invoice (NoTax). - tests: + data_tests: - accepted_values: values: - Inclusive @@ -755,19 +755,19 @@ models: - name: line_items data_type: jsonb description: An array with all the line items and their details. - tests: + data_tests: - not_null - name: bank_account data_type: jsonb description: An array with the details of the related bank account. - tests: + data_tests: - not_null - name: is_reconciled data_type: boolean description: A flag indicating if the transaction has been reconciled. - tests: + data_tests: - not_null - name: has_attachments @@ -801,11 +801,11 @@ models: - name: id_account data_type: character varying description: Xero's unique identifier for the account. - tests: + data_tests: - not_null - unique - name: account_code data_type: character varying description: Human readable account code. - tests: + data_tests: - unique diff --git a/seeds/schema.yml b/seeds/schema.yml index 176401f..646ddd8 100644 --- a/seeds/schema.yml +++ b/seeds/schema.yml @@ -13,14 +13,14 @@ seeds: - name: iso_4217_code data_type: character varying description: The 3 character ISO 4217 code for this currency, in Uppercase. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_match_regex: regex: "^[A-Z]{3}$" - name: iso_4217_numeric_code data_type: character varying description: The 3 digit ISO 4217 numeric code for this currency. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_match_regex: regex: "^[0-9]{3}$" @@ -35,7 +35,7 @@ seeds: To convert from normal unit (Dollar) to smallest unit (Cent), multiply by `10^decimal_positions`. To convert from smallest unit (Cent) to normal unit (Dollar), divide by `10^decimal_positions`. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0 @@ -65,7 +65,7 @@ seeds: data_type: character varying description: The name of the country. - tests: + data_tests: - not_null - unique - name: alpha_2 @@ -73,7 +73,7 @@ seeds: description: | The two characters ISO 3166-1 Alpha-2 code for the country. - tests: + data_tests: - not_null - unique - dbt_expectations.expect_column_values_to_match_regex: @@ -83,7 +83,7 @@ seeds: description: | The three characters ISO 3166-1 Alpha-3 code for the country. - tests: + data_tests: - not_null - unique - dbt_expectations.expect_column_values_to_match_regex: @@ -93,7 +93,7 @@ seeds: description: | The three digit ISO 3166-1 Numeric code for the country. - tests: + data_tests: - not_null - unique - dbt_expectations.expect_column_values_to_match_regex: @@ -105,7 +105,7 @@ seeds: of 0% does not necessarily mean that the country doesn't have VAT, but rather that we don't need to charge it to guests from that country. - tests: + data_tests: - not_null - dbt_expectations.expect_column_values_to_be_between: min_value: 0