You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2021/08/14 01:22:52 UTC

[superset] branch master updated: fix: pivot columns with ints for name (#16259)

This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b2dffe  fix: pivot columns with ints for name (#16259)
9b2dffe is described below

commit 9b2dffeb1dbda8a3565605fc2d02fa12065f89cf
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri Aug 13 18:21:20 2021 -0700

    fix: pivot columns with ints for name (#16259)
---
 superset/charts/post_processing.py   | 2 +-
 superset/reports/commands/execute.py | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/superset/charts/post_processing.py b/superset/charts/post_processing.py
index 5265557..b80487e 100644
--- a/superset/charts/post_processing.py
+++ b/superset/charts/post_processing.py
@@ -177,7 +177,7 @@ def pivot_table_v2(  # pylint: disable=too-many-branches
         df = df.stack(0).unstack().reindex(level=-1, columns=metrics)
 
     # flatten column names
-    df.columns = [" ".join(column) for column in df.columns]
+    df.columns = [" ".join(str(name) for name in column) for column in df.columns]
 
     return df
 
diff --git a/superset/reports/commands/execute.py b/superset/reports/commands/execute.py
index e401d33..aea2ff4 100644
--- a/superset/reports/commands/execute.py
+++ b/superset/reports/commands/execute.py
@@ -182,6 +182,7 @@ class BaseReportState:
         screenshot: Optional[BaseScreenshot] = None
         if self._report_schedule.chart:
             url = self._get_url(standalone="true")
+            logger.info("Screenshotting chart at %s", url)
             screenshot = ChartScreenshot(
                 url,
                 self._report_schedule.chart.digest,
@@ -190,6 +191,7 @@ class BaseReportState:
             )
         else:
             url = self._get_url()
+            logger.info("Screenshotting dashboard at %s", url)
             screenshot = DashboardScreenshot(
                 url,
                 self._report_schedule.dashboard.digest,
@@ -235,6 +237,7 @@ class BaseReportState:
                 ) from ex
 
         try:
+            logger.info("Getting chart from %s", url)
             csv_data = get_chart_csv_data(url, auth_cookies)
         except SoftTimeLimitExceeded:
             raise ReportScheduleCsvTimeout()