From 33aac0be1a1f830ec7c2e141254da67d4aad995a Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Tue, 11 Jun 2024 12:12:39 +0200 Subject: [PATCH] Added core__unified_user to reporting with the documentation --- models/reporting/core/core__unified_user.sql | 39 +++++ models/reporting/core/schema.yaml | 155 +++++++++++++++++++ 2 files changed, 194 insertions(+) create mode 100644 models/reporting/core/core__unified_user.sql diff --git a/models/reporting/core/core__unified_user.sql b/models/reporting/core/core__unified_user.sql new file mode 100644 index 0000000..8a5f64f --- /dev/null +++ b/models/reporting/core/core__unified_user.sql @@ -0,0 +1,39 @@ +with core__unified_user as (select * from {{ ref("int_core__unified_user") }}) +select + id_user as id_user, + id_account_type as id_account_type, + id_billing_country as id_billing_country, + account_currency_iso4217 as account_currency_iso4217, + user_code as user_code, + first_name as first_name, + last_name as last_name, + email as email, + title as title, + id_deal as id_deal, + is_deleted as is_deleted, + joined_at_utc as joined_at_utc, + joined_date_utc as joined_date_utc, + user_name as user_name, + code_prefix as code_prefix, + billing_town as billing_town, + company_name as company_name, + is_email_confirmed as is_email_confirmed, + is_lockout_enabled as is_lockout_enabled, + billing_postcode as billing_postcode, + is_twofactor_enabled as is_twofactor_enabled, + access_failed_count as access_failed_count, + lockout_end_date_utc as lockout_end_date_utc, + avatar as avatar, + id_airbnb as id_airbnb, + airbnb_url as airbnb_url, + created_date_utc as created_date_utc, + updated_date_utc as updated_date_utc, + verified_at_utc as verified_at_utc, + verified_date_utc as verified_date_utc, + flag_as_problem as flag_as_problem, + number_of_properties as number_of_properties, + id_superhog_verified_set as id_superhog_verified_set, + platform_comms_recipient as platform_comms_recipient, + other_sharing_platform_url as other_sharing_platform_url, + id_user_verification_status as id_user_verification_status +from core__unified_user \ No newline at end of file diff --git a/models/reporting/core/schema.yaml b/models/reporting/core/schema.yaml index c4711f1..1f1dac0 100644 --- a/models/reporting/core/schema.yaml +++ b/models/reporting/core/schema.yaml @@ -373,6 +373,7 @@ models: probably broken and unreliable. For more details, contact pablo.martin or Lawrence. + - name: core__verification_requests description: This is a table that shows all guest journey from our guests users with @@ -653,3 +654,157 @@ models: description: | relative increment between value vs. previous_year_value. If previous_year_value is null, relative_increment will also be null. + + - name: core__unified_user + description: + This is a table to join data from all users of Superhog (hosts, PMs, guests, etc). + + It contains details of every user like name, last name, email address, etc. + columns: + - name: id_user + data_type: character varying + description: Unique, incremental, internal ID for the user. + + - name: id_account_type + data_type: bigint + description: Internal ID for type of user. + + - name: id_billing_country + data_type: bigint + description: "" + + - name: account_currency_iso4217 + data_type: character varying + description: Currency used by user. + + - name: user_code + data_type: bigint + description: "" + + - name: first_name + data_type: character varying + description: First name of user. + + - name: last_name + data_type: character varying + description: Last name of user. + + - name: email + data_type: character varying + description: The email of the user. + + - name: title + data_type: character varying + description: Title of the user (Mr, Ms, etc). + + - name: id_deal + data_type: character varying + description: "" + + - name: is_deleted + data_type: boolean + description: ¦ True if the user has been deleted. + + - name: joined_at_utc + data_type: timestamp without time zone + description: + The date time when the user created it's account in Superhog. + + - name: joined_date_utc + data_type: date + description: + The date when the user created it's account in Superhog. + + - name: user_name + data_type: character varying + description: "" + + - name: code_prefix + data_type: character varying + description: "" + + - name: billing_town + data_type: character varying + description: "" + + - name: company_name + data_type: character varying + description: "" + + - name: is_email_confirmed + data_type: boolean + description: ¦ True if the email has been confirmed. + + - name: is_lockout_enabled + data_type: boolean + description: "" + + - name: billing_postcode + data_type: character varying + 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: "" + + - name: avatar + data_type: character varying + description: "" + + - name: id_airbnb + data_type: character varying + description: "" + + - name: airbnb_url + data_type: character varying + description: "" + + - name: created_date_utc + data_type: timestamp without time zone + description: + The date time when the user data was created. + + - name: updated_date_utc + data_type: timestamp without time zone + description: + The date when the user data was created. + + - name: verified_at_utc + data_type: timestamp without time zone + description: "" + + - name: verified_date_utc + data_type: date + description: "" + + - name: flag_as_problem + data_type: boolean + description: "" + + - name: number_of_properties + data_type: bigint + description: Number of listings managed by user. + + - name: id_superhog_verified_set + data_type: bigint + description: "" + + - name: platform_comms_recipient + data_type: bigint + description: "" + + - name: other_sharing_platform_url + data_type: character varying + description: "" + + - name: id_user_verification_status + data_type: bigint + description: ""