2

I have joined a CSV table to a raster layer, now I am trying to remove the join. I have typed the following command:

arcpy.RemoveJoin_management("hwsd_lyr",hwsd_csv)

It gives the following error:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of  | HWSD_CLS_DATA.csv.
Failed to execute (RemoveJoin).

1 Answer 1

3

You have not specified what your hwsd_csv value is. However, you need to use the name of the data source, not the name of the table view when removing a join.

So, based on the values in the error message, perhaps the following might work:

arcpy.RemoveJoin_management("hwsd_lyr", "HWSD_CLS_DATA")

or possibly:

arcpy.RemoveJoin_management("hwsd_lyr", "HWSD_CLS_DATA.csv")

The documentation at ArcGIS Pro / Tool Reference / Tools / Data Management toolbox / Joins and Relates toolset / Remove Join states:

The join name will not reflect the name of the table view itself, but rather the source of the table view. Therefore, if a table view is named TableView1 and points at mytable.dbf, the name of the join will be "mytable".

Alternatively, you can just remove all joins by not specifying the join name at all:

arcpy.RemoveJoin_management("hwsd_lyr")
2
  • The last command worked
    – lsr729
    Commented Jun 7, 2019 at 5:39
  • In that case, mark as solved. Thanks
    – FelixIP
    Commented Jun 7, 2019 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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