You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2022/08/09 14:30:48 UTC
[superset] 01/01: add logging to see query data on apply_post
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh-fix-key-alerts
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 321d878e97d91ec1dd3dc5531042b04651bacd67
Author: hughhhh <hu...@gmail.com>
AuthorDate: Tue Aug 9 10:30:30 2022 -0400
add logging to see query data on apply_post
---
superset/charts/post_processing.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/superset/charts/post_processing.py b/superset/charts/post_processing.py
index 81d2a09b04..cab55ee80b 100644
--- a/superset/charts/post_processing.py
+++ b/superset/charts/post_processing.py
@@ -26,6 +26,7 @@ In order to do that, we reproduce the post-processing in Python
for these chart types.
"""
+import logging
from io import StringIO
from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING
@@ -42,6 +43,8 @@ from superset.utils.core import (
if TYPE_CHECKING:
from superset.connectors.base.models import BaseDatasource
+logger = logging.getLogger(__name__)
+
def get_column_key(label: Tuple[str, ...], metrics: List[str]) -> Tuple[Any, ...]:
"""
@@ -331,6 +334,7 @@ def apply_post_process(
# do not try to process empty data
continue
+ logger.info("Running apply_post_process on QUERY: %s", query)
if query["result_format"] == ChartDataResultFormat.JSON:
df = pd.DataFrame.from_dict(query["data"])
elif query["result_format"] == ChartDataResultFormat.CSV: