arcpy CopyFeatures_management subset of columns

710
1
Jump to solution
07-03-2019 11:12 AM
mohammednabil
New Contributor

I am using arcpy CopyFeatures_management to copy feature class from database to in_memory

The source feature class has 50 columns, I want to copy only 5 columns

I don't want to loop of the copied feature class and delete the remaining 45 columns one by one

is there a faster and easier way to copy subset of the columns to the new destination?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
MatthewDriscoll
MVP Alum

Use the Feature Class to Feature Class with the Field Map parameter.  

To remove fields during processing, delete output fields from the Field Map. This will not affect the input.

View solution in original post

1 Reply
MatthewDriscoll
MVP Alum

Use the Feature Class to Feature Class with the Field Map parameter.  

To remove fields during processing, delete output fields from the Field Map. This will not affect the input.