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

Delete Vertex with label specified in CSV #131

Closed
goranc opened this issue Apr 27, 2021 · 2 comments
Closed

Delete Vertex with label specified in CSV #131

goranc opened this issue Apr 27, 2021 · 2 comments

Comments

@goranc
Copy link

goranc commented Apr 27, 2021

When I specify - (minus) :LABEL in CSV file for import what is the meaning of the other TAG values specified ?

In my test case when there is VertexID and TAG value specified for delete, you will expect that for specific VertexID and that TAG data will be deleted,
but that is not the case, all TAG values are deleted, so complete Vertex is deleted.

As I can find in documentation for Nebula that only DELETE Vertex is supported, not specific TAG for Vertex
I will expect that you can't delete specific TAG for Vertex and leave other TAG untouched, so this :LABEL with TAG values is misleading, because importer will delete complete Vertex for ID specified.

@wey-gu
Copy link
Contributor

wey-gu commented Apr 28, 2021

Dear Goranc,

Thank you!

When it comes to +/- in :LABEL, the object that the importer handles to a CSV row insert/delete action on the row's importer type: a vertex or an edge, where<TAG>.<Property> in the header here are about vertex's property under a TAG, thus, you are right, all information from items/column data here for delete case is not being considered/ needed(because vid is sufficient to identify them when deleting a vertex), thus it's possible to confuse for the case:

  • When a user assembles lines with -, vid, and <TAG>.<Property>, it's possibly considered the semantic of removing vertices' Property from them, rather than realizing importer are actually dealing with vertex/edge entities.

If I understand it correctly, maybe a notice could be added to remind the user of this to avoid misunderstanding.

Also, apart from this (by nature, importer handles vertex/edge per row in semantic), do you have the needs of batch processing on only removing TAG from specific vertices(rather than all ones with this TAG)? If so, would you mind raise the issue on nebula-graph to describe your requirement and backgrounds for this? In case that is introduced in the future, maybe another importer type could be introduced accordingly to fulfill this requirement if you have now.

For the case that you would like to remove TAG from all vertices, DROP TAG would be enough, which I think you already know about it, just mention for the safe side. :)

Also, thank you again for raising hands here to help the community better ❤,and I totally understand the intuition of considering deleting(-) only specific TAG(rather than all), it's coz you understood that it's stored in separated keys underlying for different tags per vertex(https://docs.nebula-graph.io/manual-EN/1.overview/3.design-and-architecture/2.storage-design/ )

@wey-gu
Copy link
Contributor

wey-gu commented Jul 16, 2021

Will close it as it's been inactive for days. Feel free to reopen it.

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

No branches or pull requests

2 participants