Select to view content in your preferred language

List of all Features within a GDB and export it to CSV

76
0
Friday
Status: Open
CarlosLuna
Emerging Contributor

Good Day to All,

I'm a long time developer first time Esri Developer and I wanted to share a little python script i wrote that would get all the featureclasses within a database and export them to CSV. As I ran into the issue where there was no easy way to obtain the metadata via SQL Queries. So I decided to use the python API calls with arcpy.

 

Also I separated the files, one gets all of the feature classes (title only and some descriptions) but then the second file is to get the metadata of each feature class itself -- you must view its metadata (saved as an XML) directly. In the end I saved the results into a CSV.

Let me know if stuff like this is useful for here. I have also written python code to get data out of our organization's ArcGIS Online (i can write a separate post about this at a later time).

 

Code found here also:

 

https://github.com/lunasnest/Arcpy/tree/main/get_feature_classes

 

 

Cheers