polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Python Interface
Date Tue, 14 Jun 2016 09:49:28 GMT
Pandas DataFrame ??? No idea what that is...

We have not written a Guide for the internal storage format of the
MapEntityStore or even the ValueSerialization subsystem.

But it is very straight forward; There are a handful of fields in the
"root" object, i.e. metadata about the object, such as identity,
lastModified, version number and so on. Then there are four fields in the
root object named; properties, assocations, manyassociations,
namedassociations, which contains entries with the "name" (the method name)
as the key and the value being the serialized form of each of those states.

It is pretty clear if you look at a capture sample;

{
  "associations": {},
  "identity": "97d21d04-58c4-44a9-bd6c-1f861cf0a1f9-0",
  "modified": 1465718396917,
  "namedassociations": {},
  "type": "org.apache.zest.index.solr.SolrQueryServiceTest$TestEntity",
  "version":
"MemoryEntityStoreService-d10f4fd5-da9a-4e56-9476-a1750c9509f10",
  "manyassociations": {},
  "properties": {
    "identity": "97d21d04-58c4-44a9-bd6c-1f861cf0a1f9-0",
    "name": "Hello World"
  },
  "application_version": "1.0"
}

In this example, there are no associations, but they are referencing
Identities, directly, List or Map form. The properties here are very
simple, only a
    Property<String> identity();  // part of the Identity interface
    Property<String> name();  // from somewhere...

So, to use this in another platform should be pretty simple if there is
JSON support.

Indexing format is a lot more complex, and is very different between
Indexing engines. There is no equivalent "unifying" intermediary, as we
have in the MapEntityStore.


Cheers
Niclas

On Tue, Jun 14, 2016 at 3:37 PM, zhuangmz08 <zhuangmz08@qq.com> wrote:

> Hi,
>
>
> I have some written python scripts, which consums data from former
> database. Now, I would like to switch the former database into a domain
> designed database, which is the mongo Map Entity Store. And I also like to
> use ONLY one domain model across multi language platform.
> I have some follwing questions:
> 1. Is there any exist python interface to read database into pandas
> DataFrame? I'm afraid not....
> 2. If I write my own python interface, I would have to know the Entity
> Format, since my interface exposes to this format. Is there explicit format
> guide?
>
>
> Thanks a lot.




-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message