more docs

This commit is contained in:
Pablo Martin 2024-05-16 16:06:07 +02:00
parent fa2a79e973
commit 9068774f35

View file

@ -446,3 +446,393 @@ models:
- name: dwh_extracted_at_utc
data_type: timestamp with time zone
description: ""
- name: xero__denom_invoicing_mart
description: |
This is denormalized table built upon contacts, invoice and invoice line
items. It's just built to save you time in joining and for dealing with
certain limitations in PBI.
The level of granularity is at line item. Line items there are joined
with invoices by the id of the invoice present in the line item, and
contacts are joined by the id of the contact present in the invoice.
Be careful when aggregating figures: sums on the invoice line item level
make sense, sums on the invoice level do not.
Data from the original entities is brought as is with no transformation.
Please, when modelling here, try to respect this approach.
columns:
- name: id_line_item
data_type: text
description: "Xero's unique identifier for the line item."
- name: id_item
data_type: text
description: "Xero's unique identifier for the item of this line."
- name: item_code
data_type: text
description: "A text based code that describes the Item."
- name: quantity
data_type: numeric
description: "How much of the item is sold in its invoice."
- name: unit_amount
data_type: numeric
description: "The price of each unit of the item."
- name: line_amount_local_curr
data_type: numeric
description: "The total value to be charged for this line, in local currency.
"
- name: line_amount_in_gbp
data_type: numeric
description: "The total value to be charged for this line, in GBP."
- name: line_amount_wo_taxes_local_curr
data_type: numeric
description: "The total value to be charged for this line, minus taxes, in local
currency.
In some cases, this will be the same value as the line amount. This
depends on whether there is any tax in the invoice, and whether the
invoice amounts are tax inclusive or tax exclusive. You can find this
out in the details of the invoice this line item belongs to.
"
- name: line_amount_wo_taxes_in_gbp
data_type: numeric
description: "The total value to be charged for this line, minus taxes, in GBP.
In some cases, this will be the same value as the line amount. This
depends on whether there is any tax in the invoice, and whether the
invoice amounts are tax inclusive or tax exclusive. You can find this
out in the details of the invoice this line item belongs to.
"
- name: tax_amount_local_curr
data_type: numeric
description: "The total value of taxes for this line, in local currency."
- name: tax_amount_in_gbp
data_type: numeric
description: "The total value of taxes for this line, in GBP."
- name: tax_type
data_type: text
description: ""
- name: line_description
data_type: text
description: "A text description of the line item."
- name: id_invoice
data_type: character varying
description: "Xero's unique identifier for the invoice."
- name: reference
data_type: character varying
description: "The Superhog-set reference for the invoices. Only relevant for
records of invoice type (ACCREC).
"
- name: invoice_number
data_type: character varying
description: ""
- name: invoice_issued_date_utc
data_type: timestamp with time zone
description: "Date on which the invoice was issued."
- name: invoice_due_date_utc
data_type: timestamp with time zone
description: "The date were the invoice should be paid the latest."
- name: was_fully_paid_on_date_utc
data_type: timestamp with time zone
description: "The date on which the invoice was fully paid. If the invoice is still
not fully paid, it returns null.
"
- name: invoice_type
data_type: character varying
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").
"
- name: invoice_currency_iso_4217
data_type: character varying
description: "The currency in which this line item amounts are defined.
Line items don't really have a currency definition of its own, this
field is populated for your convenience when working with this data.
The invoice currency is defined at the invoice level, and the values
you see in this field should always be the same as the currency of
the invoice this line item belongs to.
"
- name: exchange_rate_to_gbp
data_type: numeric
description: "The implied exchange rate between the invoice 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 invoice is 135 ZAR, and this rate is 0.0167, the invoice value in GBP is 2.25
(135ZAR * 0.0167GBP/ZAR = 2.25GBP).
"
- name: total_amount_local_curr
data_type: numeric
description: "The total amount to be paid, in the currency the invoice is denominated in."
- name: total_amount_in_gbp
data_type: numeric
description: "The total amount to be paid, converted to GBP."
- 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."
- name: total_amount_wo_tax_in_gbp
data_type: numeric
description: "The total amount to be paid minus taxes, converted to GBP."
- name: total_tax_local_curr
data_type: numeric
description: "The total tax, in the currency the invoice is denominated in."
- name: total_tax_in_gbp
data_type: numeric
description: "The total tax, converted to GBP."
- name: total_due_local_curr
data_type: numeric
description: "The total amount outstanding right now, in the currency the invoice is denominated in."
- name: total_due_in_gbp
data_type: numeric
description: "The total amount outstanding right now, converted to GBP."
- 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."
- name: total_paid_in_gbp
data_type: numeric
description: "The total amount that has already been paid, in GBP."
- name: invoice_status
data_type: character varying
description: "The status of the invoice.
Can be one of: PAID, VOIDED, DRAFT, DELETED, AUTHORISED, SUBMITTED.
You can read more here: https://developer.xero.com/documentation/api/accounting/types#invoices
"
- name: has_errors
data_type: boolean
description: ""
- name: is_discounted
data_type: boolean
description: ""
- name: date_string
data_type: timestamp with time zone
description: ""
- name: due_date_string
data_type: timestamp with time zone
description: ""
- name: has_been_sent_to_contact
data_type: boolean
description: ""
- name: total_discount
data_type: numeric
description: ""
- name: total_credited_local_curr
data_type: numeric
description: "Total amount credited by related credit notes, over-payments and pre-payments."
- name: has_attachments
data_type: boolean
description: ""
- 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).
"
- name: payment_planned_date_utc
data_type: timestamp with time zone
description: ""
- name: payment_expected_date_utc
data_type: timestamp with time zone
description: ""
- name: id_contact
data_type: character varying
description: "Xero's unique identifier for the contact."
- name: account_number
data_type: character varying
description: "A Superhog set identifier. For customers, this is Hubspot's Deal Id."
- name: id_deal
data_type: text
description: "For those account numbers that look like a Deal Id, we extract them
into this field. Other contacs will have a blank.
You can use this to find specific deal ids or even as a proxy bool to
keep or remove deal id customers.
"
- name: contact_name
data_type: character varying
description: "The name for the customer."
- name: is_customer
data_type: boolean
description: "Flag that shows if the contact is a Superhog customer."
- name: is_supplier
data_type: boolean
description: "Flag that shows if the contact is a Superhog supplier."
- name: tax_number
data_type: character varying
description: "Tax number for this contact."
- name: contact_first_name
data_type: character varying
description: ""
- name: contact_last_name
data_type: character varying
description: ""
- name: phones
data_type: jsonb
description: ""
- name: website
data_type: character varying
description: ""
- name: balances
data_type: jsonb
description: ""
- name: discount
data_type: numeric
description: ""
- name: addresses
data_type: jsonb
description: ""
- name: attachments
data_type: jsonb
description: ""
- name: email_addresses
data_type: character varying
description: ""
- name: payment_terms
data_type: jsonb
description: ""
- name: batch_payments
data_type: jsonb
description: ""
- name: branding_theme
data_type: jsonb
description: ""
- name: contact_groups
data_type: jsonb
description: ""
- name: contact_number
data_type: character varying
description: ""
- name: contact_status
data_type: character varying
description: ""
- name: skyper_user_name
data_type: character varying
description: ""
- name: contact_persons
data_type: jsonb
description: ""
- name: xero_network_key
data_type: character varying
description: ""
- name: default_currency_iso_4217
data_type: character varying
description: "The default currency used to interact with this contact.
For customers, this is the currency we will usually use to invoice.
"
- name: validation_errors
data_type: jsonb
description: ""
- name: bank_account_details
data_type: character varying
description: ""
- name: has_validation_errors
data_type: boolean
description: ""
- name: tracking_category_name
data_type: character varying
description: ""
- name: account_payable_tax_type
data_type: character varying
description: ""
- name: tracking_category_option
data_type: character varying
description: ""
- name: sales_default_account_code
data_type: character varying
description: ""
- name: sales_tracking_categories
data_type: jsonb
description: ""
- name: account_receivable_tax_type
data_type: character varying
description: ""
- name: purchases_default_account_code
data_type: character varying
description: ""
- name: purchases_tracking_categories
data_type: jsonb
description: ""