Skip to content

Invalid NRQL query in Python Dashboard - Log widget causing import failure #2710

@developer-arch

Description

@developer-arch

Invalid NRQL query in Python Dashboard - Log widget causing import failure

Description

The Python dashboard template contains an invalid NRQL query in the Log page that prevents the dashboard from being imported successfully. The query has an incomplete WHERE clause that ends with where but provides no condition, resulting in a syntax error.

Error Message:

Could not create dashboard: Input: [[PageInput: [[WidgetInput: [Error parsing 'FROM Log SELECT * where ', cause: Invalid nrql query]]]]]

Location:

  • File: dashboards/python/python.json
  • Page: "Log" (third page in the dashboard)
  • Widget: Log table widget (approximately line 1087)

Invalid Query:

FROM Log SELECT * where 

Steps to Reproduce

  1. Navigate to New Relic One dashboard (view all)
  2. Access the Python dashboard
  3. Skip the Python integration if you already did it (my case)
  4. Click in Done

Expected Behavior

The dashboard should work without any NRQL syntax errors. The Log widget should display all logs from the application.

Expected Query (one of these options):

FROM Log SELECT *

or if filtering is needed:

FROM Log SELECT * WHERE entity.name IS NOT NULL

Relevant Logs / Console output

Browser Console Error:

Error parsing 'FROM Log SELECT * where ', cause: Invalid nrql query

Full Error Context:

There was an issue while making your dashboard
Could not create dashboard: Input: [[PageInput: [[WidgetInput: [Error parsing 'FROM Log SELECT * where ', cause: Invalid nrql query]]]]]

Problematic JSON snippet from the dashboard:

{
  "title": "",
  "layout": {
    "column": 7,
    "row": 2,
    "width": 6,
    "height": 3
  },
  "linkedEntityGuids": null,
  "visualization": {
    "id": "logger.log-table-widget"
  },
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 0,
        "query": "FROM Log SELECT * where "
      }
    ]
  }
}

Your Environment

Additional context

Impact

This bug affects all users trying to use the official Python dashboard template from the New Relic quickstarts repository. The dashboard is completely unusable in its current state as it cannot be imported.

Suggested Fix

Remove the trailing where from the query in the Log page widget. Change line ~1087 in dashboards/python/python.json:

Current (broken):

"query": "FROM Log SELECT * where "

Proposed (fixed):

"query": "FROM Log SELECT *"

Additional Improvement

The widget currently has an empty title. Suggest adding a descriptive title:

"title": "All Logs"

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions