Skip to content

Impossible to query collections with hyphen in name #18

Closed

Description

@jonas-maertens-c24

Hi,

I noticed SQL queries (in Superset) with a hyphen in the collection name fail as I could not find a way to escape the hyphen.

SELECT * FROM collection-name LIMIT 100

returns

Error parsing near '-' at line 1:19

The same happens when wrapping the collection name in "`". When wrapping in double quotes ("), no data is returned.

A workaround is of course to create a view without the hyphen in the name for every affected collection, but it would be nice to have a way to use these collections directly.

Activity

  1. self-assigned this
    on Feb 10, 2026
  2. linked a pull request that will close this issue0.4.3 - Fixed bugs #20on Feb 10, 2026
  3. passren commented on Feb 10, 2026

    @passren
    Owner

    @jonas-maertens-c24 Yeah, Hyphen in table name isn't supported by PartiQL grammar. I added it into grammar as well as parser of pymongosql but still get blocked by superset parser. It seems like superset prevents special characters from table name.
    I did find the issue when handle double quotes wrapping the collection name and the issue get fixed. You can update to v0.4.3 and use double quotes on collection name if hyphen exists.

  4. jonas-maertens-c24 commented on Feb 17, 2026

    @jonas-maertens-c24
    Author

    Thanks for the quick response and fix! With v0.4.3 it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions