-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: send post-processed data in reports #15953
feat: send post-processed data in reports #15953
Conversation
@@ -637,9 +632,7 @@ def get_data(self, pk: int) -> Response: | |||
except (TypeError, json.decoder.JSONDecodeError): | |||
form_data = {} | |||
|
|||
return self.get_data_response( | |||
command, viz_type=chart.viz_type, form_data=form_data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
viz_type
is also a field in form_data
, so we just need to pass form_data
around.
Codecov Report
@@ Coverage Diff @@
## master #15953 +/- ##
==========================================
+ Coverage 76.98% 77.05% +0.07%
==========================================
Files 988 988
Lines 52378 52378
Branches 6622 6622
==========================================
+ Hits 40322 40360 +38
+ Misses 11833 11795 -38
Partials 223 223
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -55,7 +55,7 @@ | |||
|
|||
class Slice( | |||
Model, AuditMixinNullable, ImportExportMixin | |||
): # pylint: disable=too-many-public-methods | |||
): # pylint: disable=too-many-public-methods, too-many-instance-attributes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could just update the max attributes
https://github.com/apache/superset/blob/master/.pylintrc#L385
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm, I'm not sure I want to change the settings for the whole codebase. I like being conservative.
30279d2
to
e0ea3aa
Compare
* feat: send post-processed data in reports * Fix tests and lint * Use enums * Limit Slack message to 4k chars
* feat: send post-processed data in reports * Fix tests and lint * Use enums * Limit Slack message to 4k chars
* feat: send post-processed data in reports * Fix tests and lint * Use enums * Limit Slack message to 4k chars
* feat: send post-processed data in reports * Fix tests and lint * Use enums * Limit Slack message to 4k chars
SUMMARY
For text-based chart reports (pivot tables and regular tables) we want to send the data transformed, so that the user sees the same data they would see on the chart. This PR changes reports to use the new
ChartDataResultType.POST_PROCESSED
result type for that.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Here's a simple table:
Here's how the new "text" report data format looks like in Slack:
Here's how it looks like in the email:
Here's a simple pivot table:
Here's how it looks like in Slack as "text":
And email:
The CSV is also pivoted, here's an example in the email notification:
Pivot v2 looks just like Pivot v1.
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION