question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use wildcard in SQL Lab

See original GitHub issue

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven’t found one similar

Superset version

"version": "0.15.4"

Expected results

WHERE query LIKE ('%ocsp%') matches foo.ocsp and also matches ocsp.bar

Actual results

(_mysql_exceptions.ProgrammingError) %o format: a number is required, not dict

Steps to reproduce

In SQL Lab run a search such as: SELECT DISTINCT LOWER(QUERY), COUNT FROM pdns WHERE query LIKE ('%ocsp%') ORDER BY count DESC limit 15;

of note the exact same query runs without issue directly against MySQL

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mistercrunchcommented, Jan 31, 2019

@amalakar this is a bit tricky because different dbapi implementations behave differently around parameterization. We probably need a new method in db_engine_spec to manage driver-specific logic around this.

0reactions
stale[bot]commented, Apr 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to use wildcard in SQL Lab #2061 - apache/superset
In SQL Lab run a search such as: SELECT DISTINCT LOWER(QUERY), COUNT FROM pdns WHERE query LIKE ('%ocsp%') ORDER BY count DESC limit...
Read more >
SQL wildcard not producing any results - Stack Overflow
Wildcards work with LIKE , not IN . You could concatenate the values together: WHERE CONCAT(Scopes.Name, Brands.Extension, Sites.ID, Sites.
Read more >
SQL query tutorial (wildcard queries) - YouTube
From chapter 2.2 of Beginning SQL Joes 2 Pros (www.joes2pros.com). How to use range and pattern matches in a basic single table query...
Read more >
DOS ATTACKS USING SQL WILDCARDS - Portcullis Labs
This paper discusses abusing Microsoft SQL Query wildcards to consume CPU in database servers. This can be achieved using only the search field...
Read more >
Overview of the SQL LIKE Operator - SQLShack
Let us walk-through the SQL statements using the LIKE keyword and wildcard characters. So, let's get started learning about SQL LIKE operator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found