AnsweredAssumed Answered

Using arcpy to copy a portal feature service to a fgdb feature class

Question asked by jborgion Champion on Jan 10, 2020
Latest reply on Jul 9, 2020 by arsouzaesilva3

ArcGIS Pro 2.4.3


In pro, you can add a feature service and manually export the features to a file geodatabase feature class.


How do you mimic that functionality in python?  I have tried:  

import arcpy
source = r'https://path/toOur/rest/services/MapServer/0'


and get :

ExecuteError: ERROR 000210: Cannot create output C:\pathTo\Test.gdb\newFC
Failed to execute (FeatureClassToFeatureClass).


I googled the error, and then tried to use the same python approach with an Egdb feature class as the source, and it worked splendidly.  Is this a case for the python api?