Hi Jochen,
Your understanding is correct.
A bit of technical background: in the platform we store data in contexts (i.e. RDF statements are persisted as quads in a named graph). We distinguish user contexts and system contexts.
For bootstrapping we use a ‘repeatable’ context identifier (basically composed from the dbBootstrap file name) to allow for replacing previous content, i.e. as you stated: in an upgrade of a dbBootstrap the entire previous context is deleted and then replaces with the new data from the RDF dump file.
For providers (in the default configuration, see hint later) we use a similar strategy: each provider run replaces the entire previous data with the result of the gathering process. This is achieved by identifying the contexts via the context source, i.e. the provider is the context source of the respective context. Now the advanced behavior: we support different kind of write strategies which may behave differently. An example is the built-in delta write strategy which does not replace the entire context, but only persists the delta (to reduce the write workload on the database). See the provider documentation for details on this.
The third case is importing data (e.g. from the UI via Admin:Import): also here data is always loaded into a specific context, optionally a target context provided by the user. The import is a simple loading process, i.e. no data is deleted. If you want to replace the data, the old context needs to be deleted beforehand (* Site note: a single named graph, i.e. context, can hold the same triple, i.e. subject, predicat, object, only once). This can be done in the UI from the Admin:ContentOverview page or automated from code using the ReadWriteDataManager delete context method (if you know the URI of the context), i.e. in an upgrade handler.
Hope this answers your questions. If something is unclear, please send a short mail.
Best,
Andreas
--
You received this message because you are subscribed to the Google Groups "Information Workbench Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
iwb-discussio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Jochen,
I created an enhancement request for this in the backlog which we will discuss with product management.
For your use-case of patching a staging / production system I would suggest to go for a different workflow.
You can make use of the solution / app mechanism also for this use case: just create a zip archive with the following structure:
- MyAppDataPatch.zip
- data
- dbBootstrap
- myDataDump.ttl
Optionally you can provide solution.properties or metadata for version.
If you now install this app (e.g. at runtime from the Admin:Apps dashboard) the entire context of the data (i.e. in the same way as with the regular dbBootstrap) will be replaced with the new content.
Note that this is repeatable, just re-create different versions of your patch app (i.e. the zip file).
If you want you can also automate this with your build scripts to create such patch artifacts.
Best,
Andreas
Von: iwb-dis...@googlegroups.com [mailto:iwb-dis...@googlegroups.com]
Im Auftrag von Jochen Zehnder
Gesendet: Freitag, 4. August 2017 17:50
An: Information Workbench Discussions <iwb-dis...@googlegroups.com>
--