a few final changes

This commit is contained in:
Pablo Martin 2024-03-07 17:22:16 +01:00
parent cd42340bc2
commit e7edcff175
3 changed files with 95 additions and 8 deletions

View file

@ -139,7 +139,7 @@ sources:
data_type: timestamp without time zone
quote: True
description: "WIP. I have no clue what this is"
- name: BillinAddressLine1
- name: BillingAddressLine1
data_type: character varing
quote: True
description: ""

View file

@ -1,15 +1,102 @@
version: 2
models:
- name: stg_core_user
- name: stg_core__user
description: "The staging version of Core's User table. Do not confuse with SuperhogUser."
columns:
- name: id_user
description: "The primary key for this table"
tests:
- unique
- not_null
data_type: character varying
description: "UUID for the user."
- name: user_code
data_type: bigint
description: "WIP. Is this an increment unique ID?"
- name: email
data_type: character varying
description: "Email for this user."
- name: title
data_type: character varying
description: ""
- name: id_deal
data_type: character varying
description: "The Hubspot Deal Id that this user account belongs to. Multiple users can all be part of one Deal."
- name: is_deleted
data_type: boolean
description: "WIP. I'm guessing this signals that the user wanted to be deleted?"
- name: join_date_utc
data_type: timestamp without time zone
description: "Timestamp on which the user was created."
- name: last_name
data_type: character varying
description: ""
- name: user_name
data_type: character varying
description: ""
- name: first_name
data_type: character varying
description: ""
- name: code_prefix
data_type: character varying
description: "WIP. No clue on what is this."
- name: billing_town
data_type: character varying
description: ""
- name: company_name
data_type: character varying
description: ""
- name: date_of_birth
data_type: date
description: ""
- name: phone_number
data_type: character varying
description: ""
- name: password_hash
data_type: character varying
description: ""
- name: id_account_type
data_type: bigint
description: ""
- name: id_created_user
data_type: character varying
description: |
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.
- name: security_stamp
data_type: character varying
description: "WIP. I have no clue what this is."
- name: is_email_confirmed
data_type: boolean
description: "WIP. I have no clue what this is."
- name: is_lockout_enabled
data_type: boolean
description: "WIP. I have no clue what this is."
- name: billing_postcode
data_type: character varying
description: ""
- name: id_billing_country
data_type: bigint
description: ""
- name: is_twofactor_enabled
data_type: boolean
description: ""
- name: access_failed_count
data_type: bigint
description: ""
- name: lockout_end_date_utc
data_type: timestamp without time zone
description: "WIP. I have no clue what this is"
- name: billing_address_line_1
data_type: character varing
description: ""
- name: billing_address_line_2
data_type: character varying
description: ""
- name: is_phone_number_confirmed
data_type: boolean
description: ""
- name: dwh_extracted_date_utc
data_type: date
description: "{{ doc('dwh_extracted_date_utc_desc')}}"
- name: stg_core_superhog_user
description: "The staging version of Core's SuperhogUser table. Do not confuse with User."

View file

@ -15,7 +15,7 @@ with
{{ adapter.quote("CodePrefix") }} as code_prefix,
{{ adapter.quote("BillingTown") }} as billing_town,
{{ adapter.quote("CompanyName") }} as company_name,
{{ adapter.quote("DateOfBirth") }} as date_of_birth,
cast({{ adapter.quote("DateOfBirth") }} as date) as date_of_birth,
{{ adapter.quote("PhoneNumber") }} as phone_number,
{{ adapter.quote("PasswordHash") }} as password_hash,
{{ adapter.quote("AccountTypeId") }} as id_account_type,