From Thursday, July, 9, 3:00 PM Pacific,
our Community site will be in
read-only mode
through Sunday, July 12th.
Thank you for your patience.

Upload a local file using PUT method using tRESTClient or tREST

Highlighted
Ten Stars

Upload a local file using PUT method using tRESTClient or tREST

Anybody knows how to upload a local file using PUT method using tRESTClient. 


https://hadoop.apache.org/docs/r2.7.5/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Create_and_Write_...

curl -i -X PUT -T <LOCAL_FILE> "http://<DATANODE>:<PORT>/webhdfs/v1/<PATH>?op=CREATE..."

 

(step 1 succeeds 307 - HTTP 307 Temporary Redirect , step 2 doesn't)
And which HEADERS to set.

 

 

Highlighted
Moderator

Re: Upload a local file using PUT method using tRESTClient or tREST

Hello,

What's your local file?

The tRESTClient component expects a document type. You need to send your input to the "string" input and not the "body" of the tRestClient.

 Have you tried to upload a file using tFileFetch component?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now