Sample first click table schema


#1
view: firstclick {
  dimension: domain {
    sql: ${TABLE}.domain ;;
  }

  dimension: language {
    sql: ${TABLE}.language ;;
  }

  dimension: path {
    sql: ${TABLE}.path ;;
  }
  dimension: referrer {
    sql: ${TABLE}.referrer ;;
  }

  dimension: search_term {
    sql: ${TABLE}.search_term ;;
  }

  dimension: source {
    sql: ${TABLE}.source ;;
  }

  dimension_group: timevisited {
    type: time
    timeframes: [time, date, week, month]
    sql: ${TABLE}.timevisited ;;
  }

  dimension: url {
    sql: ${TABLE}.url ;;
  }

  dimension: userid {
    type: int
    sql: ${TABLE}.userid ;;
  }

  dimension: utm_campaign {
    sql: ${TABLE}.utm_campaign ;;
  }

  dimension: utm_content {
    sql: ${TABLE}.utm_content ;;
  }

  dimension: utm_medium {
    sql: ${TABLE}.utm_medium ;;
  }

  dimension: utm_source {
    sql: ${TABLE}.utm_source ;;
  }

  dimension: utm_term {
    sql: ${TABLE}.utm_term ;;
  }

  measure: count {
    type: count
    drill_fields: [detail*]
  }

  # ----- Detail ------
  set: detail {
    fields:
  }
}