create_job - Data Stream Architecture

Teradata Data Stream Architecture (DSA) User Guide

Product
Data Stream Architecture
Release Number
15.11
Published
December 2016
Language
English (United States)
Last Update
2018-04-17
dita:mapPath
zwp1479744478413.ditamap
dita:ditavalPath
3150_DSA_UG_1511.ditaval.ditaval
dita:id
B035-3150
lifecycle
previous
Product Category
Software
Teradata Tools and Utilities

Purpose

The create_job command creates a job based on the values you specify for parameters in the command line or in the XML file. Parameter values you enter in the command line supersede any value you enter for those parameters in the parameters XML file.

Syntax

create_job [ -file File | parameters]

Example

dsc create_job -n job1 -f parameters.xml

Parameters

n|name Name
[Optional] The name of the job on which to perform the action. Must be unique for each job.
job1
f|file filename
The full file path and file name of the file containing the necessary parameters to create the job. If the same parameters are provided both in the file and on the command line, Teradata DSA uses the values specified in the command line.
parameters.xml
d|description Description
[Optional] A meaningful description of the job. To allow a multi-word description, add \" before and after the description string.
\"backup web apps\"
t|type Type
[Optional] The type of job. Enter one of the following:
  • BACKUP
  • RESTORE
  • ANALYZE_READ
  • ANALYZE_VALIDATE
restore
o|owner Owner
[This parameter is deprecated after release 15.00. You will receive a warning message if you use this parameter.] The owner of the job. Job ownership is used to determine the appropriate privileges given to DSA users.
user1
b|backup_name BackupName
[Optional] An existing backup job name. For restore, analyze_read, and analyze_validate jobs only.
backupWeb1
u|user_authentication User
Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication.
v|backup_version BackupVersion
[Optional] Backup version number. For restore, analyze_read, and analyze_validate jobs only. Enter latest or 0 for the latest save set.
2

Usage Notes

To get the backup version of a save set, use the list_save_sets command.

You can set the skip_archive parameter to true in case access rights for objects are missing. By setting the parameter to true, the job continues to run. The default value for skip_archive is false. The default value for existing jobs should be false and can be set during the upgrade procedure.

In a restore job, the parent_name parameter uses the backup job name when exporting the XML.

XML File Examples

The sample XML file below specifies job parameters for a remote backup job.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<dscCreateJob
xmlns="http://schemas.teradata.com/v2012/DSC"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="DSC.xsd">
<!-- Optional -->
<job_instance>
<!-- 'job_name' - Required, max 128 characters.-->
<!-- Note: Can be omitted in xml to be specified via command line. -->
<job_name>SampleRemoteBackup1</job_name>

<!-- 'job_description' - Required, max 256 characters. -->
<!-- Note: Can be omitted in xml to be specified via command line. -->
<job_description>This is a sample remote backup job.</job_description>

<!-- 'job_type' - Required, accepted values: BACKUP,RESTORE,ANALYZE_VALIDATE,ANALYZE_READ -->
<!-- Note: Can be omitted in xml to be specified via command line. -->
<job_type>BACKUP</job_type>

<!-- 'auto_retire' - Optional, accepted values: true/false -->
<auto_retire>true</auto_retire>

<!-- 'retire_value' - Required (if auto_retire is true) -->
<retire_value>15</retire_value>

<!-- 'retire_units' - Required (if auto_retire is true), accepted values: DAYS,WEEKS -->
<retire_units>DAYS</retire_units>

<!-- 'objectlist' - Required for BACKUP/RESTORE/ANALYZE_VALIDATE -->
<!-- Note: 'objectlist' is NOT permitted for ANALYZE_READ jobs -->
<objectlist>

<objectinfo>
<!-- 'object_name' - Required, max 128 characters -->
<object_name>BAR1</object_name>

<!-- 'object_type' - Required, accepted values: AGGREGATE_FUNCTION, AUTHORIZATION, COMBINED_AGGREGATE_FUNCTIONS, DATABASE,
EXTERNAL_PROCEDURE, GLOP_SET, HASH_INDEX, INSTANCE_OR_CONSTRUCTOR_METHOD, JAR, JOIN_INDEX, JOURNAL, MACRO,
NO_PI_TABLE, ORDERED_ANALYTICAL_FUNCTION, QUEUE_TABLE, STANDARD_FUNCTION, STATISTICAL_FUNCTION, STORED_PROCEDURE,
TABLE, TABLE_FUNCTION, TRIGGER, USER, USER_DEFINED_METHOD, USER_DEFINED_DATA_TYPE, VIEW -->
<object_type>VIEW</object_type>

<!-- 'parent_name' - Optional, max 128 characters -->
<parent_name>SYSTEMFE</parent_name>

