Some SmartConnect data sources support the use of Global Variables within the data source query. These variables are replaced with the correct values for the required variable at run-time. For data sources using global variables to work correctly there must be a default value either for the global variable, or for the associated map variable.
e.g.
A user wishes to be able to select a department that an integration should be run for at runtime.
The data source is an ODBC data source, and the query is
select * from Customers where Department = 'GBL_DEPT'
At runtime the value of the map variable will be checked, and GBL_DEPT replaced with the actual value of GBL_DEPT. If no value for GBL_DEPT has been entered against a map variable the default value for the global variable will be used.
Note: as the data source retrieval happens after map pre tasks, a script in the pre task may be used to query the user for the required department code, and the user answer written to a global variable and then used in the query.