I need to be able pass a dictionary values to attribute fields of a graph components, in this case to the Username and Password of an HTTPConnector.
Where in the console log I might see something like:
DictEntry:user:string:{value=dynamicusername}
I have unsuccessfully tried many variations in the fields, including:
DictEntry:user
dictionary.user
//#CTL2 dictionary.user
I see in the documentation special instructions about the syntax for doing so in URL fields, but no reference to using dictionaries in other fields.
Hello,
Since dictionary entries were not designed to be used to pass information directly into component properties, it is not possible to use them in this way (the only exception is the standard File URL field in Reader or Writer components (and, of course, dictionary entries can be used in CTL without any limitation)).
In the case of the HTTPConnector component, the easiest way to pull the Username and Password values from a dictionary is to use the Input Mapping in the HTTPConnector. I have attached two sample graphs (in ExecuteGraph-Dictionary.zip) to illustrate how the Input Mapping can be used: One includes the ExecuteGraph component where Input mapping is used to put Username and Password into dictionary entries, and the other one is a graph with the HTTPConnector component where Input Mapping is used to pull the dictionary entries into Password and Username fields.
Another way of pulling dictionary entries into component properties is to use Input Mapping to link dictionary values to parameters in a (sub)graph. I have attached a second zip file (Subgraph-Dictionary-Parameters.zip) to illustrate how dictionary entries can be linked to parameters in subgraphs.
Hope this helps!
Best regards
Hana