view: dt_ca_physical_product_view_with_release_grid { sql_table_name: INTELLIGENCE.DBT_PROD.DT_CA_PHYSICAL_PRODUCT_VIEW_WITH_RELEASE_GRID ;; # derived_table: { # sql: # select * # from sony_internal.prod.ca_physical_product_view ca # inner join orchard_app_reporting_v2.art_relations_prod_art_relations.release_grid rg # on ca.gras_prod_no = rg.product_no # ;; # } dimension: suggested_retail_price { type: number label: "Suggested Retail Price" sql: ${TABLE}."Suggested Retail Price" ;; } dimension: wholesale_price { type: number label: "Wholesale Price" sql: ${TABLE}."Wholesale Price" ;; } dimension: orchard_price_code { type: string label: "Orchard Price Code" sql: ${TABLE}."Orchard Price Code" ;; } dimension: orchard_price { type: string label: "Orchard Price" sql: ${TABLE}."Orchard Price" ;; } dimension: artist { type: string sql: UPPER(${TABLE}."Artist") ;; } dimension: product_name { type: string label: "Product Name" sql: UPPER(${TABLE}."Product Name") ;; } dimension: label_name { type: string label: "Label Name" sql: UPPER(${TABLE}."Label Name");; } dimension: label_code { type: string label: "Label Code" sql: ${TABLE}."Label Code" ;; } dimension: sub_label { type: string label: "Sub Label" sql: UPPER(${TABLE}."Sub Label") ;; } dimension: genre { type: string sql: UPPER(${TABLE}."Genre") ;; } dimension: sub_genre { type: string label: "Sub Genre" sql: ${TABLE}."Sub Genre" ;; } dimension: product_code { type: string label: "Product Code" link: { label: "Sales Goals" url: "https://theorchard.looker.com/explore/RED/releases_snowflake?fields=releases_snowflake.display_upc,releases_snowflake.product_code,releases_snowflake.release_name,releases_snowflake.release_status,artist_info_snowflake.name,vendor_snowflake.vendor_id,vendor_snowflake.vendor_name,target_market_goal.label_goal_value,target_market_goal.distribution_goal_value,store_physical_sales_goal.name&f[distribution_format_snowflake.context_type]=physical&f[releases_snowflake.display_upc]=&f[releases_snowflake.product_code]={{value}}&f[target_market_goal.country_name]=United+States&f[vendor_snowflake.vendor_id]=&sorts=target_market_goal.label_goal_value+desc,store_physical_sales_goal.name&vis=%7B%22type%22%3A%22table%22%7D&filter_config=%7B%22distribution_format_snowflake.context_type%22%3A%5B%7B%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22physical%22%7D%2C%7B%7D%5D%2C%22id%22%3A0%2C%22error%22%3Afalse%7D%5D%2C%22releases_snowflake.display_upc%22%3A%5B%7B%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22%22%7D%2C%7B%7D%5D%2C%22id%22%3A2%2C%22error%22%3Afalse%7D%5D%2C%22releases_snowflake.product_code%22%3A%5B%7B%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22{{value}}%22%7D%2C%7B%7D%5D%2C%22id%22%3A4%2C%22error%22%3Afalse%7D%5D%2C%22target_market_goal.country_name%22%3A%5B%7B%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22United+States%22%7D%2C%7B%7D%5D%2C%22id%22%3A1%2C%22error%22%3Afalse%7D%5D%2C%22vendor_snowflake.vendor_id%22%3A%5B%7B%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%7B%22constant%22%3A%22%22%7D%2C%7B%7D%5D%2C%22id%22%3A3%2C%22error%22%3Afalse%7D%5D%7D&dynamic_fields=%5B%5D&origin=share-expanded" icon_url: "http://looker.com/favicon.ico" } sql: ${TABLE}."Product Code" ;; } dimension: upc_ean { label: "UPC / EAN" type: string sql: ${TABLE}."UPC/EAN" ;; } dimension: release_date { type: date label: "Sale Start Date" sql: ${TABLE}."Release Date" ;; } dimension: product_type { type: string label: "Product Type" sql: ${TABLE}."Product Type" ;; } dimension: format { type: string sql: ${TABLE}."Format" ;; } dimension: units_per_set { type: number label: "Units Per Set" sql: ${TABLE}."Units Per Set" ;; } dimension: display_configuration { type: string label: "Display Configuration" sql: UPPER(${TABLE}."Display Configuration") ;; } dimension: product_status_code { type: string label: "Product Status Code" sql: ${TABLE}."Product Status Code" ;; } dimension: product_status { type: string label: "Product Status" sql: ${TABLE}."Product Status" ;; } dimension: cutout_date { type: date label: "Cutout Date" sql: ${TABLE}."Cutout Date" ;; } dimension: returns_disposition { type: string label: "Returns Disposition" sql: ${TABLE}."Returns Disposition" ;; } dimension: returns_disposition_override { type: string label: "Returns Disposition Override" sql: ${TABLE}."Returns Disposition Override" ;; } dimension: returnability { type: string sql: ${TABLE}."Returnability" ;; } dimension: exclusive { type: string sql: ${TABLE}."Exclusive" ;; } measure: open_orders { type: sum label: "Open Orders" sql: ${TABLE}."Open Orders" ;; } measure: backorders { type: sum sql: ${TABLE}."Backorders" ;; } measure: day1_s { type: sum label: "1DayS#" sql: ${TABLE}."Day1S#" ;; } measure: 5day_s { type: sum label: "5DayS#" sql: ${TABLE}."5DayS#" ;; } measure: 5day_r { type: sum label: "5DayR#" sql: ${TABLE}."5DayR#" ;; } measure: 5_day_s { type: sum label: "5DayS$" sql: ${TABLE}."5DayS$" ;; } measure: 5_day_r { type: sum label: "5DayR$" sql: ${TABLE}."5DayR$" ;; } measure: mtd_s { type: sum label: "MTDS#" sql: ${TABLE}."MTDS#" ;; } measure: 3MS_ships { type: sum label: "3MS#" sql: ${TABLE}."3MS#" ;; } measure: mtd_r { type: sum label: "MTDR#" sql: ${TABLE}."MTDR#" ;; } measure: m_td_s { type: sum label: "MTDS$" sql: ${TABLE}."MTDS$" ;; } measure: m_td_r { type: sum label: "MTDR$" sql: ${TABLE}."MTDR$" ;; } measure: cytd_s { type: sum label: "CYTDS#" sql: ${TABLE}."CYTDS#" ;; } measure: cytd_r { type: sum label: "CYTDR#" sql: ${TABLE}."CYTDR#" ;; } measure: c_ytd_s { type: sum label: "CYTDS$" sql: ${TABLE}."CYTDS$" ;; } measure: c_ytd_r { type: sum label: "CYTDR$" sql: ${TABLE}."CYTDR$" ;; } measure: 12MS_ships { type: sum label: "12MS#" sql: ${TABLE}."12MS#" ;; } measure: rtd_s { type: sum label: "RTDS#" sql: ${TABLE}."RTDS#" ;; } measure: rtd_r { type: sum label: "RTDR#" sql: ${TABLE}."RTDR#" ;; } measure: r_td_s { type: sum label: "RTDS$" sql: ${TABLE}."RTDS$" ;; } measure: r_td_r { type: sum label: "RTDR$" sql: ${TABLE}."RTDR$" ;; } measure: on_hand { type: sum label: "On Hand" sql: ${TABLE}."On Hand" ;; } measure: available { type: sum sql: ${TABLE}."Available" ;; } measure: purchase_orders { type: sum label: "Purchase Orders" sql: ${TABLE}."Purchase Orders" ;; } measure: potential { type: sum sql: ${TABLE}."Potential" ;; } measure: returns_in_process { type: sum label: "Returns in Process" sql: ${TABLE}."Returns in Process" ;; } measure: on_hold { type: sum label: "On Hold" sql: ${TABLE}."On Hold" ;; } dimension: gras_prod_no { type: string sql: ${TABLE}."GRAS_PROD_NO" ;; } dimension: inventory_category_cd { type: string sql: ${TABLE}."INVENTORY_CATEGORY_CD" ;; } dimension: article_no { type: string sql: ${TABLE}."ARTICLE_NO" ;; } dimension: fin_label_cd { type: string sql: ${TABLE}."FIN_LABEL_CD" ;; } dimension: fin_label_profit_center { type: string sql: ${TABLE}."FIN_LABEL_PROFIT_CENTER" ;; } dimension: profit_center { type: string sql: ${TABLE}."PROFIT_CENTER" ;; } dimension: sap_company_cd { type: string sql: ${TABLE}."SAP_COMPANY_CD" ;; } dimension: vendor_id { type: number sql: ${TABLE}."VENDOR_ID" ;; } dimension: subacct_id { type: number sql: ${TABLE}."SUBACCT_ID" ;; } dimension: release_id { primary_key: yes type: number sql: ${TABLE}."RELEASE_ID" ;; } dimension: upc { hidden: yes type: number sql: ${TABLE}."UPC" ;; } dimension: grid { type: string sql: ${TABLE}."GRID" ;; } dimension: product_no { type: string sql: ${TABLE}."PRODUCT_NO" ;; } dimension: create_time { type: date sql: ${TABLE}."CREATE_TIME" ;; } dimension: gras_status { type: string sql: ${TABLE}."GRAS_STATUS" ;; } measure: inventory_ratio { type: number sql: ${potential} / NULLIF (${open_orders},0);; value_format: "0.00%" } }