Skip to content

Add support for grouping by different properties by label in Gremlin #115

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

Merged
merged 6 commits into from
Apr 29, 2021

Conversation

michaelnchin
Copy link
Member

@michaelnchin michaelnchin commented Apr 23, 2021

Issue #, if available: #97

Description of changes:

  • Enhance the Gremlin cell magic group-by parameter by allowing users to specify individual grouping behaviors for vertices that have different labels but are returned in the same set of query results.

Usage:

The variable containing the desired grouping behavior must be formatted as:

groups_var = '{"label_1":{"groupby":"property_1"},"label_2":{"groupby":"property_2"}}'

A valueMap step returning the label property and the grouping property(i.e. valueMap(true) or valueMap('~label','property_1'...)) must also be included in the query.

Example:

Screen Shot 2021-04-23 at 2 29 48 AM

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@bechbd bechbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things we probably want to think about here:

  1. We should add unit tests in here to compliment the existing ones and ensure we don't break anything here
  2. We should update the Visualization-Grouping-Coloring Notebook to include the information on how to use this feature

@bechbd bechbd self-requested a review April 29, 2021 22:56
@michaelnchin michaelnchin merged commit a36e698 into main Apr 29, 2021
@michaelnchin michaelnchin deleted the GroupPropertiesByLabel branch April 29, 2021 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants