-
Notifications
You must be signed in to change notification settings - Fork 62
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
Deleting a graph from PropertyGraphDataSource #930
Comments
Hello @goshaQ and thanks for reaching out to us. I agree that the store-delete-store probably should be reconsidered in the scenario you describe. However, it isn't exactly the expected way of working with the PGDSs, as storing a graph typically is a costly operation. Could you tell us a little bit more about your use case for this order of operations? In the current design, we require a fixed way of viewing the entirety of a Neo4j database as a graph, and we must choose a name for this. This name may then not be used by any subgraph, because if we allowed that it wouldn't be clear which one you would get when referencing the name; the union of all the subgraphs (e.g. entire graph) or just that one subgraph. In order to preserve the notion of the Neo4j database as one large graph, we need to reserve a name for this purpose. In summary, I would agree with the following changes:
Does this sound sensible to you? |
Thanks for your reply @Mats-SX ! I discovered the problem when experimented with the final export stage of the processing pipeline. In particular, the exception appeared during integration test, where a small amount of enriched data is expected to be written into Neo4j and at the end of the test removed. The listed changes sound perfect to me! |
The deleteGraph method doesn't take into account created constraints on the metaLabel. Problem is that
DETACH DELETE
doesn't remove associated constraints and indexes. That causes an error when a PropertyGraph with the same name is deleted and written back again. See the following example:That causes the following exception:
Moreover, it doesn't allow write a PropertyGraph with
entireGraphName
, which makes no sense to me. What if I would like just store everything to the database and never restore that PropertyGraph (so metaLabel and related properties, i.e.___morpheusID
are not desired to be saved), because I have other data sources and graph database is the destination of the processed data?The text was updated successfully, but these errors were encountered: