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
Fix set feature for data blending #309
Conversation
are later used for knowing which columns to query on the respective primary and secondary datasets, given the | ||
columns selected for the blender dataset. | ||
|
||
:param blender: A DataSetBlender instance. |
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.
You probably want to rename this parameter.
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.
Good catch. I'll do.
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.
Fixed.
primary_dataset_fields = set(apply_set_dimensions(primary_dataset.fields, filters, primary_dataset)) | ||
secondary_dataset_fields = set(apply_set_dimensions(secondary_dataset.fields, filters, secondary_dataset)) | ||
|
||
primary_dimension_per_blender_dimension = dict(_map_field( |
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.
Not sure if I prefer this name over blender_to_primary_field_map
, I find it a bit confusing. Also, does it only contain dimensions?
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.
Not only. Haha, I was renaming it as you commented on this.
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.
I've reverted that.
Can you also make sure that you tested it for more than 1 linked dataset? If it works out of the box it probably doesn't need an automated test. |
840f7ed
to
24532ac
Compare
I've added tests with a tertiary dataset being blended. |
This fixes set feature for data blending. I've tested the use cases of using a dimension, a metric and a metric that is also being displayed. Please check tests to see how blending sql is being formatted.