Skip to content
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

Recent Refactor of db_engine_specs.py causes KeyError again on Redshift sources. #6162

Closed
3 tasks done
wyndhblb opened this issue Oct 22, 2018 · 5 comments
Closed
3 tasks done
Labels
inactive Inactive for >= 30 days

Comments

@wyndhblb
Copy link
Contributor

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.28.1 (and a71e6eb)

Expected results

SUM(column_name) -> sum(column_name) for redshift

Actual results

SUM(column_name) -> SUM(column_name) for redshift

Steps to reproduce

Any Vis using a redshift data source and a SUM/AVG/MAX/etc aggregate for values.

Traceback (most recent call last):
  File "/data/superset/superset/views/core.py", line 1153, in generate_json
    payload = viz_obj.get_payload()
  File "/data/superset/superset/viz.py", line 373, in get_payload
    payload['data'] = self.get_data(df)
  File "/data/superset/superset/viz.py", line 1214, in get_data
    df = self.process_data(df)
  File "/data/superset/superset/viz.py", line 1134, in process_data
    values=self.metric_labels)
  File "/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py", line 5303, in pivot_table
    margins_name=margins_name)
  File "/usr/local/lib/python3.6/dist-packages/pandas/core/reshape/pivot.py", line 61, in pivot_table
    raise KeyError(i)
KeyError: 'SUM(num_chats)'

Seems the fix in #5337 got recently removed by a165aec#diff-6519edc75f2440a575cb22492f401100 (#5467) due to a refactor, however, the logic to push these string column changes back to "viz.py" is now different and re-stating the "normalize_column_name" change

@simond
Copy link

simond commented Nov 6, 2018

The fix #4994 looks like it has also been removed due to the refactor in #5467 and now I'm experiencing the issues with Snowflake raised originally as #4662. (edit) Looks like there is a pull request for a fix to this here: #5686

@slotrans
Copy link

slotrans commented Nov 8, 2018

I'm experiencing this too. It makes Redshift completely unusable since no aggregate expression ever works.

@stale
Copy link

stale bot commented Apr 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 10, 2019
@totogo
Copy link

totogo commented Apr 15, 2019

I got this issue in 0.29.0rc7

@stale stale bot removed the inactive Inactive for >= 30 days label Apr 15, 2019
@stale
Copy link

stale bot commented Jun 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Jun 14, 2019
@stale stale bot closed this as completed Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

4 participants