LKML Game development

Battles

Battles model for game development.

inferred

Blocks

battles.view.lkml · 231 lines
inferred
view: battles {
  sql_table_name: public_battles ;;

  dimension: battle_id {
    type: int
    primary_key: yes
    sql: ${TABLE}.battle_id ;;
  }

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

  dimension: active_player_apm {
    type: number
    sql: ${TABLE}.active_player_apm ;;
  }

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

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

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

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

  dimension: attacker_apm {
    type: number
    sql: ${TABLE}.attacker_apm ;;
  }

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

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

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

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

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

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

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

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

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

  dimension: base_damage {
    type: number
    sql: ${TABLE}.base_damage ;;
  }

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

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

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

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

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

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

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

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

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

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

  dimension: defender_apm {
    type: number
    sql: ${TABLE}.defender_apm ;;
  }

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

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

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

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

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

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

  dimension: framerate {
    type: number
    sql: ${TABLE}.framerate ;;
  }

  dimension: home_base {
    type: yesno
    sql: ${TABLE}.home_base ;;
  }

  dimension: lootiron {
    type: int
    sql: ${TABLE}."loot:iron" ;;
  }

  dimension: lootres3 {
    type: int
    sql: ${TABLE}."loot:res3" ;;
  }

  dimension: loottrophies_pvp {
    type: int
    sql: ${TABLE}."loot:trophies_pvp" ;;
  }

  dimension: lootunits_lost_iron {
    type: int
    sql: ${TABLE}."loot:units_lost_iron" ;;
  }

  dimension: lootunits_lost_res3 {
    type: int
    sql: ${TABLE}."loot:units_lost_res3" ;;
  }

  dimension: lootunits_lost_water {
    type: int
    sql: ${TABLE}."loot:units_lost_water" ;;
  }

  dimension: lootviewing_trophies_pvp {
    type: int
    sql: ${TABLE}."loot:viewing_trophies_pvp" ;;
  }

  dimension: lootwater {
    type: int
    sql: ${TABLE}."loot:water" ;;
  }

  dimension: lootxp {
    type: int
    sql: ${TABLE}."loot:xp" ;;
  }

  dimension: occurred {
    type: time
    sql: FROM_UNIXTIME(${TABLE}.time) ;;
  }

  measure: count {
    type: count
  }
}
battles.view.lookml · 135 lines
source-preserved
- view: battles
  sql_table_name: public_battles
  fields:
  - dimension: battle_id
    type: int
    primary_key: true
    sql: ${TABLE}.battle_id
  - dimension: active_opponent_id
    type: int
    sql: ${TABLE}.active_opponent_id
  - dimension: active_player_apm
    type: number
    sql: ${TABLE}.active_player_apm
  - dimension: active_player_id
    type: int
    sql: ${TABLE}.active_player_id
  - dimension: active_player_outcome
    sql: ${TABLE}.active_player_outcome
  - dimension: active_player_townhall_level
    type: int
    sql: ${TABLE}.active_player_townhall_level
  - dimension: attack_type
    sql: ${TABLE}.attack_type
  - dimension: attacker_apm
    type: number
    sql: ${TABLE}.attacker_apm
  - dimension: attacker_home_base_loc
    sql: ${TABLE}.attacker_home_base_loc
  - dimension: attacker_home_base_loc_x
    type: int
    sql: ${TABLE}.attacker_home_base_loc_x
  - dimension: attacker_home_base_loc_y
    type: int
    sql: ${TABLE}.attacker_home_base_loc_y
  - dimension: attacker_id
    type: int
    sql: ${TABLE}.attacker_id
  - dimension: attacker_level
    type: int
    sql: ${TABLE}.attacker_level
  - dimension: attacker_outcome
    sql: ${TABLE}.attacker_outcome
  - dimension: attacker_townhall_level
    type: int
    sql: ${TABLE}.attacker_townhall_level
  - dimension: attacker_type
    sql: ${TABLE}.attacker_type
  - dimension: base_creation_time
    type: int
    sql: ${TABLE}.base_creation_time
  - dimension: base_damage
    type: number
    sql: ${TABLE}.base_damage
  - dimension: base_id
    type: int
    sql: ${TABLE}.base_id
  - dimension: base_map_loc
    sql: ${TABLE}.base_map_loc
  - dimension: base_map_loc_x
    type: int
    sql: ${TABLE}.base_map_loc_x
  - dimension: base_map_loc_y
    type: int
    sql: ${TABLE}.base_map_loc_y
  - dimension: base_region
    sql: ${TABLE}.base_region
  - dimension: base_template
    sql: ${TABLE}.base_template
  - dimension: base_times_attacked
    type: int
    sql: ${TABLE}.base_times_attacked
  - dimension: base_times_conquered
    type: int
    sql: ${TABLE}.base_times_conquered
  - dimension: base_type
    sql: ${TABLE}.base_type
  - dimension: battle_type
    sql: ${TABLE}.battle_type
  - dimension: defender_apm
    type: number
    sql: ${TABLE}.defender_apm
  - dimension: defender_id
    type: int
    sql: ${TABLE}.defender_id
  - dimension: defender_level
    type: int
    sql: ${TABLE}.defender_level
  - dimension: defender_outcome
    sql: ${TABLE}.defender_outcome
  - dimension: defender_townhall_level
    type: int
    sql: ${TABLE}.defender_townhall_level
  - dimension: defender_type
    sql: ${TABLE}.defender_type
  - dimension: duration
    type: int
    sql: ${TABLE}.duration
  - dimension: framerate
    type: number
    sql: ${TABLE}.framerate
  - dimension: home_base
    type: yesno
    sql: ${TABLE}.home_base
  - dimension: lootiron
    type: int
    sql: ${TABLE}."loot:iron"
  - dimension: lootres3
    type: int
    sql: ${TABLE}."loot:res3"
  - dimension: loottrophies_pvp
    type: int
    sql: ${TABLE}."loot:trophies_pvp"
  - dimension: lootunits_lost_iron
    type: int
    sql: ${TABLE}."loot:units_lost_iron"
  - dimension: lootunits_lost_res3
    type: int
    sql: ${TABLE}."loot:units_lost_res3"
  - dimension: lootunits_lost_water
    type: int
    sql: ${TABLE}."loot:units_lost_water"
  - dimension: lootviewing_trophies_pvp
    type: int
    sql: ${TABLE}."loot:viewing_trophies_pvp"
  - dimension: lootwater
    type: int
    sql: ${TABLE}."loot:water"
  - dimension: lootxp
    type: int
    sql: ${TABLE}."loot:xp"
  - dimension: occurred
    type: time
    sql: FROM_UNIXTIME(${TABLE}.time)
  - measure: count
    type: count

Contents

  • battles.view.lkml
  • battles.view.lookml