Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: Filter values

  1. #1
    Join Date
    Nov 2017
    Posts
    4

    Question Filter values

    Hello everybody,


    I have Pentaho 4.2.1 and I need to filter some values from REST Client.
    I searched some object to do this but I don't finded.


    This is what REST Client purges
    Example:
    {"hostid":"11111","host":"teste","interfaces":{"interfaceid":"22222","ip":"192.168.0.0"}]}


    I want to put this elements in SQL and create a filter to columns in a SQL Server in this order:
    1: "hostid":"11111",
    2: "host":"teste"
    3: "interfaceid":"22222"
    4: "ip":"192.168.0.0"


    How can I do this?

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

    Default

    You are looking for step JSON-Input.
    Please note that you can read JSON from the REST-Client result field.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Nov 2017
    Posts
    4

    Default

    Quote Originally Posted by marabu View Post
    You are looking for step JSON-Input.
    Please note that you can read JSON from the REST-Client result field.
    But how I can split the fields? It's a unique result from REST Client

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

    Default

    Frankly, I don't understand your question.
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2017
    Posts
    4

    Default

    Quote Originally Posted by marabu View Post
    Frankly, I don't understand your question.
    I test your ktr and I have a parsing error.I generate a text file to output the values and I tried to read with Json input and after that I try to output to text file.

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

    Default

    Quote Originally Posted by martini97 View Post
    I test your ktr and I have a parsing error.
    You forgot to show the error log lines.

  7. #7
    Join Date
    Nov 2017
    Posts
    4

    Default

    Quote Originally Posted by marabu View Post
    You forgot to show the error log lines.
    2017/12/14 08:52:24 - Json Input 2.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Could not open file #1 : file:///C:/Users/user/Desktop/teste.js --> org.pentaho.di.core.exception.KettleException:
    2017/12/14 08:52:24 - Json Input 2.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : org.pentaho.di.core.exception.KettleException:
    2017/12/14 08:52:24 - Json Input 2.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Error parsing file [C:\Users\user\Desktop\teste.js]!
    2017/12/14 08:52:24 - Json Input 2.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :
    2017/12/14 08:52:24 - Json Input 2.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :
    2017/12/14 08:52:24 - Json Input 2.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Error parsing file [C:\Users\user\Desktop\teste.js]!

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

    Default

    So, you tested my demo transformation with your own JSON file?
    Well, I'm no magician - if you don't attach your test file here, there's not much I can do for you.

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.