Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

"Error binding parameter 0 - probably unsupported type" when querying cached results from MongoDB in Redash v25.1.0 #7384

Copy link
Copy link
Open
@bulkinav

Description

@bulkinav
Issue body actions

Redash Version: 25.1.0

Environment:

  • Self-hosted
  • MongoDB data source

Issue Summary:
After upgrading to Redash v25.1.0, queries that reference cached query results (such as query_XXX tables created from MongoDB sources) fail with the following error:

Error running query: Error binding parameter 0 - probably unsupported type.

Direct MongoDB queries run successfully without errors, but when cached query results (query_XXX) are used, even simple queries consistently fail.

Steps to Reproduce:

  1. Create a MongoDB aggregation query and save results as a cached query (query_XXX).
  2. Attempt to execute a simple SQL query against the cached result, e.g.:
SELECT * FROM query_XXX LIMIT 10;
  1. Observe the error.

MongoDB Aggregation Example Causing Issue:

{
  "collection": "devices",
  "aggregate": [
    { "$match": { "cr_time": { "$gt": { "$humanTime": "2024-01-01 00:00" }}, "msisdn": { "$type": 2 }}},
    { "$project": { "cr_time": 1, "msisdn": { "$toString": "$msisdn" }, "client": { "$toString": "$client" }}}
  ]
}

Expected Results:
Queries referencing cached MongoDB results execute without errors.

Actual Results:
Queries referencing cached MongoDB results fail consistently with:

Error running query: Error binding parameter 0 - probably unsupported type.

Attempted Workarounds (unsuccessful):

  • Explicitly casting fields to strings in MongoDB ($toString, $convert).
  • Creating intermediate SQL tables with explicit type casting.
  • Restarting Redash services.

Additional Information:

  • Direct queries to MongoDB execute successfully.
  • Error occurs only when referencing cached query results.

Request:
Please investigate the underlying issue with cached query result handling from MongoDB in Redash v25.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.