AnsweredAssumed Answered

Python Tool Box Set Output Parameter for FGDB

Question asked by paul.sweeneyTLI on Nov 19, 2019
Latest reply on Nov 20, 2019 by paul.sweeneyTLI

Hi All see below code which creates a replica of everything added to the layer in the last 7 days and saves to my drive. How do i set this FGDB as a output parameter to be used in model builder for further processing? 

 

 

 


from arcgis.gis import GIS
from arcpy import env
import arcgis.features
gis = GIS("https://XXX.arcgis.com","XXX","XXX")




url = 'https://services8.arcgis.com/XXX/arcgis/rest/services/XXX/FeatureServer'
Digs = arcgis.features.FeatureLayerCollection(url, gis)




Digs.properties.capabilities

 


result = Digs.replicas.create(replica_name='Excavations',
layers=[0],
layer_queries = {"0":{"queryOption": "useFilter", "where": "CreationDate >= CURRENT_DATE-1"}},
return_attachments=True,
attachments_sync_direction='bidirectional',
wait=True,
data_format="filegdb",
asynchronous=True,
out_path='T:\\GIS Files\\XXX')




arcpy.SetParameter(1, result)



Outcomes