blob: 0734ce3e90241031473f56e951efefbce34b2818 [file] [log] [blame] [edit]
########################################################
#
# Author: paolarenteria@
# Updated Date: 2021-12-10
# Imports the nals_view table for NAL metadata
#
########################################################
view: nal {
# sql_table_name: `concord-prod.service_gcc.nals_view` ;;
derived_table: {
sql: SELECT
1 nal_id
, false is_dn_nal
, 'field_rep' field_rep
, 'access_key_hierarchy' access_key_hierarchy
, 'fsr_manager' fsr_manager
, false is_digital_native
, 'nal_sub_cluster' nal_sub_cluster
, 'nal_tag' nal_tag
, false is_street_level_nal
, 'micro_region' micro_region
, 'nal_cluster' nal_cluster
, 'nal_name' nal_name
, 'nal_type' nal_type
, 'nal_vertical' nal_vertical
, 'region' region
, 'sub_region' sub_region;;
}
##### PRIMARY KEY #####
dimension: nal_id {
label: "NAL ID"
hidden: yes
primary_key: yes
type: number
sql: ${TABLE}.nal_id ;;
}
##### DIMENSIONS #####
dimension: digital_native {
group_label: "NAL Details"
label: "Digital Native"
description: "A string version of \"Is Digital Native NAL\" that is Digital Native or Traditional"
type: string
sql: IF(${is_dn_nal}, "Digital Native", "Traditional") ;;
}
dimension: field_rep {
group_label: "NAL People"
description: "LDAP of the Field Rep"
type: string
sql: ${TABLE}.field_rep ;;
link: {
label: "MOMA"
url: "https://moma.corp.google.com/person/{{ value }}"
}
}
dimension: field_rep_manager {
group_label: "NAL People"
description: "LDAP of the Field Rep's Manager"
type: string
sql: ${TABLE}.fsr_manager ;;
link: {
label: "MOMA"
url: "https://moma.corp.google.com/person/{{ value }}"
}
}
dimension: is_dn_nal {
group_label: "NAL Details"
label: "Is Digital Native NAL"
type: yesno
sql: ${TABLE}.is_digital_native ;;
}
dimension: is_prime_nal {
group_label: "NAL Details"
label: "Is Prime NAL"
type: yesno
sql: ${TABLE}.nal_tag = "Prime" ;;
}
dimension: is_street_level_nal {
group_label: "NAL Details"
label: "Is Street Level NAL"
type: yesno
sql: ${TABLE}.is_street_level_nal ;;
}
dimension: micro_region {
description: "Micro region"
hidden: yes
sql: ${TABLE}.micro_region ;;
}
dimension: nal_cluster {
description: "NAL cluster"
hidden: yes
sql: ${TABLE}.nal_cluster ;;
}
dimension: nal_name {
description: "NAL name"
hidden: yes
sql: ${TABLE}.nal_name ;;
}
dimension: nal_segment {
group_label: "{% if _explore._name == 'gcp_forecast_quotas_transformed' %}Region{% else %}NAL Details{% endif %}"
label: "NAL Segment"
type: string
sql: ${TABLE}.nal_type ;;
}
dimension: nal_vertical {
group_label: "NAL Details"
label: "NAL Vertical"
type: string
sql: ${TABLE}.nal_vertical ;;
}
dimension: region {
description: "NAL region"
hidden: yes
sql: ${TABLE}.region ;;
}
dimension: sub_region {
description: "NAL sub region"
hidden: yes
sql: ${TABLE}.sub_region ;;
}
}