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 2A01E200CBF for ; Sat, 8 Jul 2017 14:10:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 269F516AE7F; Sat, 8 Jul 2017 12:10:43 +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 1DE8916AE7E for ; Sat, 8 Jul 2017 14:10:41 +0200 (CEST) Received: (qmail 18817 invoked by uid 500); 8 Jul 2017 12:10:41 -0000 Mailing-List: contact user-help@predictionio.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@predictionio.incubator.apache.org Delivered-To: mailing list user@predictionio.incubator.apache.org Received: (qmail 18804 invoked by uid 99); 8 Jul 2017 12:10:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Jul 2017 12:10:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 1ED19C009F for ; Sat, 8 Jul 2017 12:10:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.649 X-Spam-Level: * X-Spam-Status: No, score=1.649 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, JMQ_TRACKER=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CW50J3uFxVCA for ; Sat, 8 Jul 2017 12:10:36 +0000 (UTC) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 85B7B5FAEA for ; Sat, 8 Jul 2017 12:10:35 +0000 (UTC) Received: by mail-io0-f182.google.com with SMTP id r36so7305247ioi.1 for ; Sat, 08 Jul 2017 05:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=dqHmjAy2vXBTF5qyM7ltP1AiGXPbovHDeFAftM/Uo8Y=; b=C9N4ypQ8e2m8bDVc/HM8G1dlsyvJG71aqYFNXA1XZNXjFobbCYVqUkZSzso9WmYX+i 7/nMNRkLI99VAIL0I71oo+i0/+5Aah54PldoNIeCuBRmfTNBkXwD/To2a+BsZfdL3y6O prdUq6IHLGCKfH07nypWZ0TjudE1YMD/QSQe2xhFsyKQwa9Q4L0DgAWnlBW+nicd7Q6t 5MGi3EvUWaF8sAUtNg/h5/U0VDhWjWDvNp7Z6PKjRKxbb1mE7FyabgTOrTVl5fE4uGHE vQTBp3tB6/GV8ZQ6iFF7hYwule4g3NfVLWKZm5+NjL9tl/V1TTvYAvzgJXIJy0yL8ZG7 qxLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=dqHmjAy2vXBTF5qyM7ltP1AiGXPbovHDeFAftM/Uo8Y=; b=t0VQh/uyZ2f1gXGH+dUMAnW0Q1ZBnEcFurIsSedKcUcNyFuEEN17p3V8UEbCvn8Qci leiG94M+Kb4Tzh7oZwI9dMdAwSmwgNCE2Q9r95EPaxsA5ZsyGI5jr8gusDdheKByHTh1 ut4GoIZZlno3jdOR2uFFN8J8ZvMGF10IaNFGLOpyXidO+OdMGpvcrBGgFP8IDNOF5jOt Wc6EMj+IyiaacrwrezoH4NVqbOTyhVTPae41ort9jOLDx94opV9SaoW+xmGK5YEXC33P i/LRvpiR+afzic4X2j6n+J6IU8owF+DfwbARuzA+a45ZkYLfaJhZoLbDSU2jibiSzk90 Ga4Q== X-Gm-Message-State: AIVw113KX3EUr6EhIgvqx2ECMAt6qJyrMKACtv/4T2QpNHRlplvaj8CG wVi8oxH9FCJF71DQrLwMJ9anZ0ObIKbw X-Received: by 10.107.146.137 with SMTP id u131mr42841014iod.30.1499515834138; Sat, 08 Jul 2017 05:10:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.134.213 with HTTP; Sat, 8 Jul 2017 05:10:33 -0700 (PDT) In-Reply-To: References: From: Vaghawan Ojha Date: Sat, 8 Jul 2017 17:55:33 +0545 Message-ID: Subject: Re: Import Inital Data Model To: user@predictionio.incubator.apache.org Content-Type: multipart/alternative; boundary="94eb2c05667aa10c820553cd3cab" archived-at: Sat, 08 Jul 2017 12:10:43 -0000 --94eb2c05667aa10c820553cd3cab Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Sebastian, Yes, you need to provide the whole transaction data, not the product and user as much as I know, but not sure if that it works too. Normally you post a transection data, and when you have to tell more about the user (like: the purchased address, device, category) or about the product (like division, price etc.) you can attach them into properties. Also the data in the gitlab was designed for the Recommendation template but that works fine with the UR as well. You need to follow the subsequent template docs to see what types of event it needs. Hope this helps, thanks Vaghawan On Sat, Jul 8, 2017 at 1:37 PM, Kenneth Chan wrote: > re: " i=E2=80=99m always getting an exception with the initial load from = User & > Product" > what's the error you got? > > On Fri, Jul 7, 2017 at 12:46 PM, Sebastian Fix > wrote: > >> Hello together, >> >> I finally got the System running and would like to import some initial >> data now. >> >> I=E2=80=99m using the E-Commerce-Template: http://pr >> edictionio.incubator.apache.org/templates/ecommercerecommend >> ation/quickstart/ >> >> I've the following data=E2=80=99s i would like to import: >> >> - User data >> >> >> - Products data >> >> >> - Transaction data >> >> >> When i try to use the *pio import --appid 1 --input >> import/data-user.json* command i=E2=80=99m always getting an exception w= ith the >> initial load from User & Product. My .json file is following the structu= re >> mentioned on the tutorial. >> >> >> - For User Data: {"event":"$set","entityType":" >> user","entityId":"user001","eventTime":=E2=80=9C=E2=80=9C} >> - For Products {"event":"$set","entityType=E2=80=9C: >> "item","entityId=E2=80=9C:"product001","eventTime":=E2=80=9C=E2=80=9C= } >> >> >> - For Transactions: {"entityId=E2=80=9C:"user001","entityType":"user"= ,"eve >> nt":"buy","targetEntityType":"item","targetEntityId=E2=80=9C:"product= 001=E2=80=9C} >> >> >> Only the Import for Transactions is working I found this template here: >> https://gist.github.com/vaghawan/0a5fb8ddb85e03631dd50 >> 0d7c8f0677d#file-data-sample-json >> >> So my quesiton, how can I import Data=E2=80=99s like >> >> >> - User Data >> - User Categories >> - Product Data >> - Product Categories >> >> >> with a .json file? What is the file structure? >> >> Thanks for any help, >> Sebastian >> >> >> > --94eb2c05667aa10c820553cd3cab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Sebastian,

Yes, you need to provide the whole transaction=C2=A0dat= a, not the product and user as much as I know, but not sure if that it work= s too. Normally you post a transection data, and when you have to tell more= about the user (like: the purchased address, device, category) or about th= e product (like division, price etc.) you can attach them into properties.= =C2=A0

Also the data in the gitlab was designed for the Recom= mendation template but that works fine with the UR as well. You need to fol= low the subsequent template docs to see what types of event it needs.=C2=A0=

Hope this helps, thanks
Vaghawan

On Sat, Jul 8, 2017 at 1:3= 7 PM, Kenneth Chan <kenneth@apache.org> wrote:
re: "=C2=A0i=E2=80=99m always getting an exception with the initial = load from User & Product"
what's the error you got?<= /div>
On Fri, Jul 7, 2017 at 12:46 PM, Sebastian Fix = <sebastian.fix@smartgate.ch> wrote:
Hello together,=C2=A0

I finally got the System running and wo= uld like to import some initial data now.


I've the following data=E2=80=99s i= would like to import:
  • User data
  • Products data
  • Transaction data

When i try to use the=C2=A0pio import --appid 1 --input impo= rt/data-user.json=C2=A0command i=E2=80=99m always getting an exception with the initial load from User &a= mp; Product. My .json file is following the structure mentioned on the tuto= rial.

  • For User Data: {"event":&= quot;$set","entityType":"user","entityId= ":"user001","eventTime":=E2=80=9C=E2=80=9C}
  • For Products =C2=A0{"= ;event":"$set","entityType=E2=80=9C:"item&quo= t;,"entityId=E2=80=9C:"product001","eventTime"= ;:=E2=80=9C=E2=80=9C}
  • For Transactions:=C2=A0{"entit= yId=E2=80=9C:"user001","entityType":"user&quo= t;,"event":"buy","targetEntityType":&quo= t;item","targetEntityId=E2=80=9C:"product001=E2=80= =9C}

Only the Import for Transactions i= s working I found this template here:=C2=A0https://gist.github.com/vaghawan/0a5fb8ddb85e03631dd500d7c8f0677d#file-data-sample-json=C2=A0

So my quesiton, how=C2=A0can I imp= ort Data=E2=80=99s like=C2=A0

  • User Data
  • User Categories
  • Product Data
  • Product Categories

with a .json file? What is the fil= e structure?=C2=A0

Thanks for any help,
Sebastian




--94eb2c05667aa10c820553cd3cab--