[Cubicweb] ZMQ? incremental data import
Dimitri Papadopoulos Orfanos
dimitri.papadopoulos at cea.fr
Mon Sep 23 16:01:49 CEST 2013
We are trying to write a Python script to add data to a CubicWeb
instance, in an incremental and automated way.
Our start point is this mass import script:
This script is using cubicweb.dataimport.SQLGenObjectStore. It is
designed to run under command "cubicweb-ctl shell".
We need to change two things:
* avoid cubicweb.dataimport because an incremental script should not to
bypass hooks and other CubicWeb security and consistency mechanisms,
* use ZMQ instead of "cubicweb-ctl shell" to be able to push data from a
workstation to a distant CubicWeb server.
We used to create instances and relations using the create_entity() and
relate() functions of SQLGenObjectStore.
Where do we find functionality equivalent to SQLGenObjectStore?
Here is what we have found so far:
* Function dbapi.connect() returns a "Connection" object.
* The Connection class is described here:
* We had a look at the Request class but are unable to understand the
Which object should we operate on? Is there no store available? Where do
we find functions equivalent to create_entity() and relate()? Do we have
to use RQL? SHoudl we stick to SQLGenObjectStore?
F-91191 Gif-sur-Yvette cedex, France
More information about the Cubicweb