advertising_marketing_small/geo_pid_facts.view.lookml 4 dims1 measure 2 warnings Repo files

LookML view · advertising-marketing-small

geo_pid_facts: a pre-aggregated geo by publisher table with an ambiguous count

At a glance

Does
Reads four columns from a pre-built table: geo, pid, ip_count and a stored count. It adds a row-count measure that is also named count.Trust: Source-defined
Why
Likely a summary of traffic per country and publisher, with distinct IPs, for checking how concentrated a publisher's traffic is by geography. No dashboard tile uses it.Trust: Inferred
Grain
One row per geo and pid, judging by the columns. No key is declared, so the grain is not enforced.Trust: Inferred
Source
advertising_marketing_small/geo_pid_facts.view.lookml 18 lines
Source: geo_pid_facts.view.lookml L1-10
advertising_marketing_small/geo_pid_facts.view.lookmlL1-10
- view: geo_pid_facts  fields:  - dimension: count    type: int    sql: ${TABLE}.count  - dimension: geo    sql: ${TABLE}.geo  - dimension: ip_count    type: int    sql: ${TABLE}.ip_count  - dimension: pid    type: int    sql: ${TABLE}.pid

advertising-marketing-small, geo_pid_facts.view.lookml, lines 1-10

Shape

Trust: Source-defined

Every field as declared, with the dashboard tiles that read it. Computed from the source; nothing here is edited.

Table: defaults to geo_pid_facts (no sql_table_name).

Dimensions 4

NameTypeSQLUsed byTags
countL3int${TABLE}.count-name reused
geoL6string${TABLE}.geo-
ip_countL8int${TABLE}.ip_count-
pidL11int${TABLE}.pid-

Measures 1

NameTypeSQLUsed byTags
countL14countCOUNT(*) of rows-name reused

Relationships

Trust: Source-defined

No joins, no upstream views and no dashboard tiles reference this view. It is an island in the model.

Relationships of geo_pid_facts
Relationships of geo_pid_facts. Text version follows the diagram.This viewUsed by: explores, views, dashboardsbase view geo_pid_facts explore in odd_browser_and_os_analysis
  • This Block
Text version
  • geo_pid_facts is the base view of geo_pid_facts: base view

Worth noticing

Two fields share the name count

Trust: Source-defined

The dimension count reads the stored column. The measure count counts rows. In the explore field picker they appear under the same name in different sections.

Source: geo_pid_facts.view.lookml L3-16
advertising_marketing_small/geo_pid_facts.view.lookmlL3-16
- view: geo_pid_facts  fields:  - dimension: count    type: int    sql: ${TABLE}.count  - dimension: geo    sql: ${TABLE}.geo  - dimension: ip_count    type: int    sql: ${TABLE}.ip_count  - dimension: pid    type: int    sql: ${TABLE}.pid  - measure: count    type: count    detail: detail*  sets:    detail: null

advertising-marketing-small, geo_pid_facts.view.lookml, lines 3-16

pid is an integer here and a string elsewhere

Trust: Source-defined

pid is type: int. In other_browser_os_impressions, other_browser_os_impressions.pid is a string parsed from subid. Matching them needs a cast and assumes the same parsing built this table.

Source: geo_pid_facts.view.lookml L11-13
advertising_marketing_small/geo_pid_facts.view.lookmlL11-13
  - dimension: ip_count    type: int    sql: ${TABLE}.ip_count  - dimension: pid    type: int    sql: ${TABLE}.pid  - measure: count    type: count    detail: detail*

advertising-marketing-small, geo_pid_facts.view.lookml, lines 11-13

What can change the answer 2

Caution: The row count is not a traffic count

Trust: Source-defined

The measure count counts geo and pid rows. The stored count column is only a dimension, so there is no measure that sums it.

What goes wrong: A chart of count by geo shows how many publishers each geo has, not how much traffic it sends.

Read the guide: Primary keys and counts

Source: geo_pid_facts.view.lookml L14-16
advertising_marketing_small/geo_pid_facts.view.lookmlL14-16
  - dimension: pid    type: int    sql: ${TABLE}.pid  - measure: count    type: count    detail: detail*  sets:    detail: null

advertising-marketing-small, geo_pid_facts.view.lookml, lines 14-16

Note: How the table is built is not in the repo

Trust: Missing

There is no derived table or documentation for the table behind this view. Its date range, filters and PID parsing are unknown.

Read the guide: Missing tables and stale references

Source: geo_pid_facts.view.lookml L1-2
advertising_marketing_small/geo_pid_facts.view.lookmlL1-2
- view: geo_pid_facts  fields:  - dimension: count    type: int    sql: ${TABLE}.count

advertising-marketing-small, geo_pid_facts.view.lookml, lines 1-2

Parser checks 2

Trust: Source-defined

Mechanical findings from parsing the LookML. They are facts about the files. The cards above explain which ones matter.

Show all 2 checks
  • no-primary-key 1
    • geo_pid_facts.view.lookml:1 geo_pid_facts declares no primary_key.
  • name-collision 1
    • geo_pid_facts.view.lookml:14 geo_pid_facts.count is declared as both dimension and measure.

Related

Guides built on this file

Related source files

Source model