如何在字段名称不同的 arcpy 中将数据从一个 table 复制到另一个?

how to copy data from one table to other in arcpy where the name of fields are different?

有两个table具有不同的特征class,比如SourceTarget,table中的字段不相同并且连字段数都不一样

其余 3 个字段依此类推。

要注意的是,如果 UUID(source) 不存在于 NE_UUID(target) 中,它应该将整行 5 个字段插入目标 table.

arcpy 中是否有可以执行此操作的 function/method,或者我是否需要使用游标?

经过一番研究,我找到了一个方法。

curS2=arcpy.da.SearchCursor(target,"NE_UUID")
curS3=arcpy.da.SearchCursor(source,source_list)
curI=arcpy.da.InsertCursor(target, target_list)

curS_list=[y[0] for y in curS2]


print ("loading list.....")

for x in curS3:
    if not x[0] in curS_list:
        curI.insertRow(x)



del curI,curS2,curS3