You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jvines (via GitHub)" <gi...@apache.org> on 2025/11/03 20:01:01 UTC
Re: [I] BigQuery errors when filters on text columns have apostrophes in them [superset]
jvines commented on issue #35857:
URL: https://github.com/apache/superset/issues/35857#issuecomment-3482322283
@rusackas I just migrated to superset 5 and the problem is even worse... I can't filter at all
<img width="1843" height="572" alt="Image" src="https://github.com/user-attachments/assets/fa497704-cec7-40bb-b94f-a8075d53f9dd" />
When removing the filter the dashboard works normally:
<img width="1856" height="645" alt="Image" src="https://github.com/user-attachments/assets/d9e32438-2800-476d-b66a-4ca776fe83ae" />.
Here's the traceback from the logs:
```
Traceback (most recent call last):
File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/app/.venv/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/app/.venv/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 120, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1369, in time_function
response = func(*args, **kwargs)
File "/app/superset/utils/log.py", line 304, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/data/api.py", line 260, in data
return self._get_data_response(
File "/app/superset/utils/log.py", line 304, in wrapper
value = f(*args, **kwargs)
File "/app/superset/charts/data/api.py", line 423, in _get_data_response
result = command.run(force_cached=force_cached)
File "/app/superset/commands/chart/data/get_data_command.py", line 45, in run
payload = self._query_context.get_payload(
File "/app/superset/common/query_context.py", line 102, in get_payload
return self._processor.get_payload(cache_query_context, force_cached)
File "/app/superset/common/query_context_processor.py", line 752, in get_payload
query_results = [
File "/app/superset/common/query_context_processor.py", line 753, in <listcomp>
get_query_results(
File "/app/superset/common/query_actions.py", line 227, in get_query_results
return result_func(query_context, query_obj, force_cached)
File "/app/superset/common/query_actions.py", line 103, in _get_full
payload = query_context.get_df_payload(query_obj, force_cached=force_cached)
File "/app/superset/common/query_context.py", line 123, in get_df_payload
return self._processor.get_df_payload(
File "/app/superset/common/query_context_processor.py", line 162, in get_df_payload
query_result = self.get_query_result(query_obj)
File "/app/superset/common/query_context_processor.py", line 265, in get_query_result
result = query_context.datasource.query(query_object.to_dict())
File "/app/superset/connectors/sqla/models.py", line 1716, in query
query_str_ext = self.get_query_str_extended(query_obj)
File "/app/superset/models/helpers.py", line 888, in get_query_str_extended
sql = self.database.compile_sqla_query(
File "/app/superset/models/core.py", line 746, in compile_sqla_query
sql = str(qry.compile(engine, compile_kwargs={"literal_binds": True}))
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 503, in compile
return self._compiler(dialect, **kw)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 567, in _compiler
return dialect.statement_compiler(dialect, self, **kw)
File "/app/.venv/lib/python3.10/site-packages/pybigquery/sqlalchemy_bigquery.py", line 222, in __init__
super(BigQueryCompiler, self).__init__(dialect, statement, *args, **kwargs)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 809, in __init__
Compiled.__init__(self, dialect, statement, **kwargs)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 464, in __init__
self.string = self.process(self.statement, **compile_kwargs)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 499, in process
return obj._compiler_dispatch(self, **kwargs)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py", line 82, in _compiler_dispatch
return meth(self, **kw)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 3543, in visit_select
text = self._compose_select_body(
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 3704, in _compose_select_body
t = self._generate_delimited_and_list(
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 1746, in _generate_delimited_and_list
return clauses[0]._compiler_dispatch(self, **kw)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py", line 82, in _compiler_dispatch
return meth(self, **kw)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 1765, in visit_clauselist
return self._generate_delimited_list(clauselist.clauses, sep, **kw)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 1731, in _generate_delimited_list
return separator.join(
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 1731, in <genexpr>
return separator.join(
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 1733, in <genexpr>
for s in (c._compiler_dispatch(self, **kw) for c in elements)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py", line 82, in _compiler_dispatch
return meth(self, **kw)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 2268, in visit_binary
return disp(binary, operator_, **kw)
File "/app/.venv/lib/python3.10/site-packages/pybigquery/sqlalchemy_bigquery.py", line 313, in visit_in_op_binary
self._generate_generic_binary(binary, " IN ", **kw)
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/compiler.py", line 2334, in _generate_generic_binary
+ binary.right._compiler_dispatch(
File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py", line 82, in _compiler_dispatch
return meth(self, **kw)
File "/app/.venv/lib/python3.10/site-packages/pybigquery/sqlalchemy_bigquery.py", line 437, in visit_bindparam
assert_(self.__expanded_param(param), f"Unexpected param: {param}")
File "/app/.venv/lib/python3.10/site-packages/pybigquery/sqlalchemy_bigquery.py", line 63, in assert_
raise AssertionError(message)
AssertionError: Unexpected param: ('Ambiente demo Gonzalo SAC')
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org