Select to view content in your preferred language

Geodatabase - Copy Featureclass Names to Excel

215
3
09-11-2024 05:38 AM
sdavidson
New Contributor

I was given access to an enterprise feature database. I would like to systematically go through the featureclasses in the database to determine how they work together. My plan was to take a list of the featureclasses and keep notes on where different information is stored, then I can reference this as I figure out how the pieces fit together.

My plan was to copy the list into excel and start putting notes on what each featureclass contains, and then use this as a reference as I figure out how the different featureclasses work together. Is there a way to copy the list to a text file, export as csv, or just copy into excel?

At this point I will simply be copying each name into excel, but there must be a quicker way.

0 Kudos
3 Replies
RichardHowe
Frequent Contributor

Tiny bit of python will get you where you need to be:

ListFeatureClasses is your friend

There's an example at the bottom of the help page. You can print your result to the python window in Pro and copy and paste the whole thing to excel

0 Kudos
Bud
by
Esteemed Contributor

What version of Pro?

3.2 has a new Generate Schema Report tool@JonathanMurphy 


What kind of database? Oracle, SQL Server, or PostgreSQL?

If I remember correctly, there is a geodatabase system table called GDB_ITEMS in the SDE owner (Oracle) that has a list of GDB tables.

 

There are also Oracle system tables.

for all views (you need dba privileges for this query)

select view_name from dba_views

for all accessible views (accessible by logged user)

select view_name from all_views

for views owned by logged user

select view_name from user_views
0 Kudos
ChrisUnderwood
Esri Contributor

Hello @sdavidson , in your Enterprise Geodatabase there will be a table called SDE.sde_layers (or DBO.sde_layers SDE.layers or similar depending on your database type). The table_name column will give you a list of all the registered datasets which will be like your list of Feature Classes.

select table_name from [database].[sde].[SDE_layers] order by owner, table_name

0 Kudos