Forum Discussion

deeps's avatar
deeps
New Contributor III
3 years ago
Solved

Rest Get output is in filename.json.gz format need to convert to csv

Hello All,
I have file called “filename.json.gz” which is obtained using REST GET Snap and I need to convert it to a CSV format file. I need this transformation to be done in one pipeline.
Any help would be greatly appreciated. Thanks!!

  • GZip stuff is a little bit more work, but it’s possible here, you’ll want to set the REST Get Response Entity Type to BINARY

    With that, you’ll then have to map the data from the output document to content for a document to binary transition, to do this, you’ll want to map the settings in the mapper (some of these are optional, but I’d say content-type, content-encoding, and content are all required on the output map)

    With that, you can use the Document to Binary to get it in a binary form (I set the drop-down for Encode or Decode to NONE), then decompress (you select GZip), then you can parse the JSON with the JSON Parser.

    Full pipeline screenshot

    download (you’ll need to change the URL to download in the REST Get)
    json gzip_2023_03_03.slp (8.0 KB)

4 Replies

  • hi @pvsharish9 ,

    Is the user emp added to the DB where you trying to connect to? with the right password?
    If Yes,

    Which JDBC Jars are you using have you tried this?
    JDBC Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver

    And maybe try also only with this Url properties:

    • selectMethod : cursor
      Or do you need those other properties?

    Advanced properties:

    Regards

    Jens