mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat(advanced analysis): support MultiIndex column in post processing stage (#19116)
This commit is contained in:
@@ -36,7 +36,11 @@ from superset.common.utils import dataframe_utils as df_utils
|
||||
from superset.common.utils.query_cache_manager import QueryCacheManager
|
||||
from superset.connectors.base.models import BaseDatasource
|
||||
from superset.constants import CacheRegion
|
||||
from superset.exceptions import QueryObjectValidationError, SupersetException
|
||||
from superset.exceptions import (
|
||||
InvalidPostProcessingError,
|
||||
QueryObjectValidationError,
|
||||
SupersetException,
|
||||
)
|
||||
from superset.extensions import cache_manager, security_manager
|
||||
from superset.models.helpers import QueryResult
|
||||
from superset.utils import csv
|
||||
@@ -196,7 +200,11 @@ class QueryContextProcessor:
|
||||
query += ";\n\n".join(queries)
|
||||
query += ";\n\n"
|
||||
|
||||
df = query_object.exec_post_processing(df)
|
||||
# Re-raising QueryObjectValidationError
|
||||
try:
|
||||
df = query_object.exec_post_processing(df)
|
||||
except InvalidPostProcessingError as ex:
|
||||
raise QueryObjectValidationError from ex
|
||||
|
||||
result.df = df
|
||||
result.query = query
|
||||
|
||||
Reference in New Issue
Block a user