Hi Ryu,
Is the sqlite.db file available within the executor container? If not, I recommend first downloading the file into the workflow, e.g. using our FTP Connector and a Transfer Files node, then making changes or queries, then sending the file back to the original location. However, you will lose “transactional safety” that way when multiple workflows access the file at the same time. This is an inherent problem with SQLite, though. If you want to avoid that, the file share with the file needs to be mounted inside the executor container.
Kind regards,
Alexander
Hi @laughsmile,
I think @mlauber71 is correct still. The executor blocks access to the local file system, but if you want to access the SQLite DB mounted inside your executor container, you will need to “unblock” it by changing the settings linked by @mlauber71.
There are different ways of adding files and software to KNIME’s executor containers, but I am not sure we have one that suits your needs here. The easiest one is to change the Docker image for the container to contain the extra files. However, for your DB this would mean that it is not shared and every executor has its own instance and every time the container is terminated and recreated, e.g. because the executor settings change, all changes to the DB are lost. So this option is only well-suited for static files.
The other option would be to mount a network drive into the container, but this would require changing some Kubernetes resources and they would be reset at least with every update of the Hub. I will ask internally if there is a recommended approach and will update here.
Kind regards,
Alexander
Thank you for the solution.
would you please tell me how to mount a network drive into the container?
When updating the version of the Hub , we can reset the setting.
Hi Ryu,
I think it depends on the type of network drive you have. If it is a NFS drive, that would be ideal because Kubernetes has built-in support for mounting that. Have a look at this guide: Mounting NFS to a container running on Kubernetes | rudimartinsen.com. To mount the NFS, you need to adapt KNIME’s execution contexts:
Get list of ECs:
kubectl -n hub-execution get executioncontexts.hub.knime.com
Retrieve YAML object for EC
kubectl -n hub-execution get executioncontext.hub.knime.com/<ec-id> -o yaml > ec.yaml