Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: How to use FK/PK in Json file

  1. #1
    Join Date
    Dec 2015
    Posts
    3

    Default How to use FK/PK in Json file

    Hi, everyone.

    I'm new in Pentaho world and i'm stuck with something.

    Basically i have a json file and i want to save all the data into a Database.
    The json strucuture are like this:

    []PRIMARY

    {} 0
    FIELD1
    FIELD2
    FIELD3
    []SECONDARY
    {} 0
    []SECONDARY
    {} 0
    FIELD4
    FIELD5
    FIELD6
    {} 1
    FIELD7
    FIELD8
    FIELD9
    []THIRD
    {} 0
    []FOURTH
    {} 0
    FIELD10
    FIELD11
    FIELD12
    {} 1
    FIELD13
    FIELD14
    FIELD15

    I have the ideia to break in three tables. PRIMARY, SECONDARY and THIRD. I thought that i need to make a idPrimary as PK, them put a idPrimary_FK in both, seconday and third. But how can i do this?
    When i use a json file input, and select all the fields who belong to fourth, i can't put a FIELD1 in the same table, give me a error:

    2015/12/20 00:12:57 - PRICES.0 - The data structure is not the same inside the resource! We found 65 values for json path [$.PRIMARY[*].FIELD1], which is different that the number returned for path [$.PRIMARY[*].SENCODARY[*].SENCODARY[*].FIELD4] (174 values). We MUST have the same number of values for all paths.

    Please, help me guys.

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2015
    Posts
    3

    Default

    Quote Originally Posted by marabu View Post
    I read all the thread, but still don't untersdant. I need to make a json input step after a json input step? When i tried this, i got a error.

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You may have made mistakes...

    Is there anything else we can do for you?
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Dec 2015
    Posts
    3

    Default

    Quote Originally Posted by marabu View Post
    you may have made mistakes...

    Is there anything else we can do for you?
    Prices = FOUTH
    Leg = SECOND
    Flight = PRIMARY

    This can't resolve the problem.
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.