Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Create an Azure Analysis Services cube [Mcube] with a single expression [SharedExpression] that is exposed through which contents is exposed through [SharedExpressionTable] table. All for the sake of reaching for the #shared construct
{
"create": {
"database": {
"name": "Mcube",
"compatibilityLevel": 1400,
"model": {
"culture": "en-GB",
"expressions": [
{
"name": "SharedExpression",
"kind": "m",
"expression": "#shared"
}
],
"tables": [
{
"name": "SharedExpressionTable",
"columns": [
{
"name": "Name",
"dataType": "string",
"sourceColumn": "Name"
},
{
"name": "Value",
"dataType": "string",
"sourceColumn": "Value"
}
],
"partitions": [
{
"name": "Partition",
"dataView": "full",
"source": {
"type": "m",
"expression": "#sections[main][SharedExpression]"
}
}
]
}
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment