diff --git a/connectors/source_recurly/integration_tests/dbt_project.yml b/connectors/source_recurly/integration_tests/dbt_project.yml index 9580e362..8f10959d 100644 --- a/connectors/source_recurly/integration_tests/dbt_project.yml +++ b/connectors/source_recurly/integration_tests/dbt_project.yml @@ -50,19 +50,13 @@ vars: recurly_account_identifier: "accounts" recurly_account_note_identifier: "account_notes" recurly_account_coupon_redemption_identifier: "account_coupon_redemptions" - recurly_add_on_identifier: "add_ons" - recurly_billing_info_identifier: "billing_info" + recurly_billing_info_identifier: "billing_infos" recurly_coupon_redemption_identifier: "account_coupon_redemptions" recurly_coupon_identifier: "coupons" recurly_credit_payment_identifier: "credit_payments" - recurly_export_date_identifier: "export_dates" recurly_invoice_history_identifier: "invoices" recurly_line_item_identifier: "line_items" - recurly_measured_unit_identifier: "measured_units" recurly_plan_identifier: "plans" - recurly_shipping_address_identifier: "shipping_addresses" - recurly_shipping_method_identifier: "shipping_methods" recurly_subscription_identifier: "subscriptions" recurly_subscription_change_identifier: "subscriptions" recurly_transaction_identifier: "transactions" - recurly_unique_coupon_identifier: "unique_coupons" diff --git a/connectors/source_recurly/models/fivetran_converter/billing_info_history.sql b/connectors/source_recurly/models/fivetran_converter/billing_info_history.sql index 009e015e..bceadf07 100644 --- a/connectors/source_recurly/models/fivetran_converter/billing_info_history.sql +++ b/connectors/source_recurly/models/fivetran_converter/billing_info_history.sql @@ -3,17 +3,17 @@ WITH tmp AS ( SELECT id AS billing_id, - cast(updated_at AS {{ dbt.type_timestamp() }}) AS updated_at, + NULL AS updated_at, account_id, - NULL AS billing_city, - NULL AS billing_country, - NULL AS billing_phone, - NULL AS billing_postal_code, - NULL AS billing_region, - NULL AS billing_street_1, - NULL AS billing_street_2, + city AS billing_city, + country AS billing_country, + phone AS billing_phone, + zip AS billing_postal_code, + state AS billing_region, + address1 AS billing_street_1, + address2 AS billing_street_2, company, - cast(created_at AS {{ dbt.type_timestamp() }}) AS created_at, + NULL AS created_at, first_name, NULL AS is_valid, last_name, @@ -22,7 +22,8 @@ NULL AS updated_by_country, NULL AS updated_by_ip, vat_number, - ROW_NUMBER() OVER (PARTITION BY id ORDER BY updated_at DESC) = 1 AS is_most_recent_record + ROW_NUMBER() OVER (PARTITION BY id DESC) = 1 AS is_most_recent_record, + NULL AS fraud_risk_rules_triggered FROM {{ source('source_recurly', 'billing_infos') }} ) @@ -34,17 +35,17 @@ WITH tmp AS ( SELECT id AS billing_id, - cast(updated_at AS {{ dbt.type_timestamp() }}) AS updated_at, + NULL AS updated_at, account_id, - NULL AS billing_city, - NULL AS billing_country, - NULL AS billing_phone, - NULL AS billing_postal_code, - NULL AS billing_region, - NULL AS billing_street_1, - NULL AS billing_street_2, + city AS billing_city, + country AS billing_country, + phone AS billing_phone, + zip AS billing_postal_code, + state AS billing_region, + address1 AS billing_street_1, + address2 AS billing_street_2, company, - cast(created_at AS {{ dbt.type_timestamp() }}) AS created_at, + NULL AS created_at, first_name, NULL AS is_valid, last_name, @@ -53,7 +54,8 @@ NULL AS updated_by_country, NULL AS updated_by_ip, vat_number, - ROW_NUMBER() OVER (PARTITION BY id ORDER BY updated_at DESC) = 1 AS is_most_recent_record + ROW_NUMBER() OVER (PARTITION BY id DESC) = 1 AS is_most_recent_record, + NULL AS fraud_risk_rules_triggered FROM {{ source('source_recurly', 'billing_infos') }} ) @@ -65,17 +67,17 @@ WITH tmp AS ( SELECT id AS billing_id, - cast(updated_at AS {{ dbt.type_timestamp() }}) AS updated_at, + NULL AS updated_at, account_id, - NULL AS billing_city, - NULL AS billing_country, - NULL AS billing_phone, - NULL AS billing_postal_code, - NULL AS billing_region, - NULL AS billing_street_1, - NULL AS billing_street_2, + city AS billing_city, + country AS billing_country, + phone AS billing_phone, + zip AS billing_postal_code, + state AS billing_region, + address1 AS billing_street_1, + address2 AS billing_street_2, company, - cast(created_at AS {{ dbt.type_timestamp() }}) AS created_at, + NULL AS created_at, first_name, NULL AS is_valid, last_name, @@ -84,7 +86,8 @@ NULL AS updated_by_country, NULL AS updated_by_ip, vat_number, - ROW_NUMBER() OVER (PARTITION BY id ORDER BY updated_at DESC) = 1 AS is_most_recent_record + ROW_NUMBER() OVER (PARTITION BY id DESC) = 1 AS is_most_recent_record, + NULL AS fraud_risk_rules_triggered FROM {{ source('source_recurly', 'billing_infos') }} ) diff --git a/connectors/source_recurly/models/source/billing_info.yaml b/connectors/source_recurly/models/source/billing_infos.yaml similarity index 100% rename from connectors/source_recurly/models/source/billing_info.yaml rename to connectors/source_recurly/models/source/billing_infos.yaml