Updated exposure
This commit is contained in:
parent
b2e3355612
commit
ce63d90a3f
4 changed files with 3 additions and 362 deletions
|
|
@ -197,7 +197,7 @@ exposures:
|
|||
label: Resolutions Host Payments
|
||||
type: dashboard
|
||||
maturity: high
|
||||
url: https://app.powerbi.com/Redirect?action=OpenReport&appId=4a019abb-880f-4184-adc9-440ebd950e00&reportObjectId=86abbd2f-bfa5-4a51-adf5-4c7a3be9de07&ctid=862842df-2998-4826-bea9-b726bc01d3a7&reportPage=ReportSectionddc493aece54c925670a&pbi_source=appShareLink&portalSessionId=0d09c72c-773d-47ee-9fc5-aeb0727359d4
|
||||
url: https://app.powerbi.com/groups/me/apps/4a019abb-880f-4184-adc9-440ebd950e00/reports/86abbd2f-bfa5-4a51-adf5-4c7a3be9de07/ReportSectionddc493aece54c925670a?ctid=862842df-2998-4826-bea9-b726bc01d3a7&experience=power-bi
|
||||
description: |
|
||||
A PBI report that shows bank transaction payments that have been made
|
||||
listed in the Resolutions Host Payments account in our accounting books.
|
||||
|
|
@ -205,7 +205,7 @@ exposures:
|
|||
value have happened over time.
|
||||
|
||||
depends_on:
|
||||
- ref('xero__bank_transaction_denom_mart')
|
||||
- ref('xero__host_resolutions_payments')
|
||||
|
||||
owner:
|
||||
name: Pablo Martin
|
||||
|
|
|
|||
|
|
@ -849,222 +849,7 @@ models:
|
|||
fees. It might be the case that net fees are negative in some month,
|
||||
if it happens to be that we have given back to customers more than we
|
||||
have invoiced them.
|
||||
- name: xero__bank_transactions
|
||||
description: |
|
||||
Bank transactions that have happened in any of our bank accounts.
|
||||
|
||||
You can read more here: https://developer.xero.com/documentation/api/accounting/banktransactions
|
||||
|
||||
columns:
|
||||
- name: id_bank_transaction
|
||||
data_type: character varying
|
||||
description: Xero's unique identifier for the transaction.
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
- name: id_prepayment
|
||||
data_type: character varying
|
||||
description: |
|
||||
Xero generated identifier for a Prepayment (unique within
|
||||
organisations). This will be returned on BankTransactions with a Type
|
||||
of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT.
|
||||
|
||||
- name: id_overpayment
|
||||
data_type: character varying
|
||||
description: Xero generated identifier for an Overpayment (unique within
|
||||
organisations). This will be returned on BankTransactions with a Type
|
||||
of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT.
|
||||
|
||||
- name: id_contact
|
||||
data_type: text
|
||||
description: |
|
||||
Xero's unique id for the contact related to this transaction.
|
||||
|
||||
- name: id_bank_account
|
||||
data_type: text
|
||||
description: |
|
||||
Xero's unique id for the bank account related to this transaction.
|
||||
|
||||
- name: reference
|
||||
data_type: character varying
|
||||
description: |
|
||||
Reference for the transaction. Only supported for SPEND and RECEIVE
|
||||
transactions.
|
||||
|
||||
- name: transaction_type
|
||||
data_type: character varying
|
||||
description: |
|
||||
What kind of transaction is this record.
|
||||
|
||||
Can be one of: RECEIVE, RECEIVE-OVERPAYMENT, RECEIVE-PREPAYMENT,
|
||||
SPEND, SPEND-OVERPAYMENT, SPEND-PREPAYMENT, RECEIVE-TRANSFER,
|
||||
SPEND-TRANSFER
|
||||
|
||||
The type will affect the sign of all amounts. Amounts we send are
|
||||
negative, amounts we receive are positive.
|
||||
|
||||
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transactions
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- RECEIVE
|
||||
- RECEIVE-OVERPAYMENT
|
||||
- RECEIVE-PREPAYMENT
|
||||
- SPEND
|
||||
- SPEND-OVERPAYMENT
|
||||
- SPEND-PREPAYMENT
|
||||
- RECEIVE-TRANSFER
|
||||
- SPEND-TRANSFER
|
||||
|
||||
- name: transaction_sign
|
||||
data_type: numeric
|
||||
description: |
|
||||
The sign for the transactions. Spending transactions show as -1,
|
||||
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.
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- 1
|
||||
- -1
|
||||
|
||||
- name: transaction_status
|
||||
data_type: character varying
|
||||
description: |
|
||||
The status of this transaction.
|
||||
|
||||
Can be one of: AUTHORISED, DELETED.
|
||||
|
||||
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transaction-status-codes
|
||||
data_tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- AUTHORISED
|
||||
- DELETED
|
||||
|
||||
- name: transaction_at_utc
|
||||
data_type: timestamp with time zone
|
||||
description: When did the transaction happen.
|
||||
|
||||
- name: transaction_date_utc
|
||||
data_type: date
|
||||
description: The date on which the transaction happened.
|
||||
|
||||
- name: date_string
|
||||
data_type: timestamp with time zone
|
||||
description: When did the transaction happened, as a string.
|
||||
|
||||
- name: total_amount_local_curr
|
||||
data_type: numeric
|
||||
description: |
|
||||
Total of bank transaction tax inclusive, in the currency the
|
||||
transaction is denominated in.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: total_amount_in_gbp
|
||||
data_type: numeric
|
||||
description: |
|
||||
Total of bank transaction tax inclusive, presented in GBP.
|
||||
|
||||
- name: total_amount_wo_tax_local_curr
|
||||
data_type: numeric
|
||||
description: |
|
||||
Total of bank transaction excluding taxes, in the currency the
|
||||
transaction is denominated in.
|
||||
|
||||
- name: total_amount_wo_tax_in_gbp
|
||||
data_type: numeric
|
||||
description: |
|
||||
Total of bank transaction excluding taxes, presented in GBP.
|
||||
|
||||
- name: total_tax_local_curr
|
||||
data_type: numeric
|
||||
description: |
|
||||
Total tax on bank transaction, in the currency the transaction is
|
||||
denominated in.
|
||||
|
||||
- name: total_tax_in_gbp
|
||||
data_type: numeric
|
||||
description: |
|
||||
Total tax on bank transaction, presented in GBP.
|
||||
|
||||
- name: transaction_currency_iso_4217
|
||||
data_type: character varying
|
||||
description: The ISO 4217 code for the currency of the transaction.
|
||||
data_tests:
|
||||
- not_null
|
||||
- length_between:
|
||||
min_length: 3
|
||||
max_length: 3
|
||||
|
||||
- name: exchange_rate_to_gbp
|
||||
data_type: numeric
|
||||
description: |
|
||||
|
||||
ATTENTION! unlike in many other Xero entities, here this field is not
|
||||
completed by Xero always. It has been complemented with the general
|
||||
rates data used in the DWH. Xero's rates are preferent, so DWH rates
|
||||
will only be used where Xero didn't provide a rate.
|
||||
|
||||
The implied exchange rate between the transaction currency and GBP.
|
||||
|
||||
This is the XXX to GBP rate. So the number represented in this field
|
||||
is the units of currency GBP that 1 unit of XXX buys you.
|
||||
|
||||
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).
|
||||
data_tests:
|
||||
- not_negative
|
||||
|
||||
- name: line_amount_tax_inclusiveness
|
||||
data_type: character varying
|
||||
description: |
|
||||
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).
|
||||
data_tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- Inclusive
|
||||
- Exclusive
|
||||
- NoTax
|
||||
|
||||
- name: is_reconciled
|
||||
data_type: boolean
|
||||
description: A flag indicating if the transaction has been reconciled.
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: has_attachments
|
||||
data_type: boolean
|
||||
description: ""
|
||||
|
||||
- name: url
|
||||
data_type: character varying
|
||||
description: ""
|
||||
|
||||
- name: external_link_provider_name
|
||||
data_type: character varying
|
||||
description: ""
|
||||
|
||||
- name: updated_at_utc
|
||||
data_type: timestamp with time zone
|
||||
description: ""
|
||||
|
||||
- name: updated_date_utc
|
||||
data_type: date
|
||||
description: ""
|
||||
|
||||
- name: dwh_extracted_at_utc
|
||||
data_type: timestamp with time zone
|
||||
description: ""
|
||||
|
||||
- name: xero__bank_transaction_line_items
|
||||
description: |
|
||||
Line item level data for our Bank Transactions.
|
||||
|
|
@ -1169,25 +954,6 @@ models:
|
|||
The transaction currency is defined at the Bank Transaction level, and
|
||||
the values you see in this field should always be the same as the
|
||||
currency of the Bank Transaction this line item belongs to.
|
||||
- name: xero__bank_transaction_denom_mart
|
||||
description: |
|
||||
This model is a denormalized mart, which only exists for presentation
|
||||
purposes in a PBI report.
|
||||
|
||||
The data is the same that lives in `xero__bank_transaction_line_items`,
|
||||
`xero__bank_transactions` and `xero__contacts`.
|
||||
|
||||
The granularity is at line item level, so be careful when doing
|
||||
aggregations. Most aggregations on data on the transaction or contact
|
||||
level will be wrong due to duplicates.
|
||||
|
||||
columns:
|
||||
- name: id_line_item
|
||||
data_type: text
|
||||
description: Xero's unique identifier for the line item.
|
||||
data_tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
- name: xero__sales_denom_mart
|
||||
description: |
|
||||
|
|
|
|||
|
|
@ -1,91 +0,0 @@
|
|||
with
|
||||
xero__bank_transaction_line_items as (
|
||||
select * from {{ ref("xero__bank_transaction_line_items") }}
|
||||
),
|
||||
xero__bank_transactions as (select * from {{ ref("xero__bank_transactions") }}),
|
||||
xero__contacts as (select * from {{ ref("xero__contacts") }})
|
||||
select
|
||||
|
||||
btli.id_bank_transaction,
|
||||
btli.id_line_item,
|
||||
btli.line_description,
|
||||
btli.id_account,
|
||||
btli.account_code,
|
||||
btli.account_name,
|
||||
btli.item_code,
|
||||
btli.quantity,
|
||||
btli.unit_amount,
|
||||
btli.line_amount_local_curr,
|
||||
btli.line_amount_in_gbp,
|
||||
btli.line_amount_wo_taxes_local_curr,
|
||||
btli.line_amount_wo_taxes_in_gbp,
|
||||
btli.tax_amount_local_curr,
|
||||
btli.tax_amount_in_gbp,
|
||||
btli.tax_type,
|
||||
btli.transaction_currency_iso_4217,
|
||||
|
||||
bt.id_prepayment,
|
||||
bt.id_overpayment,
|
||||
bt.id_contact,
|
||||
bt.id_bank_account,
|
||||
bt.reference,
|
||||
bt.transaction_type,
|
||||
bt.transaction_sign,
|
||||
bt.transaction_status,
|
||||
bt.transaction_at_utc,
|
||||
bt.transaction_date_utc,
|
||||
bt.date_string,
|
||||
bt.total_amount_local_curr,
|
||||
bt.total_amount_in_gbp,
|
||||
bt.total_amount_wo_tax_local_curr,
|
||||
bt.total_amount_wo_tax_in_gbp,
|
||||
bt.total_tax_local_curr,
|
||||
bt.total_tax_in_gbp,
|
||||
bt.exchange_rate_to_gbp,
|
||||
bt.line_amount_tax_inclusiveness,
|
||||
bt.is_reconciled,
|
||||
bt.has_attachments,
|
||||
bt.url,
|
||||
bt.external_link_provider_name,
|
||||
|
||||
c.account_number,
|
||||
c.id_deal,
|
||||
c.contact_name,
|
||||
c.is_customer,
|
||||
c.is_supplier,
|
||||
c.tax_number,
|
||||
c.contact_first_name,
|
||||
c.contact_last_name,
|
||||
c.phones,
|
||||
c.website,
|
||||
c.balances,
|
||||
c.discount,
|
||||
c.addresses,
|
||||
c.attachments,
|
||||
c.email_addresses,
|
||||
c.payment_terms,
|
||||
c.batch_payments,
|
||||
c.branding_theme,
|
||||
c.contact_groups,
|
||||
c.contact_number,
|
||||
c.contact_status,
|
||||
c.skyper_user_name,
|
||||
c.contact_persons,
|
||||
c.xero_network_key,
|
||||
c.default_currency_iso_4217,
|
||||
c.validation_errors,
|
||||
c.bank_account_details,
|
||||
c.has_validation_errors,
|
||||
c.tracking_category_name,
|
||||
c.account_payable_tax_type,
|
||||
c.tracking_category_option,
|
||||
c.sales_default_account_code,
|
||||
c.sales_tracking_categories,
|
||||
c.account_receivable_tax_type,
|
||||
c.purchases_default_account_code,
|
||||
c.purchases_tracking_categories
|
||||
|
||||
from xero__bank_transaction_line_items btli
|
||||
left join
|
||||
xero__bank_transactions bt on bt.id_bank_transaction = btli.id_bank_transaction
|
||||
left join xero__contacts c on c.id_contact = bt.id_contact
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
with
|
||||
int_xero__bank_transactions as (
|
||||
select * from {{ ref("int_xero__bank_transactions") }}
|
||||
)
|
||||
select
|
||||
bt.id_bank_transaction as id_bank_transaction,
|
||||
bt.id_prepayment as id_prepayment,
|
||||
bt.id_overpayment as id_overpayment,
|
||||
bt.id_contact as id_contact,
|
||||
bt.id_bank_account as id_bank_account,
|
||||
bt.reference as reference,
|
||||
bt.transaction_type as transaction_type,
|
||||
bt.transaction_sign as transaction_sign,
|
||||
bt.transaction_status as transaction_status,
|
||||
bt.transaction_at_utc as transaction_at_utc,
|
||||
bt.transaction_date_utc as transaction_date_utc,
|
||||
bt.date_string as date_string,
|
||||
bt.total_amount_local_curr as total_amount_local_curr,
|
||||
bt.total_amount_in_gbp as total_amount_in_gbp,
|
||||
bt.total_amount_wo_tax_local_curr as total_amount_wo_tax_local_curr,
|
||||
bt.total_amount_wo_tax_in_gbp as total_amount_wo_tax_in_gbp,
|
||||
bt.total_tax_local_curr as total_tax_local_curr,
|
||||
bt.total_tax_in_gbp as total_tax_in_gbp,
|
||||
bt.transaction_currency_iso_4217 as transaction_currency_iso_4217,
|
||||
bt.exchange_rate_to_gbp as exchange_rate_to_gbp,
|
||||
bt.line_amount_tax_inclusiveness as line_amount_tax_inclusiveness,
|
||||
bt.is_reconciled as is_reconciled,
|
||||
bt.has_attachments as has_attachments,
|
||||
bt.url as url,
|
||||
bt.external_link_provider_name as external_link_provider_name,
|
||||
bt.updated_at_utc as updated_at_utc,
|
||||
bt.updated_date_utc as updated_date_utc,
|
||||
bt.dwh_extracted_at_utc as dwh_extracted_at_utc
|
||||
from int_xero__bank_transactions bt
|
||||
Loading…
Add table
Add a link
Reference in a new issue