{
    "cubes": [
        {
            "name": "sales",
            "measures": [
                    {"name":"amount", "aggregates":["sum", "min"]},
                    "discount"
                    ],
            "dimensions" : ["date", "flag", "product"],
            "details": ["fact_detail1", "fact_detail2"],
            "joins": [
                {"master": "sales.date_id", "detail":"dim_date_dim.id"},
                {"master": "sales.product_id", "detail":"dim_product_dim.id"},
                {"master": "sales.category_id", "detail":"dim_category_dim.id"}
            ],
            "mappings":{
                "product.name": "dim_product_dim.product_name",
                "product.category": "dim_product_dim.category_id",
                "product.category_name.en": "dim_category_dim.category_name_en",
                "product.category_name.sk": "dim_category_dim.category_name_sk",
                "product.subcategory": "dim_category_dim.subcategory_id",
                "product.subcategory_name.en": "dim_category_dim.subcategory_name_en",
                "product.subcategory_name.sk": "dim_category_dim.subcategory_name_sk"
            }
        }
    ],
    "dimensions" : [
        {
            "name": "date",
            "levels": [
                { "name": "year", "attributes": ["year"] },
                { "name": "month", "attributes":
                            ["month", "month_name", "month_sname"] },
                { "name": "day", "attributes": ["id", "day"] }
            ],
            "hierarchy": ["year", "month", "day"]
        },
        { "name": "flag" },
        { "name": "product",
            "levels": [
                {"name": "category",
                    "attributes": ["category",
                                    {"name": "category_name", "locales": ["en", "sk"] }
                                    ]
                },
                {"name": "subcategory",
                    "attributes": ["subcategory",
                                    {"name": "subcategory_name", "locales": ["en", "sk"] }
                                ]
                },
                { "name": "product",
                    "attributes": [ "id",
                                    {"name": "name"}
                                ]
                }
            ]
        }
    ]
}
