How to get workflow credentials into a metanode?

Hi there

I have a part of my workflow wrapped into a metanode (“Wrapped Metanode”). Inside there are database connectors, which used to use workflow credentials to do the authentication. However now in the metanode those are not available anymore, the dropdown list is always empty, and I can’t figure out how to get them into the node. (A forum post speaks about passing them as variables, but I can’t see how that would work.) Any pointers?

Thanks

Michael

Hi @redm,

you are right that is quite well hidden.

Go inside the wrapped metanode and then configure the wrappedNode input. There you can specify which flow variables go inside the wrapped metanode.
Cheers,
Johannes

Thanks for your answer!

So far so good… been there already :wink: But there is nothing which is related to workflow credentials. I would probably need write the workflow credentials to a variable first, which I then can feed into the metanode, but I don’t see that would work either. Is there some hidden function I could call from a snippet to create a variable?

And even if there was, I don’t know how to feed that into say a Hive Connector. There is no flow variable slot I could connect a possible workflow credentials variable to. Just individual username and password…

Edit: Or should there be a Knime populated variable, like “knime.workspace”? Bug?

Okay, I asked my colleagues and there is no way to get workflow credentials inside wrapped metanodes (at least in the newer versions of knime). They are only available at the top level.

You can, however, use the Credentials Input node which outputs a flow variable. Pass this inside your wrapped metanode (as described above). Every nodes has flow variable ports, but they are hidden by default. Right-click on the node (Show Flow variable ports) will show the flow variable ports (“bunny ears”). Then they are accessible in the dialog. I attached a wf workflow_credentials.knwf (14.3 KB).

Thanks. Credentials Input is also what I figuered out now, after 2 days of try and error… :wink: And most importantly that it takes the role of workflow credentials when feeding the result into a DB connector config. That’s absolutely not clear from it’s description. Maybe that could be added.

1 Like

Ah good.

You are right, that is not mentioned in the node description and should be changed. I will talk with the developers about this.