createQuery
| Error | Description | Solution |
|---|---|---|
| metrics must be an array | The metrics attribute of the query configuration object is not an array. | Make sure metrics is an array, even if it’s just an array of one. |
| invalid metrics | Metrics function, for example “avg” or “min”, is not one of the expected values. | The metrics function must be one of the following: ‘min’ , ‘max’ , ‘avg’ , ‘sum’ , ‘calc’ , ‘distinct_count’ , ‘last_value’ , ‘percentiles’ |
| groups is not defined fields is not defined | The query configuration object has neither a groups attribute or a fields attribute. | Either groups or fields must be defined. See the query configuration page for more information about the query configuration object. |
| groups is not defined fields must be an array of field names | The query configuration object has a fields attribute that is not an array of field names, and does not define a groups attribute. | Make sure your fields attribute is an array, or add a groups attribute to the query configuration object. |
| groups must be an array of groups configurations fields is not defined | The query configuration object has a groups attribute that is not an array of groups configurations, and does not have a fields attribute. | Make sure your groups attribute is an array. If you do not want a grouped query, add a fields attribute with an array of field names. |
| filters must be an array | The query configuration object has a filters attribute that is not an array of filter configurations. | Make sure your filters attribute is an array, even if it’s an empty array [] or an array of just one configuration. |
| element expected | Configuration passed to visualize() does not have an ‘element’ attribute that is a webpage element. | Check out the XYZ link to visualize sample. |
| visualization does not exist | Using visualize(), you tried to create a visualization that does not exist. | Check the name of your visualization and make sure it is valid. If using a custom chart, make sure you copied the name exactly. |
| data set empty | The data set that you are trying to access is empty. | This message will result if you have a non-live (static) data source and the query to access it contains pauseAfterRead set to false . A query to static data sources should have pauseAfterRead set to true, otherwise the query attempts to read and reread the source. |