datachile / datachile-mondrian

Schema de Mondrian para DataChile. Server API.
https://chilecube.datachile.io/cubes
1 stars 2 forks source link

chilecube return Error 500 when an query have property() and there's not data #40

Closed cnavarreteliz closed 6 years ago

cnavarreteliz commented 6 years ago
cube.query
    .option("parents", true)
    .drilldown("Destination Country", "Country", "Country")
    .drilldown("Date", "Date", "Year")
    .measure("FOB US")
    .cut(`[Date].[Year].&[${sources.exports.year}]`)
    .property("Destination Country", "Country", "iso3")

For example, in imports > [Import HS].[HS].[HS2].&[157503]: https://chilecube.datawheel.us//cubes/imports/aggregate.jsonrecords?drilldown%5B%5D=%5BDate%5D.%5BYear%5D&drilldown%5B%5D=%5BImport+HS%5D.%5BHS%5D.%5BHS2%5D&cut%5B%5D=%5BDate%5D.%5BYear%5D.%26%5B2016%5D&cut%5B%5D=%5BImport+HS%5D.%5BHS%5D.%5BHS2%5D.%26%5B157503%5D&measures%5B%5D=CIF+US&properties%5B%5D=%5BOrigin+Country%5D.%5BCountry%5D.%5BCountry%5D.iso3&caption%5B%5D=%5BOrigin+Country%5D.%5BCountry%5D.%5BCountry%5D.Country+ES&caption%5B%5D=%5BOrigin+Country%5D.%5BCountry%5D.%5BContinent%5D.Region+ES&nonempty=true&distinct=false&parents=true&debug=true&sparse=true