Zipping Knime workflow folder for bitbucket upload

Hi all,

To upload Knime workflows to Bitbucket, we need to first zip them.
This activity needs to be done on a daily basis.
So I’m thinking of developing a utility which can zip knime workflow folders on a server.
We have tried the “compress files/folders” node but that does not accept folder paths while using CUSTOM URL.
Please provide your feedback, and I would appreciate it if any working examples were available.

Thanks in advance.

Regards,
Nitin Gupta
Senior Data Specialist

@nitin15585 welcome to the KNIME forum. There is this idea to ZIP KNIME workflows. Maybe you can check that out and see if it would work for you:

Some nodes are of and older version. Would have to see if they might be updated.

1 Like

Hi @nitin15585 and welcome to the Knime Community.

Perhaps this should be done at the OS level instead of within Knime. I’d write a script to do this (batch script for Windows and sh script for Linux/Unix/MacOS).

Zip the workflows, upload the zip files to bitbucket. This script could even be schduled to run by itself on a daily basis.

Thanks for the quick reply. Could you please share the .knwf file if possible.

Regards,
Nitin Gupta

Thanks. Agreed, this is one possible solution. I am looking for a Linux box. If it is possible to share, then it would be a great help.

Regards,
Nitin Gupta

@nitin15585 you can find the files on the KNIME hub like mentioned in the post

best to download the whole workflow group. Here it is to make the download easier (I just switched out some old nodes):

kn_example_backup_workflow.knar (317.6 KB)

1 Like

Thanks for sharing. This solution works perfectly on the local machine. But I need to perform this activity on the server. I have tried that but still have no success. I will give one more attempt to do the same, or else move to a linux-based script solution.

Regards,
Nitin Gupta

Hi @nitin15585,

Server executors have only limited direct access to the server repository and the local file system.

Take a look at the Workflow Reader node which allows you to read a workflow as a port object, you can then use the Workflow Writer node to create a workflow archive. Both nodes support file system connection ports, so you can read workflows from the server with the KNIME Server Connector and then write them e.g. a temporary directory. Take a look at this workflow:

Note that with that method you can only read / write workflows, if your users also upload other files to the server, you need to use the Transfer Files node for these files.

best,
Gabriel

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.