以下示例 XML 显示了可在作业创建 XML 文件中使用的所有可能元素的正确顺序。
请在创建作业之前参见此示例 XML。
<?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>datamovertest</job_name> <source_tdpid>dmdev</source_tdpid> <source_user>dmguest</source_user> <source_password>please</source_password> <source_password_encrypted></source_password_encrypted> <source_logon_mechanism></source_logon_mechanism> <source_logon_mechanism_data></source_logon_mechanism_data> <source_account_id></source_account_id> <source_session_charset></source_session_charset> <target_tdpid>dmsmp2</target_tdpid> <target_user>dmguest</target_user> <target_password>please</target_password> <target_password_encrypted></target_password_encrypted> <target_logon_mechanism></target_logon_mechanism> <target_logon_mechanism_data></target_logon_mechanism_data> <target_account_id></target_account_id> <target_session_charset></target_session_charset> <use_userid_pool>false</use_userid_pool> <data_streams>1</data_streams> <source_sessions>1</source_sessions> <target_sessions>1</target_sessions> <max_agents_per_task>1</max_agents_per_task> <response_timeout>100</response_timeout> <sync>true</sync> <overwrite_existing_objects>true</overwrite_existing_objects> <freeze_job_steps>false</freeze_job_steps> <force_utility>tptapi</force_utility> <staging_database> <name>dmguest</name> </staging_database> <staging_database_for_table> <name>dmguest</name> </staging_database_for_table> <target_database> <name>dmguest</name> </target_database> <log_level>0</log_level> <online_archive>false</online_archive> <log_to_event_table>tmsmevent</log_to_event_table> <database selection="unselected" replaceDatabase="true"> <name>dmguest</name> <staging_database> <name>dmguest</name> </staging_database> <staging_database_for_table> <name>dmguest</name> </staging_database_for_table> <target_database> <name>dmguest</name> </target_database> <compare_ddl>TRUE</compare_ddl> <table selection="included" copyStats="false"> <name>ppiorders</name> <staging_database> <name>dmguest</name> </staging_database> <staging_database_for_table> <name>dmguest</name> </staging_database_for_table> <force_target_staging_table>false</force_target_staging_table> <target_database> <name>dmguest</name> </target_database> <target_name>table8_clone</target_name> <validate_row_count>all</validate_row_count> <override_lock_access>false</override_lock_access> <export_without_spool>true</export_without_spool> <compare_ddl>TRUE</compare_ddl> <sql_where_clause><![CDATA[ WHERE ORDERDATE > '2003-01-23' ]]></sql_where_clause> <key_columns> <key_column>ORDERDATE</key_column> </key_columns> <staging_to_target>insert_only</staging_to_target> </table> <table selection="included" copyStats="false"> <name>employee</name> <compare_ddl>true</compare_ddl> </table> </database> <triggers> <trigger selection="included"> <database>dmguest</database> <subject_table_database>dmguest</subject_table_database> <table>employee</table> <name>TestTrigger</name> <action_time enabled="NO">BEFORE</action_time> </trigger> </triggers> <indices> <index selection="included" copyStats="false"> <name>Orders_HI</name> <target_name>orders_HI_new</target_name> <index_database>dmguest</index_database> <index_type>HASH_INDEX</index_type> </index> </indices> <views> <view selection="included" copyData="true"> <name>testview</name> <database>dmguest</database> <view_data_table> <target_table>TargetTable</target_table> <target_database>dmguest</target_database> </view_data_table> <staging_database> <name>dmguest</name> </staging_database> <staging_database_for_table> <name>dmguest</name> </staging_database_for_table> <force_target_staging_table>false</force_target_staging_table> <validate_row_count>all</validate_row_count> <compare_ddl>true</compare_ddl> <sql_where_clause><![CDATA[ WHERE "test2"."C1" > 500 ]]></sql_where_clause> <key_columns> <key_column>C1</key_column> </key_columns> </view> </views> <foreign_servers> <foreign_server selection="included" > <name>FSObj</name> <map>map1</map> <colocate>col1</colocate> </foreign_server> </foreign_servers> <function_aliases> <function_alias selection="included" > <name>dmguest</name> <database>faObj</database> </function_alias> </function_aliases> <macros> <macro selection="included"> <name>macro_employee</name> <database>dmguest</database> </macro> </macros> <stored_procedures> <stored_procedure selection="included"> <name>getEmpInfo</name> <database>dmguest</database> </stored_procedure> </stored_procedures> <uowid>test</uowid> <query_band>AppName=B;</query_band> </dmCreate>