polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhuangmz08" <zhuangm...@qq.com>
Subject 回复: Python Interface
Date Tue, 14 Jun 2016 09:54:21 GMT
Yes, I look at the samples before. I wrote this email to ensure whether there's a format guide.

------------------ 原始邮件 ------------------
发件人: "Niclas Hedhman";<niclas@hedhman.org>;
发送时间: 2016年6月14日(星期二) 下午5:49
收件人: "dev"<dev@zest.apache.org>; 

主题: Re: Python Interface

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",
  "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.


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
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message