0

I need to run the following joins in my model but I can't find the same settings in the tool within ModelBuilder.

Is there something I am missing? the key is that I don't want to create lots of new data and just have virtual joins.

Run model

CREATE 4 JOINS

1
Target Table:   test_hcb_lines
Target Field:   FID

Join Table: test_hcb_lines_near
Join Field: IN_FID
Join Type:  Keep only matching records
Data Type:  Standalone Table
Database:   Z:\CCRC\Projects\2016\40_CCRC_Sewer Manhole-HCB Distance\Working\scratch\scratch.gdb

2.
Target Table:   test_hcb_lines
Target Field:   test_hcb_lines_near.IN_FID

Join Table: test_hcb_lines_joined
Join Field: FID
Join Type:  Keep only matching records
Data Type:  Shapefile Feature Class 
Shapefile:  Z:\CCRC\Projects\2016\40_CCRC_Sewer Manhole-HCB Distance\Working\scratch\test_hcb_lines_joined.shp
Geometry Type:  Line
Coordinates have Z values:  No 
Coordinates have measures:  No

3
Target Table:   test_main_lines_chainage
Target Field:   FID

Join Table: test_hcb_lines_near
Join Field: NEAR_FID
Join Type:  Keep only matching records
Data Type:  Standalone Table
Database:   Z:\CCRC\Projects\2016\40_CCRC_Sewer Manhole-HCB Distance\Working\scratch\scratch.gdb

4
Target Table:   test_main_lines_chainage
Target Field:   test_hcb_lines_near.IN_FID

Join Table: test_hcb_lines_joined
Join Field: FID
Join Type:  Keep only matching records
Data Type:  Shapefile Feature Class 
Shapefile:  Z:\CCRC\Projects\2016\40_CCRC_Sewer Manhole-HCB Distance\Working\scratch\test_hcb_lines_joined.shp
Geometry Type:  Line
Coordinates have Z values:  No 
Coordinates have measures:  No
  • 2
    How are you joining in model builder? The tool is called Add Join pro.arcgis.com/en/pro-app/tool-reference/data-management/… Note that you can only join to a Layer so you may need to MakeFeatureLayer first. – Michael Stimson Sep 2 '16 at 0:30
  • Thanks, I tried that earlier and I thought it meant creating a new dataset but on looking at it again this doesn't seem to be the case. Thanks. – GeorgeC Sep 2 '16 at 0:34
2

Joining to previously joined layers in ArcMap adds the layer name to each field where you get test_hcb_lines_near.IN_FID. ModelBuilder doesn't always pick this up automatically, it only knows there are previous joins if you have run the model.

In order to get around this, create your model and add one join (using the Add Join tool) and then run the model. Once it has run you can add the next join and it will see the previous join and offer suggestions that include fields from the previous join. Follow this process and you should get all the same options as if you had done them in ArcMap directly.

Note that Add Join tool joins in memory (like ArcMap) but Join Field tool modifies your existing layer and adds the data permanently to that layer!

  • Given the size of the final dataset I may need to just create the new datasets as it may cause memory issues. – GeorgeC Sep 2 '16 at 0:55
  • sorry I accepted this to quick. The key issue was actually being able to do "Join Type: Keep only matching records" – GeorgeC Sep 2 '16 at 1:13
  • 1
    @GeorgeC Add Join has "Keep All Target Features (Optional)" - clearing this option will keep only matching records. – Midavalo Sep 2 '16 at 1:31
  • 2
    Look at the qualified field names setting pro.arcgis.com/en/pro-app/tool-reference/environment-settings/…, that will try to stop prepending the table name to the join. – Michael Stimson Sep 2 '16 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.