Skip to content

Instantly share code, notes, and snippets.

@mattm
Created December 5, 2017 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattm/0b8ab450ccec9a40407e48841dc882cc to your computer and use it in GitHub Desktop.
Save mattm/0b8ab450ccec9a40407e48841dc882cc to your computer and use it in GitHub Desktop.
Looker Google Sheet View
view: monthly_unique_visitors_test {
sql_table_name: google_sheets.monthly_unique_visitors_test ;;
dimension_group: visit {
type: time
timeframes: [
month
]
sql: CAST(PARSE_DATE("%e-%b-%y", ${TABLE}.month) AS TIMESTAMP) ;;
}
measure: unique_visitors {
type: max
sql: CAST(REPLACE(${TABLE}.users, ",", "") AS INT64) ;;
value_format_name: decimal_0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment