User name and password

Hi,

I have built a workflow that has many DB reader and DB connections. However, my credentials to the DB expires every 3 months and I have to enter new ones in all these connectors.

Is there a way to have a variable or place I can enter my credentials one time and have all the other nodes reference this place to get the user name and password ?

Hi @Adiwakar, you can definitely do this.

Depending on what version of KNIME you’re using you can either use the Credential Configuration (v4.0+) or the Credentials Input node.
They’ll let you enter your credentials and then pass them into your DB Connector (v4.0+) or Database Connector node.

That would look something like this, just check the credentials box and select the variable your configuration or input node created.

3 Likes

I am always amazed by the features KNIME has in place! I had no idea that this was available and I can see it being super useful in the future.

3 Likes

Getting an issue with this. I stored the credentials in the Credentials input node
and passed it to the DB connector node but when the credentials enters the wrapped metanode and is passed to nodes there it fails with the message. “no credentials stored in DB Auth” DB Auth being the variable name used in the Credentials input node.

image

After a bit of testing it looks like credentials does not pass though wrapped meta nodes.
Looks like a defect so far. Looking for confirmation or assistance

Luckily this is an easy fix, thanks for asking it comes up a lot!

So components, by default, don’t share flow variables with the rest of your workflow. This means variables passed into or out of the component.
This was implemented to help keep your workflow clean of excess variables.

You can set variables to be passed into or out of your component in the configuration dialog of the Component input, and Component output nodes inside the component itself.
Just move the ones you want passed in, or the ones you want passed out into the green include box.

Configuring the input will set the incoming, and configuring the output will set the outgoing.

As a note, make sure your input box has executed before you’ll be able to see the variables in the configuration dialog.

Hope this helps!

1 Like

Solved. Thanks. Personally I think the error message can be a bit more descriptive in this case to help identify what needs to be done. But assuming this conversation stays here, should be a easy fix for others.

2 Likes

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