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

Filter by lookup #4812

Closed
3 tasks done
KostasChr opened this issue Apr 12, 2018 · 3 comments
Closed
3 tasks done

Filter by lookup #4812

KostasChr opened this issue Apr 12, 2018 · 3 comments
Labels
inactive Inactive for >= 30 days

Comments

@KostasChr
Copy link

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.22.1

Expected results

When using a registered lookup as a dimension (using the dimensionSpec) we should be able to filter by it.

Actual results

When applying the filter we got no data as a result.

@SpyderRivera
Copy link
Contributor

SpyderRivera commented Apr 30, 2018

I am getting similar results for Druid data sources only I didn't realize it until I tried to look at the == results instead on !=. I'm on version v0.24.0. For some reason, the filter is not being applied correctly. I looked at the query that is generated and the lookup is passed and the filter is also applied in the query. This makes me think it is something on the druid end or how exactly the query is formed.
Possible solutions in fixing the query building piece:

The former is slightly more performant.

@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. 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 Apr 10, 2019
@stale stale bot closed this as completed Apr 18, 2019
@stelios313
Copy link

Dealing with the same issue when trying to filter with lookup, however the error i am getting is relevant to pydruid|:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 417, in get_df_payload df = self.get_df(query_obj) File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 202, in get_df self.results = self.datasource.query(query_obj) File "/usr/local/lib/python3.6/site-packages/superset/connectors/druid/models.py", line 1372, in query query_str = self.get_query_str(client=client, query_obj=query_obj, phase=2) File "/usr/local/lib/python3.6/site-packages/superset/connectors/druid/models.py", line 984, in get_query_str return self.run_query(client=client, phase=phase, **query_obj) File "/usr/local/lib/python3.6/site-packages/superset/connectors/druid/models.py", line 1200, in run_query filters = DruidDatasource.get_filters(filter, self.num_cols, columns_dict) File "/usr/local/lib/python3.6/site-packages/superset/connectors/druid/models.py", line 1548, in get_filters alphaNumeric=is_numeric_col, File "/usr/local/lib/python3.6/site-packages/pydruid/utils/filters.py", line 87, in __init__ "ordering": args["ordering"], KeyError: 'ordering'

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

3 participants