Select to view content in your preferred language

arcpy CopyFeatures_management subset of columns

919
1
Jump to solution
07-03-2019 11:12 AM
mohammednabil
Emerging 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.