Using Query Band - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
kmo1482331935137.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem
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.
  1. Create an object list of the source system with the query command.
  2. Edit the resulting default object.xml file.
    1. Append the <query_band></query_band> elements to the object.xml file before the final closing tag </dmCreate>.
    2. 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>             
      
  3. Save the XML file as parameters.xml.
  4. 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.