Skip to content

Add Gremlin group-by-depth #251

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 4 commits into from
Feb 4, 2022
Merged

Add Gremlin group-by-depth #251

merged 4 commits into from
Feb 4, 2022

Conversation

michaelnchin
Copy link
Member

@michaelnchin michaelnchin commented Jan 26, 2022

Issue #, if available: #147

Description of changes:

  • Added ability to group on node depth for visualizations of Gremlin queries. This requires that the query results are returned as a set of paths, each of which must start with the origin node/edge of the connected sub-graph. To group on depth, users can specify -gd/--group-by-depth with %%gremlin.
  • Also added the --group-by-depth explicit option to %%opencypher.

Example usage:
Screen Shot 2022-01-26 at 2 08 23 PM

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

Copy link
Contributor

@krlawrence krlawrence left a comment

Choose a reason for hiding this comment

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

Looks good

I was not quite sure how -g TRAVERSAL_DEPTH is supposed to work.

@michaelnchin
Copy link
Member Author

michaelnchin commented Feb 4, 2022

TRAVERSAL_DEPTH is a special flag for --group-by that indicates to group by depth; --group-by-depth is internally translated to -g TRAVERSAL_DEPTH by GremlinNetwork. Similarly, the existing --group-by-raw option is translated to -g __RAW_RESULT__, and both will produce identical output. I do recognize that these non-explicit options are a bit convoluted and unlikely to see use, so I'll remove them from the initial comment.

@michaelnchin michaelnchin merged commit 659b590 into main Feb 4, 2022
@michaelnchin michaelnchin deleted the gremlin-group-by-depth branch February 4, 2022 22:44
charlesivie added a commit that referenced this pull request Feb 22, 2022
* added RDF ML notebooks

* cleaning up the code a bit

* completed regression and classification for SPARQL ML

* added RDF ML notebooks

* cleaning up the code a bit

* completed regression and classification for SPARQL ML

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* Rename gremlin profile args for clarity (#249)

Co-authored-by: Michael Chin <chnmch@amazon.com>

* Add --results-per-page query option (#242)

* Add -r option

* Replace interval value

* Add upper limit

Co-authored-by: Michael Chin <chnmch@amazon.com>

* Pin ipython<7.17.0 to patch vulnerability (#250)

Co-authored-by: Michael Chin <chnmch@amazon.com>

* Disable root logger output (#248)

Co-authored-by: Michael Chin <chnmch@amazon.com>

* Fix OC Bolt metadata (#255)

* Fix OC Bolt query metadata output

* Add OC metadata tests

Co-authored-by: Michael Chin <chnmch@amazon.com>

* Add groupby raw node result option (#253)

* Add --group-by-raw query option

* Add unit tests

Co-authored-by: Michael Chin <chnmch@amazon.com>

* Add Gremlin group-by-depth (#251)

* Add --group-by-depth to Gremlin, modify OC with same explicit param

* Add tests

* PEP8 fixes

Co-authored-by: Michael Chin <chnmch@amazon.com>

* addressing comment left in PR #252 related to better conditional statements

* Update ChangeLog.md

* Suffix all doubles with d. Node batch reduced to 40 (#257)

* Suffix all doubles with d. Node batch reduced to 40

* Update changelog for seed file changes

* Update ChangeLog.md

* Update ChangeLog.md

Co-authored-by: Michael Chin <mchin188@yahoo.com>

* Convert Decimal type results to float for Gremlin (#256)

* Convert Decimal type values in GremlinNetwork

* replace star import

* Revert temp test change

* Convert decimal type edge properties

* Update Changelog

Co-authored-by: Michael Chin <chnmch@amazon.com>

* removed hard coded genre deletes, and moved them into the notebook.

* removed hard coded genre deletes, and moved them into the notebook.

* removed hard coded ciritcScore deletes, and moved them into the notebook.

* removed hard coded link prediction retractions, and moved them into the notebook.

* completed the Getting Started notebook with the pretrained models.

* completed the Getting Started notebook with the pretrained models.

* added RDF ML notebooks

* cleaning up the code a bit

* completed regression and classification for SPARQL ML

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* added RDF ML notebooks

* cleaning up the code a bit

* completed regression and classification for SPARQL ML

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* Complete notebooks for SPARQL Classification - Regression and Link Prediction

* addressing comment left in PR #252 related to better conditional statements

* removed hard coded genre deletes, and moved them into the notebook.

* removed hard coded genre deletes, and moved them into the notebook.

* removed hard coded ciritcScore deletes, and moved them into the notebook.

* removed hard coded link prediction retractions, and moved them into the notebook.

* completed the Getting Started notebook with the pretrained models.

* completed the Getting Started notebook with the pretrained models.

* tests passing for new SPARQL ML notebooks

* Added detail fo new SPARQL/RDF ML notebooks to the change log

* fixed bugs in link prediction, amde small improvements after review

* updated location of pre-trained models

Co-authored-by: Michael Chin <mchin188@yahoo.com>
Co-authored-by: Michael Chin <chnmch@amazon.com>
Co-authored-by: Kelvin Lawrence <gfxman@yahoo.com>
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