You can use query bands to tag sessions or transactions in the Teradata Database. You can use the default query band values, or modify the query band values using the save_configuration command. When the feature is enabled, Data Mover will use the default value or the user-specified value. When the default query band feature is disabled, you will have the option to specify the query band values manually.
- Create an object list of the source system with the query command.
-
Edit the resulting default object.xml file.
- Append the <query_band></query_band> elements to the object.xml file before the final closing tag </dmCreate>.
-
Enter the query band information as a set of semicolon-separated name-value pairs between the <query_band> and </query_band> tags.
For example, the following excerpt of object.xml defines the query band Job=payroll;Userid=aa1000000;Jobsession=1122;.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <dmCreate xmlns="http://schemas.teradata.com/dataMover/v2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.teradata.com/unity/datamover.xsd"> <job_name>floyd_dmdev_create</job_name> <source_tdpid>floyd</source_tdpid> <source_user>dmguest</source_user> <source_password>please</source_password> <target_tdpid>dmdev</target_tdpid> <target_user>dmguest</target_user> <target_password>please</target_password> <database selection="unselected"> <name>dmguest</name> <table selection="included"> <name>test1</name> </table> <table selection="included"> <name>test2</name> </table> <table selection="included"> <name>test3</name> </table> </database> <query_band>Job=payroll;Userid=aa1000000;Jobsession=1122;</query_band> </dmCreate>
- Save the XML file as parameters.xml.
- Create the job with datamove create -f parameters.xml. You can also create a job that uses query bands and start it immediately with datamove move -f parameters.xml.