<!-- 'parent_type' - Optional, accepted values: DATABASE/USER -->
<parent_type>DATABASE</parent_type>
</objectinfo>

<objectinfo>
<object_name>ABC</object_name>
<object_type>DATABASE</object_type>
<!-- 'exclude' - Optional -->
<exclude>
<excludeobjectinfo>
<object_name>T1</object_name>
<object_type>TABLE</object_type>
</excludeobjectinfo>
<excludeobjectinfo>
<object_name>T2</object_name>
<object_type>TABLE</object_type>
</excludeobjectinfo>
</exclude>
</objectinfo>

<objectinfo>
<object_name>BAR2</object_name>
<object_type>VIEW</object_type>
<parent_name>ABC</parent_name>
<parent_type>DATABASE</parent_type>
</objectinfo>
</objectlist>

</job_instance>

<!-- 'source_tdpid' - Required, max 32 characters -->
<source_tdpid>system1</source_tdpid>
<!-- 'source_accountid' - Optional, max 30 characters -->
<source_accountid>acctid</source_accountid>

<!-- 'target_media' - Required, max 32 characters -->
<target_media>remote1_nbu</target_media>

<!-- 'job_options' - Required -->
<job_options>
<!-- 'online'- Optional, accepted values: true/false -->
<online>false</online>

<!-- 'nosync' - Optional, accepted values: true/false -->
<nosync>false</nosync>

<!-- 'data_phase' - Required, accepted values: DATA,DICTIONARY -->
<data_phase>DATA</data_phase>

<!-- 'enable_temperature_override' - Optional, accepted values: true/false -->
<enable_temperature_override>false</enable_temperature_override>

<!-- 'temperature_override' - Optional, accepted values: DEFAULT,HOT,WARM,COLD -->
<temperature_override>DEFAULT</temperature_override>

<!-- 'block_level_compression' - Optional, accepted values: DEFAULT,ON,OFF -->
<block_level_compression>DEFAULT</block_level_compression>

<!-- 'disable_fallback' - Optional, accepted value: false -->
<disable_fallback>false</disable_fallback>

<!-- 'query_band' - Optional, max 2048 characters -->
<query_band>queryBandTest</query_band>

<!-- 'dsmain_logging_level' - Optional, accepted values: Error,Info,Debug,Warning -->
<dsmain_logging_level>Error</dsmain_logging_level>

<!-- 'nowait' - Optional, accepted values: true/false -->
<nowait>false</nowait>

<!-- skip_archive -Optional can be true/false. Skip archive during the backup job in case error in access rights -->
<skip_archive>true</skip_archive>
</job_options>
</dscCreateJob>

