Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: JSON Input to Kettle

  1. #1

    Default JSON Input to Kettle

    Hi, I'm sorry if this has been answered before, but I can't find it. I'm using PDI 4.1.0 and trying to use the JSON input step. Unfortunately every time I try to parse the JSON file it says that there are no rows.
    I've tried with a data file that looks like:
    [
    {"field1": "value1", "field2": "value2"},
    {"field1": "value3", "field2": "value4"}
    ]
    and
    { "data": [
    {"field1": "value1", "field2": "value2"},
    {"field1": "value3", "field2": "value4"}
    ]}

    but nothing seems to work. I can't find any documentation on the format of the json that is expected. Can someone give me a working example?

    Thanks in advance
    Luke

  2. #2
    Join Date
    Oct 2010
    Posts
    1

    Default JSON example...

    Hi, here you have a sample text that can be read correctly with the JSON input step.

    {"data": {
    "museum": [
    {
    "country": "Italy",
    "city": "Venice",
    "id_museum": "109"
    "name": "Palazzo Ducale"},
    {...}
    ]
    }
    }

    This code example is explained in detail in this 'coming soon' coobkook:
    https://www.packtpub.com/pentaho-dat...-cookbook/book



    -----------------------------------------------------
    Quote Originally Posted by ld6772 View Post
    Hi, I'm sorry if this has been answered before, but I can't find it. I'm using PDI 4.1.0 and trying to use the JSON input step. Unfortunately every time I try to parse the JSON file it says that there are no rows.
    I've tried with a data file that looks like:
    [
    {"field1": "value1", "field2": "value2"},
    {"field1": "value3", "field2": "value4"}
    ]
    and
    { "data": [
    {"field1": "value1", "field2": "value2"},
    {"field1": "value3", "field2": "value4"}
    ]}

    but nothing seems to work. I can't find any documentation on the format of the json that is expected. Can someone give me a working example?

    Thanks in advance
    Luke

  3. #3

    Default

    Thanks a lot for the quick response, I'll give it a go, and keep the book in mind

    Quote Originally Posted by adripulvi View Post
    Hi, here you have a sample text that can be read correctly with the JSON input step.

    {"data": {
    "museum": [
    {
    "country": "Italy",
    "city": "Venice",
    "id_museum": "109"
    "name": "Palazzo Ducale"},
    {...}
    ]
    }
    }

    This code example is explained in detail in this 'coming soon' coobkook:
    https://www.packtpub.com/pentaho-dat...-cookbook/book



    -----------------------------------------------------

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.