OK - am on 7.2 I see how that works - for a static function.
If I have a complex function I want to send parameters to, do I wrap that target function in an anonymous function that passes the parameters I want? _______________________________________________________ kind regards *Rob Atkinson* Lead Ontologist, Knowledge Architect at SURROUND Australia Pty Ltd Address Level 9, Nishi Building, 2 Phillip Law Street; New Acton Canberra Australia 2601 Phone + <http://++61+466+491+056/>61 419 202 973 Email [email protected] https://www.surroundaustralia.com *Enhancing Intelligence Within Organisations* *delivering evidence that connects decisions to outcomes* *Copyrights:* SURROUND Australia Pty Ltd is the copyright owner of all original content and attachments. All rights reserved. *Confidentiality Notice:* The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it is addressed, and may also be privileged. If you are not the addressee of this e-mail, you may not copy, forward, disclose, or otherwise use it or any part of it or its attachments in any form whatsoever. If you have received this e-mail in error, please e-mail the sender by replying to this message. On Mon, 9 May 2022 at 17:06, Holger Knublauch <[email protected]> wrote: > Hi Rob, > > you'll need 7.2 for this, using graph.transaction. Example: > > let result = graph.withDataGraph('http://uri.of.example.graph/toUpdate', > 'Some log message', () => { > owl.Thing.add(rdfs.comment, 'Added this comment'); > return 'whatever'; > }); > > This will switch to the first argument as the active graph for the > transaction. The second argument can be a log message for the change > history. The 3rd argument is the callback function which is the body of the > transaction. Here you have the new active graph and can add or delete > triples etc. You could also check constraints and decide not to proceed by > throwing an exception, i.e. not committing the transaction. > > Prior to 7.1 graph.withDataGraph *probably* worked somehow, but that would > be a hack and wouldn't properly support transactions etc. > > Holger > > > On 2022-05-09 4:57 pm, Rob Atkinson wrote: > > Hi > > trying to find examples to understand options for inserting into a named > graph.. > > I have a situation where I need to process a graph and send data to > multiple related graphs > > ADS offers me the "withDataGraph" that calls a function with no > parameters... > > seems like it might be relevant to use that and update... > > not sure how I invoke the function I want to call with the parameters I > need to send however? > > I can force access to a sparql endpoint as in > > https://www.topquadrant.com/doc/7.1/user_guide/working_with_asset_collections/using_sparql_to_query_and_modify_data.html?highlight=insert > > might work if all my data is a simply query/insert - in a parameterless > function, but I would like to have the option of manipulating data in ADS > and potentially introducing external lookup, validation after > transformation and/or human review activities. > > I probably want to use transaction() eventually if I encounter some error. > > What is available -- or if not what approach fits into the EDG > architecture best? > > > -- > You received this message because you are subscribed to the Google Groups > "TopBraid Suite Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/3868b242-d714-4a4c-a837-03a6ad7061d4n%40googlegroups.com > <https://groups.google.com/d/msgid/topbraid-users/3868b242-d714-4a4c-a837-03a6ad7061d4n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to a topic in the > Google Groups "TopBraid Suite Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/topbraid-users/YvSvV4uR5gk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/73f52167-ede7-4a7c-0344-64f9653e9982%40topquadrant.com > <https://groups.google.com/d/msgid/topbraid-users/73f52167-ede7-4a7c-0344-64f9653e9982%40topquadrant.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAOBWeKtWnEHJwG-cRhgnJ8aB2R20dSwPOwfVhVAAsB435oEySw%40mail.gmail.com.
