I often have a large block of HiveQL that I want to run multiple times with different settings for some variables.
A simple example would be:
set mindate
Set your variables in the config file and load this file in your hql script:
source /path_to_your_config_file/config.hql;