Good Evening (east coast US..)
I am developing a script which downloads feature services as FGDBs, unzips them, and then appends them to a SQL database for archiving purposes. My only issue is the FGDBs from the feature service download have randomly generated names... (i.e. 14347fdgydfdygvyutgfvycv-789u98h9bibh-gerrt34554y654-r9384hrt98h98h) which doesn't really do me any good.
Is there a way around this? The only thing I could think of is to download each hosted feature service to its own directory.. unzip the data, rename the geodatabase. I have tried to find a pythonic way to rename the file after it is extracted from the .zip, but have not been successful.
As the feature services in question all pertain to workforce, the schemas and FC names are the same across all feature services. So I have no way of knowing which GDB is the Parks and Rec... Utilities, Public Works... etc.
I could amend the script to download feature services from AGOL based on a series of item ID's rather than a tag search... but I feel like this is unnecessary and not the right way to go about this. Am I missing something here? I would like a way to have the Geodatabase from the export have the same name as the Feature Service it was generated from. Any help is tremendously appreciated!