cube-js / cube

📊 Cube — Universal semantic layer platform for AI, BI, spreadsheets, and embedded analytics
https://cube.dev
Other
18.02k stars 1.78k forks source link

error: "TypeError: (this.options.measures || []).map is not a function" #1283

Closed manikasharma70 closed 4 years ago

manikasharma70 commented 4 years ago

The following error is coming in the /v1/sql API call. Can you please let me know what can be the issue. The Query i have used is this:

{ "measures": [ "Application.PercentUtilization" ], "timeDimensions": [ { "dimension": "Application.servertime", "granularity": "day" } ], "order": {}, "dimensions": [], "filters": [] }

vasilev-alex commented 4 years ago

Hey, @manikasharma70! Can you please post the full trace log?

manikasharma70 commented 4 years ago

Hi @vasilev-alex The Request header used for the API is : Request URL: http://localhost:4000/cubejs-api/v1/sql?query=%7B%22measures%22%3A%5B%22Application.PercentUtilization%22%5D%2C%22timeDimensions%22%3A%5B%7B%22dimension%22%3A%22Application.servertime%22%2C%22granularity%22%3A%22day%22%7D%5D%2C%22order%22%3A%7B%7D%2C%22filters%22%3A%5B%5D%7D

Query String: query: {"measures":["Application.PercentUtilization"],"timeDimensions":[{"dimension":"Application.servertime","granularity":"day"}],"order":{},"filters":[]}

Response: {"error":"TypeError: (this.options.measures || []).map is not a function"}

vasilev-alex commented 4 years ago

Normally you can find the full trace log in the server console. Could you attach it as well, please?

manikasharma70 commented 4 years ago

@vasilev-alex : The issue is resolved. There was some error in the pre aggregations .