The sample XML file below specifies job parameters for a remote restore job.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 
<dscCreateJob
 xmlns="http://schemas.teradata.com/v2012/DSC"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="DSC.xsd">
 <!--   Optional --> 	<job_instance>
	<!-- 'job_name' - Required, max 128 characters.-->
		<!-- Note: Can be omitted in xml to be specified via command line. -->
		<job_name>SampleRemoteRestore1</job_name>
		
		<!-- 'job_description' - Required, max 256 characters. --> 
		<!-- Note: Can be omitted in xml to be specified via command line. -->
		<job_description>This is a sample remote restore job.</job_description>
		
		<!-- 'job_type' - Required, accepted values: BACKUP,RESTORE,ANALYZE_VALIDATE,ANALYZE_READ -->
		<!-- Note: Can be omitted in xml to be specified via command line. -->
		<job_type>RESTORE</job_type>
		
		<!-- 'auto_retire' - Optional, accepted values: true/false	-->
		<auto_retire>true</auto_retire>
		
		<!-- 'retire_value' - Required (if auto_retire is true) -->
		<retire_value>15</retire_value>
		
		<!-- 'retire_units' - Required (if auto_retire is true), accepted values: DAYS,WEEKS -->
		<retire_units>DAYS</retire_units>
		
		<!-- 'objectlist' - Required for BACKUP/RESTORE/ANALYZE_VALIDATE -->
		 <!-- Note: 'objectlist' is NOT permitted for ANALYZE_READ jobs -->
		 <objectlist>
		
			<objectinfo>
				<!-- 'object_name' - Required, max 128 characters -->
				<object_name>BAR1</object_name>
				
				<!-- 'object_type' - Required, accepted values: AGGREGATE_FUNCTION, AUTHORIZATION, 
				COMBINED_AGGREGATE_FUNCTIONS, DATABASE, EXTERNAL_PROCEDURE, GLOP_SET, HASH_INDEX, 
				INSTANCE_OR_CONSTRUCTOR_METHOD, JAR, JOIN_INDEX, JOURNAL, MACRO, NO_PI_TABLE, 
				ORDERED_ANALYTICAL_FUNCTION, QUEUE_TABLE, STANDARD_FUNCTION, STATISTICAL_FUNCTION, 
				STORED_PROCEDURE, TABLE, TABLE_FUNCTION, TRIGGER, USER, USER_DEFINED_METHOD, 
				USER_DEFINED_DATA_TYPE, VIEW -->
				<object_type>VIEW</object_type>
				
				<!-- 'parent_name' - Optional, max 128 characters -->
				<parent_name>SYSTEMFE</parent_name>
				
				<!-- 'parent_type' - Optional, accepted values: DATABASE/USER -->
				<parent_type>DATABASE</parent_type>
			</objectinfo>
			
			<objectinfo>
				<object_name>ABC</object_name>
				<object_type>DATABASE</object_type>
				<!-- 'exclude' - Optional --> 
				<exclude>					<excludeobjectinfo>	
					<object_name>T1</object_name>
						<object_type>TABLE</object_type>
					</excludeobjectinfo>	
					<excludeobjectinfo>	
						<object_name>T2</object_name>
						<object_type>TABLE</object_type>
					</excludeobjectinfo>	
				</exclude>
			</objectinfo>
			
			<objectinfo>
				<object_name>BAR2</object_name>
				<object_type>VIEW</object_type>
				<parent_name>ABC</parent_name>
				<parent_type>DATABASE</parent_type>
				<!-- 'object_attribute_list' Optional	 -->
				<object_attribute_list>
						<!-- 'map_to' - Optional, max 128 characters  -->
						<map_to>DBC2</map_to>
						<!-- 'rename_to' - Optional, max 128 characters  -->
						<rename_to>BAR2</rename_to>
				</object_attribute_list>
			</objectinfo>
					</objectlist>
		
		<!-- 'backup_name'  - Required for RESTORE,ANALYZE_READ,ANALYZE_VALIDATE jobs. -->
		<backup_name>SampleRemoteBackup1</backup_name>
		
		<!-- 'backup_version'  - Required for RESTORE,ANALYZE_READ,ANALYZE_VALIDATE jobs. -->
		<!--  Note: Value = '0' the latest save set from backup. Value > 0 is an existing save set.-->
		<backup_version>0</backup_version>
		
		
	</job_instance>
	
	<!-- 'source_media' - Required, max 32 characters --> 	<source_media>remote1_nbu</source_media>
	
	<!-- 'target_tdpid' - Required, max 32 characters --> 	<target_tdpid>system1</target_tdpid>
	<!-- 'target_accountid' - Optional, max 30 characters -->
	<target_accountid>acctid</target_accountid>
	
	<!-- 'job_options' - Required -->	
	<job_options>

		
		<!-- 'enable_temperature_override' - Optional, accepted values: true/false -->
		<enable_temperature_override>false</enable_temperature_override>
		
		<!-- 'temperature_override' - Optional, accepted values: DEFAULT,HOT,WARM,COLD -->
		<temperature_override>DEFAULT</temperature_override>
		
		<!-- 'block_level_compression' - Optional, accepted values: DEFAULT,ON,OFF -->
		<block_level_compression>DEFAULT</block_level_compression>
		
		<!-- 'disable_fallback' - Optional, accepted values: Optional, accepted value: false -->
<disable_fallback>false</disable_fallback>
		
		<!-- 'query_band' - Optional, max 2048 characters -->
		<query_band>queryBandTest</query_band>
		
  		<!-- 'dsmain_logging_level' - Optional, accepted values: Error,Info,Debug,Warning  -->
		<dsmain_logging_level>Error</dsmain_logging_level>
		
		<!--   'nowait' - Optional, accepted values: true/false --> 
		<nowait>true</nowait>
		
		<!-- 'reblock' - Optional, accepted values: true/false  -->
		<!-- Note: Only useful for RESTORE jobs.-->
		<reblock>false</reblock>
		
		<!-- 'run_as_copy' - Optional, accepted values: true/false -->
		<!-- Note: Only useful for RESTORE jobs.-->		
		<run_as_copy>false</run_as_copy>
		
		<!-- 'savset_user' - Optional, max 32 characters -->
		<!-- Note: Only for RESTORE and ANALYZE_VALIDATE jobs -->
		<saveset_user>admin</saveset_user>
		
		<!-- 'savset_password' - Optional, max 32 characters -->
		<!-- Note: Only for RESTORE and ANALYZE_VALIDATE jobs -->
		<saveset_password>admin</saveset_password>
		
		<!-- 'savset_accountid' - Optional, max 30 characters -->
		<!-- Note: Only for RESTORE and ANALYZE_VALIDATE jobs -->
		<saveset_accountid>acctid</saveset_accountid>	</job_options>
</dscCreateJob>