Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B5934200AF7 for ; Tue, 14 Jun 2016 12:02:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B2836160A47; Tue, 14 Jun 2016 10:02:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D67A01602C5 for ; Tue, 14 Jun 2016 12:02:18 +0200 (CEST) Received: (qmail 65307 invoked by uid 500); 14 Jun 2016 10:02:18 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 65280 invoked by uid 99); 14 Jun 2016 10:02:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2016 10:02:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 492C61806D1 for ; Tue, 14 Jun 2016 10:02:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.299 X-Spam-Level: * X-Spam-Status: No, score=1.299 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id tmbtKhoOXj_F for ; Tue, 14 Jun 2016 10:02:15 +0000 (UTC) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id DE68960CE5 for ; Tue, 14 Jun 2016 10:02:12 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id p204so248543507oih.3 for ; Tue, 14 Jun 2016 03:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=Dkpd7JwG/qJ3P0CpMlrm4HzNE7EIP7Or+B3C45NT3l0=; b=XVwrED/Tpk2Ve2PtX6KLYMU3q72RA/o8BLFpqanpirR/EoxsNsrCrSFDhfnPs8vgMR c2mcp0kA06BEqUIZnw7teTxZUYJn0aI8cDZeGMTzhrRg7alUXAAOlYf4e987IBOJ/y0k 8NekghE1XPTR9XZvmi2oGN5pKxkHu5nCQo3CqoaCk6Ls2QL8FncHHcUOeaTHM8hyvbf3 qeEtGHT29S9scNkqNS4+ssoaih+Hvl4CGLzRd4C/COXdArK2kRQXBA8nYo3uTo62XQ+a oL2Vt65xVqTZ9x7GWCow6ZqcVFmIlsvdwkSWR0nQkVBhHXpRcVz957BuGYbitQ1e2eqm fMOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=Dkpd7JwG/qJ3P0CpMlrm4HzNE7EIP7Or+B3C45NT3l0=; b=SEw4r0NTICHpW4iu5Eo+dIQDHraiUhM9mgzuEudh80iJZLRPiCU006ZS0QYNci3DVs xjq/F8+aDWIy5iNGvl9SXoe1FS6az9rYcFcgL5dN14ic6BGIbFFxhPGStS884jE0Iv2i 0mUvIYDZpNMOJ3QlS6QigsgFQF8HXRgPMM3Nhlzeg4Q1XLV1K5C3JX8FROzLao0/3meD h/umknMp9+/JsMt3JZL+4podxm9YDa8Vy0ucl01/tFAPGIoWDKkxgFGv0sf4uTDbkyt3 HxFVhlTkSjVD0CH5s6zPmn6bqJoZWqJ9xFlhvR+MQnTSGUAIsH7aK8q1yKH7bQupgdkx QluQ== X-Gm-Message-State: ALyK8tLMVa7ESsqvTnYu1CWwl10IkCWS77WU0KdFpuZh/b2LNs+K+DDkckCZMCweIP9ov/HDvI58JA4JXFRoLA== X-Received: by 10.157.29.106 with SMTP id m97mr4771106otm.164.1465898531727; Tue, 14 Jun 2016 03:02:11 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.202.235.19 with HTTP; Tue, 14 Jun 2016 03:01:52 -0700 (PDT) In-Reply-To: References: From: Niclas Hedhman Date: Tue, 14 Jun 2016 18:01:52 +0800 X-Google-Sender-Auth: IuHAbA_ymhmAIn_uK3Fyc-A3ltM Message-ID: Subject: Re: Python Interface To: dev Content-Type: multipart/alternative; boundary=001a11433b2042afa705353a1973 archived-at: Tue, 14 Jun 2016 10:02:19 -0000 --001a11433b2042afa705353a1973 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable If you would like to flesh out the details, and want some help to make it a bit more formal language (in case you struggle expressing yourself in English), I'd be happy to assist to make it into a formal documentation page (probably 2 diff pages) on it. Niclas On Tue, Jun 14, 2016 at 5:54 PM, zhuangmz08 wrote: > Yes, I look at the samples before. I wrote this email to ensure whether > there's a format guide. > > > > > ------------------ =E5=8E=9F=E5=A7=8B=E9=82=AE=E4=BB=B6 -----------------= - > =E5=8F=91=E4=BB=B6=E4=BA=BA: "Niclas Hedhman";; > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2016=E5=B9=B46=E6=9C=8814=E6=97=A5(= =E6=98=9F=E6=9C=9F=E4=BA=8C) =E4=B8=8B=E5=8D=885:49 > =E6=94=B6=E4=BB=B6=E4=BA=BA: "dev"; > > =E4=B8=BB=E9=A2=98: 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 nam= e) > as the key and the value being the serialized form of each of those state= s. > > 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 identity(); // part of the Identity interface > Property 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 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 > --=20 Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java --001a11433b2042afa705353a1973--