Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Connect to a server

  1. #1

    Default Connect to a server

    Is there a Step (Spoon) I could use to connect to a server and download the output generated to my PC? Here is exactly what I am trying to do:

    When I copy paste this link in web browser(x - ip host and port number):

    http://XXX.xx.xx.x:xxxx/ws/spaces/1hpv/connections?q="interaction id":1e35bda0e2&c=sentiment&c=sentiment.weakpositivesentiment

    I get the following output (Json format)

    {"mn":1,"mx":1,"p":1,"ps":10,"np":1,"nr":2,"qt":"0.028","r":[{"a":{"c":"sentiment","v":"interesting debate going on re","id":3848290697236},"m":1},{"a":{"c":"sentiment.weakpositivesentiment","v":"interesting","id":7146825580549},"m":1}]}

    I am trying to write a transformation to do this and download the file to my PC and not sure which steps to use.

    Thanks.
    Last edited by smahankali; 03-26-2014 at 04:43 PM.

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

    Default

    I would use a HTTP Client step to fetch the JSON resource, reading the URI from a field.
    A Text File Output step (no header, no enveloping char) will suffice to write the resource to your filesystem.
    So long, and thanks for all the fish.

  3. #3

    Default

    Thanks marabu that worked.

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.