Specify source and target fields dynamically in Jitterbit Design Studio
In the configuration of a source or target, you can use global or project variables. These can be either ones that you define as part of a project, configure at runtime through the Management Console, or are Jitterbit variables.
Project variables can be used for this purpose, and then reconfigured at runtime using the Management Console.
For example, in an HTTP source, you can enter in the URL field:
[ServerURL]
In a script that runs prior to that source being used, you would set the value of that variable.
In scripts, you reference a variable by using a dollar sign, such as
$ServerURL = "htttp://www.example.com";
You could do the same for your login (user name) and password. For example, you could enter in an HTTP Source configuration fields:
URL: [url]
Login: [username]
Password: [pwd]
The password variable would be typed or pasted blind (you would not see the final characters), but the data element will be replaced at runtime.
In a script you can set these variables and then call an operation that uses that source defined with the variables:
$url = ... ;
$username = ... ;
$pwd = ... ;
RunOperation(...);
The function RunOperation()
can either run an operation either synchronously or asynchronously as described in its documentation.