apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.62k stars 13.82k forks source link

Dynamically Filter not working (only happen with more than 1000 values) #22626

Closed enzo-dechaene closed 8 months ago

enzo-dechaene commented 1 year ago

How to reproduce the bug

  1. Create a Dashboard
  2. Click on 'Filters => add filter
  3. Scroll down to 'Filter Settings'
  4. Click on 'Dynamically search all filter values' (only for filters with more than 1000 values)
  5. Write any text on the filter value
  6. See error

Expected results

It suppose to display the list of values in response of the regex string

Actual results

Actually return an sql error.

Here is the query doing by the worker :

Query SELECT libelleSite FROM "indicateur-compte-v2"."indicateur-compte-v2" WHERE libelleSite != 'null' AND lower(libelleSite) LIKE lower('%Lyc%') GROUP BY libelleSite ORDER BY libelleSite ASC LIMIT 1000 on schema indicateur-compte-v2 failed

Here is the stacktrace inside log of the worker : [2023-01-05 20:21:34,811: ERROR/MainProcess] Task load_chart_data_into_cache[f87746c9-1f4c-43e7-be81-3b542fb8736e] raised unexpected: Error: unsupported format character 'y' (0x79) at index 145 Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task R = retval = fun(*args, **kwargs) File "/app/superset/initialization/__init__.py", line 105, in __call__ return task_base.__call__(self, *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__ return self.run(*args, **kwargs) File "/app/superset/tasks/async_queries.py", line 102, in load_chart_data_into_cache raise ex File "/app/superset/tasks/async_queries.py", line 84, in load_chart_data_into_cache result = command.run(cache=True) File "/app/superset/charts/data/commands/get_data_command.py", line 52, in run raise ChartDataQueryFailedError(f"Error: {query['error']}") superset.charts.commands.exceptions.ChartDataQueryFailedError: Error: unsupported format character 'y' (0x79) at index 145

Screenshots

screenshot-eclat-bfc analytics skolengo com-2023 01 05-15_18_34

screenshot-eclat-bfc analytics skolengo com-2023 01 05-15_19_03

Environment

Checklist

Make sure to follow these steps before submitting your issue - thank you!

rusackas commented 8 months ago

Closing this as stale since it's been silent for so long, and we're trying to steer toward a more actionable Issues backlog. If people are still encountering this in current versions (currently 3.x) please re-open this issue, open a new Issue with updated context, or raise a PR to address the problem. Thanks!