通过使用 INSERT 语句将数据放入现有表中,您可以将数据导出到远程系统。现有表可以为空,也可以包含数据。如果现有表已包含数据,导出的数据将附加到现有表。
示例:以 Hive 作为发起程序连接器使用 INSERT
该示例显示了使用 Beeline 命令行 shell 的 INSERT。Hive 是发起程序,目标连接器是 Teradata。
jdbc:hive2://localhost:10000> insert into cardata_remote select * from cardata_local;
结果︰
INFO : Number of reduce tasks is set to 0 since there's no reduce operator INFO : number of splits:1 INFO : Submitting tokens for job: job_1472862876236_0011 INFO : The url to track the job: http://tdh127m2.labs.teradata.com:8088/proxy/application_1472862876236_0011/ INFO : Starting Job = job_1472862876236_0011, Tracking URL = http://tdh127m2.labs.teradata.com:8088/proxy/application_1472862876236_0011/ INFO : Kill Command = /usr/hdp/2.6.5.0-292/hadoop/bin/hadoop job -kill job_1472862876236_0011 INFO : Hadoop job information for Stage-0: number of mappers: 1; number of reducers: 0 INFO : 2016-09-09 14:42:21,870 Stage-0 map = 0%, reduce = 0% INFO : 2016-09-09 14:42:31,473 Stage-0 map = 100%, reduce = 0%, Cumulative CPU 4.54 sec INFO : MapReduce Total cumulative CPU time: 4 seconds 540 msec INFO : Ended Job = job_1472862876236_0011 No rows affected (22.979 seconds)