Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
sidd
Contributor II
Contributor II

download file from sharepoint

Hi All,

i followed one of the talend blog to try to download file from sharepoint. Job completed with a warning. Its downloaded a 137 kb corrupted file and the corrupted file gets downloaded for any given input file. Any help appropriated.

[statistics] connecting to socket on port 3589

[statistics] connected

Sep 14, 2020 5:28:44 AM org.apache.commons.httpclient.HttpMethodBase processResponseHeaders

WARNING: Cookie rejected: "$Version=0; https%3A%2F%2Fyumbrandsinc%2Esharepoint%2Ecom%2Fsites%2Fus%2Dtb%2Dfranchisefinance%2FDiscovery=WorkspaceSiteName=VVMtVEItRnJhbmNoaXNlIEZpbmFuY2U=&WorkspaceSiteUrl=aHR0cHM6Ly95dW1icmFuZHNpbmMuc2hhcmVwb2ludC5jb20vc2l0ZXMvdXMtdGItZnJhbmNoaXNlZmluYW5jZQ==&WorkspaceSiteTime=MjAyMC0wOS0xNFQwOToyODoyMw==; $Path=/_vti_bin/Discovery.asmx". Illegal path attribute "/_vti_bin/Discovery.asmx". Path of origin: "/sites/us-tb-franchisefinance/Shared%20Documents/Forms/AllItems.aspx/_api/web/getFolderByServerRelativeUrl('/2020')/Files('FCCR_RAL.xlsx')/$value"

[statistics] disconnected

Job Copy_of_TBC_PP_LOAD_MEASURE_DIM ended at 05:28 14/09/2020. [Exit code = 0]

Labels (4)
7 Replies
Anonymous
Not applicable

Hello,

Are you referring to this community knowledge article to download a file from SharePoint?

https://community.talend.com/s/article/How-to-download-a-file-from-SharePoint-using-tFileFetch-eq7eb

Best regards

Sabrina

 

 

 

 

 

 

sidd
Contributor II
Contributor II
Author

Hi Sabrina - I am unable to open the link which you provided.

 

This is the one i followed to download the file. In this post I followed the approach provided by tanjaj.

 

https://community.talend.com/s/feed/0D53p00007vCkqHCAS

 

 

 

Thanks,

Thanks, Sid

 

 

 

Anonymous
Not applicable

Hello,

Let us know if this solution helps.

1. Create a Job connecting a tFileFetch component to a tLogRow component, as shown below:

0693p000009TJTNAA4.png

 

2. Configure the tFileFetch component.

0693p000009TJTSAA4.png

 

a.Select http from the Protocol drop-down menu.

 

b.In the URI field, provide the URL of the shared document. To get the link, right-click your SharePoint file and select Get a link.

0693p000009TJTcAAO.png

 

c.

In the Destination directory field, enter the folder name where the fetched file will be stored.

 

d.Enter a file name in the Destination filename field.

 

e.Clear the POST method check box (enabled by default).

f.On the Advanced settings tab, select the Need authentication

0693p000009TJThAAO.png

 

g.Run the Job, and you can see the HTML file in the destination

folder.

0693p000009TJTmAAO.png

0693p000009TJTrAAO.png

h.Open the HTML file, and you can see the Excel file that is available on SharePoint.

0693p000009TJTwAAO.png

Best regards

Sabrina

 

 

 

 

 

 

 

 

 

 

sidd
Contributor II
Contributor II
Author

 

 

Sabrina - I have tried your approach and i am getting below error.

 

 

tFileFetch component: properties:

 

 

 

 

 

 

 

Error:

 

Exception in component tFileFetch_2 (job_tfilefetch)

java.lang.Exception: Method failed: HTTP/1.1 403 Forbidden

at tbbi_firm_etl.job_tfilefetch_0_1.job_tfilefetch.tFileFetch_2Process(job_tfilefetch.java:2153)

at tbbi_firm_etl.job_tfilefetch_0_1.job_tfilefetch.runJobInTOS(job_tfilefetch.java:3387)

at tbbi_firm_etl.job_tfilefetch_0_1.job_tfilefetch.main(job_tfilefetch.java:2521)

[FATAL] 06:40:25 tbbi_firm_etl.job_tfilefetch_0_1.job_tfilefetch- tFileFetch_2 Method failed: HTTP/1.1 403 Forbidden

java.lang.Exception: Method failed: HTTP/1.1 403 Forbidden

at tbbi_firm_etl.job_tfilefetch_0_1.job_tfilefetch.tFileFetch_2Process(job_tfilefetch.java:2153) [classes/:?]

at tbbi_firm_etl.job_tfilefetch_0_1.job_tfilefetch.runJobInTOS(job_tfilefetch.java:3387) [classes/:?]

at tbbi_firm_etl.job_tfilefetch_0_1.job_tfilefetch.main(job_tfilefetch.java:2521) [classes/:?]

[statistics] disconnected

 

Thanks,

Sid

 

 

 

Anonymous
Not applicable

Hello Sid,

Please let me know if you have issue to access this article about:

 

https://community.talend.com/s/article/tFileFetch-fails-with-Forbidden-kLdke

 

Best regards

Sabrina

 

 

 

 

sushantk19
Creator
Creator

@xdshi: even after fixing the job using the above solution, it is generating a blank file at destination folder. can you tell me the reason for this?

Anonymous
Not applicable

Hello,

Is your URL OK with you? I see there is no forbidden error from your job.

Could you please post some screenshots of component settings in this thread?

Best regards

Sabrina