I am creating a relationship class inside an SDE Environment (SQL Server 2016).
I have a point feature class and a related table.
I am trying to add rows to the currently empty table based off specific features from my point feature class.
the only way I see to do this is start an edit session, select all my points and open the attribute editor window then select the feature, use the drop down, right click the table and select "add new".
I have several thousands points I need to do this for, is there a bulk option or a way to automate this process? enter image description here
My keys in the origin table is GlobalID, the key field in destination table is a GUID field type named "Parent_GUID"
-
Populate original with relevant key and append related table.FelixIP– FelixIP2018年08月22日 19:24:00 +00:00Commented Aug 22, 2018 at 19:24
-
can you expand on this, not sure what you meanNULL.Dude– NULL.Dude2018年08月22日 20:17:45 +00:00Commented Aug 22, 2018 at 20:17
-
What are the names and types of keys in relationship? I can post solution using them, that will work in fgdb, no experience with sde though.FelixIP– FelixIP2018年08月22日 20:45:46 +00:00Commented Aug 22, 2018 at 20:45
-
I edited my original question to answer your latest inquiry @FelixIPNULL.Dude– NULL.Dude2018年08月22日 20:50:10 +00:00Commented Aug 22, 2018 at 20:50
1 Answer 1
Original tables:
Table to be appended to FLOORS:
Add fields from FLOORS to fromEXCEL table:
and populate newly added fields:
arcpy.CalculateField_management("fromExcel", "FLOOR_DESCRIPTION", "[FLOOR]")
arcpy.CalculateField_management("fromExcel", "BUILDING_ID","[BUILDING]")
arcpy.AddJoin_management("fromExcel", "BUILDING", "BUILDINGS", "GISBUILDING","KEEP_ALL")
arcpy.CalculateField_management("fromExcel", "fromExcel.Parent_GUID", "[BUILDINGS.GlobalID]")
Remove join and original fields to make schemas between fromEXCEL and FLOORS match:
arcpy.DeleteField_management("fromExcel", "BUILDING;FLOOR")
and append fromEXCEL to FLOORS:
arcpy.Append_management("fromExcel", "FLOORS", schema_type="TEST")
Spot check:
Explore related questions
See similar questions with these tags.