Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i'm trying to upload a parquet file from talend studio into qlik cloud using the tQlikOuput component, i've succeded to upload it into my personal space, but i need to use a different space, does anyone can give me any suggestion on how to achieve it if possible?
Thanks, in advance,
Vincenzo.
Hi @vintac,
So far, I don't think that is possible, but you can try to enhance your solution with the following - just an overview:
In your Talend Studio you can add a tRESTClient Block to call a Qlik Cloud REST API to change the file Space:
https://qlik.dev/apis/rest/data-files/#post-v1-data-files-actions-change-space
I believe the tQlikOuput returns the uploaded FILE_ID and you can use it to compose the Json Body request of the tRESTClient.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @vintac,
So far, I don't think that is possible, but you can try to enhance your solution with the following - just an overview:
In your Talend Studio you can add a tRESTClient Block to call a Qlik Cloud REST API to change the file Space:
https://qlik.dev/apis/rest/data-files/#post-v1-data-files-actions-change-space
I believe the tQlikOuput returns the uploaded FILE_ID and you can use it to compose the Json Body request of the tRESTClient.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @marksouzacosta ,
thanks a lot for your suggestion, indeed it's a viable solution.
Anyway that's a pity i can't do it straight in the tQlikOutput component, it would be much more straight forward.
Thanks again,
VIncenzo.
Definitely. I heard these Qlik components will have a major update around June/July this year.
Let's hope for the best!
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @marksouzacosta ,
sorry for bothering, i hope you can help me again.
I implemented your solution and it actually works, but i have another issue now.
Since i have to update those files time to time, when i try to upload the new version into qlik and thus move them with a rest request to the space i need, i face an error because those files already exist in the target space. The rest api is not able to overwrite the files.
Do you think there's a neat solution?
Regards,
Vincenzo.
Hmmm,
You could try the PUT method - https://qlik.dev/apis/rest/data-files/#put-v1-data-files-id - to replace the file or delete the existing file - https://qlik.dev/apis/rest/data-files/#delete-v1-data-files-id - and add the new one.
In both ways you will need to find the File ID. You can use the Get with some search parameters: https://qlik.dev/apis/rest/data-files/#get-v1-data-files
When you have a chance, can you please share your diagram? I'm curious about how you have implemented the tRestClient.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi Mark,
i'm still struggling to find a simple way to retrieve the resourceId of the files for the DELETE method in rest api. It's not straight forward to access that info from the data-files api because there's no way to filter on the spaceId.
Anyway, here there are the screenshots you aksed for moving files from personal space to target space.
Hope that's enough, if you need more info don't hesitate to ask.
Regards,
Vincenzo.
Hi @vintac,
Your diagram is very helpful, thank you!
Regarding the Space ID, I believe you are looking for the Connection ID.
So, you can use the following steps.
1. Get the Connection ID from the data-files/connections end point:
https://qlik.dev/apis/rest/data-files/#get-v1-data-files-connections
Add spaceId as the query parameter. You need the id from the Json response:
2. Use get Data-Files to find the Data File ID:
https://qlik.dev/apis/rest/data-files/#get-v1-data-files
Enter the connectionId you get in the item#1 and the file name. You need the id from the Json response:
3. Delete the file using Delete end-point:
https://qlik.dev/apis/rest/data-files/#delete-v1-data-files-id
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi Mark,
really thanks for your help and for the detailed procedure, i didn't consider the connectionId and it works. Just a question, is the connectionId unique for each space?
Yes. There is one Connection ID per Space - this is the connection to the unique Data Space of each Space.
The Connection ID is also unique in the whole Tenant.
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com