Renaming LOAD files in cloud endpoints or targets.

Creation date: 31/07/2023 11:49    Updated: 01/08/2023 15:50    adls google cloud google cloud storage load load file load files post processing post-processing rename target load file rename
Hi,

These are the rough steps to rename the LOAD files created in cloud targets. You will also need to enable Replicate to run commands. Info on how to do this here: https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-How-to-rename-output-files-LOAD-to-table-name/ta-p/2072876


(1) In the Advanced tab of the endpoint, there is a post-processing option. Tick that box and enter the details.



* Command name: is the location of the script that you want to run
* I left Working directory blank and it worked.
* Parameters are the predetermined parameters that Replicate automatically passes into your script. You can choose which you want (refer to the endpoint's advanced connection settings)


(2) On the Replicate Server machine, create the script that renames the LOAD file. Replicate automatically inserts the parameters and they are required to be entered.

* If you leave this setting on and run the task now (turn target_load) to verbose,  look through the logs and you can find the the actual parameter being passed through. 
* I used that to adapt my script around it. 
* My script was run against google cloud storage where the target files reside
*  it used google sdk commands installed on the Replicate machine to edit the cloud storage.

I had errors keep appearing for me until I reset the Replicate Server service. You might need to do this once.

I hope this helps, 
Mohammed
Files