Skip to content

Instantly share code, notes, and snippets.

@Stiivi
Created November 21, 2012 08:48
Show Gist options
  • Save Stiivi/4123867 to your computer and use it in GitHub Desktop.
Save Stiivi/4123867 to your computer and use it in GitHub Desktop.
Three date dimensions in a cube
{
"cubes":[
{
"dimensions": [
"start_date",
"middle_date",
"end_date"
],
"joins": [
{"master":"start_date_id", "detail":"dim_date.id", "alias": "dim_start_date"},
{"master":"middle_date_id", "detail":"dim_date.id", "alias":"dim_middle_date"},
{"master":"end_date_id", "detail":"dim_date.id", "alias": "dim_end_date"}
]
}
],
"dimensions": [
{
"name":"date",
"levels": [
{"name": "year", "attributes": ["year"]},
{"name": "month", "attributes": ["month", "month_name"]},
{"name": "day", "attributes": ["day"]}
]
},
{
"name": "start_date",
"template": "date"
},
{
"name": "middle_date",
"template": "date"
},
{
"name": "end_date",
"template": "date"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment