Shared component with external file

Hi community,

how can I save an external file in a shared component (not workflow) so that teh file is always available for every user when using this shared component?

Thx.

Hi @ptrwlr,

what kind of external file you want to add to the component?
I think you would need to add this file to a common accessable location for it to be availible in the component (teamspace/shareddrive/knimeserver)
Else the easiest solution would be to add a file to the workflow folder (which you do not seem to want… any reason for that?)

Hi @ptrwlr,
If the file is text based, you can also put the content in a Table Creator node and process it from there. Could that work?
Kind regards,
Alexander

Hi,

it’s a .js file.
The trick with the Table Creator works.

I would still like to add the file to the component.
If I put the file in the folder of the component, it will not be found when sharing the component to server.

2 Likes

Hi,
Currently that is not possible, but I agree that it would be useful! I will create a ticket internally.
Kind regards,
Alexander

5 Likes

Hi @AlexanderFillbrunn

thank you.

BR Patrick

1 Like

Hi @ptrwlr,
As I was just told by a colleague, it is possible after all. You can use knime://knime.node URLs to reference the folder of the current node. If you add a file to your component, using such a URL you are able to read it. Everyday I learn something new about KNIME :slight_smile:
Kind regards,
Alexander

Edit: It seems like while this works for components, all data is removed from the component folder when you share it. So for your use case it might not be good enough :frowning:
Another edit: We do have another ticket already and it is in the backlog. So maybe the feature will be here soon for shared components.

5 Likes

Hi @AlexanderFillbrunn

thank you so much.
I’m already looking forward to the new feature.

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