REST Client / HTTP Client step broken when using GET method with csv response body

85 views
Skip to first unread message

AFBFEACD CCFFEADE

unread,
Sep 7, 2023, 4:20:23 AM9/7/23
to Pentaho Community
Hi everyone, I'm using pentaho data integration tool to fetch data from REST API using GET method with CSV body response.

So I'm using step "REST client" with these parameters: 
Main:
URL from field
HTTP method: GET
Output field: result (or whatever - I don't know what should I use because there are no fields in response body, just csv).

Headers:
accept: */*
Content-Type: application/csv
Autorization: Bearer <my token>

And then "Text file output" to write CSV file with recieved data.

So I'm getting this in file (seprarator |):
```result
"BARCODE|BRANDCODE|... 
"
``` CSV data till " symbol. Here result, fist " and last " are redundant. I need only CSV part.

Another option is leave Output field in previous step empty. In this case I'm getting just all my fields that I used in transformation seprarated with |:
```accept|Authorization|Content-Type|filename|token|partIds|Auth|partId|download_url|download_postfix|dwnld_url
*/*|Bearer |application/csv|products.csv|ey... 
``` and etc.

Any ideas how to get only CSV part from REST API call?

Reply all
Reply to author
Forward
0 new messages