Skip to main content

I need to make an inventory of the GIS data my organization has. As a first step, I need to make a list of the names of the Feature Classes in each of our File Geodatabases.

 

Is there a way to extract a list of the Feature Class names (not the attributes or schema) from a File Geodatabase(s) to Excel using FME?

 

I know how to do this in python in ArcGIS Pro, but given I am relatively new to FME, I thought I would try it in FME.

One way to do this I use a FeatureReader (initiaded by a Creator) with the format "Esri Geodatabase (File Geodb)" and select the parameter "Schema Features" under Schema/Data Features. This will return a schema feature for each Feature Class in a GDB. When you want to find all .gdb's in a directory you can use a Directory and File Pathnames FeatureReader and feed the resulting paths in the next FeatureReader. Sample workspace attached.

 

2023-01-24_05h11_59 

As an alternative you can do this as well using python in a PythonCaller.


Thanks, this is exactly what I needed.

 

What is the best way to include the Feature Class Geometry Type (Point, Line, Polygon) in the result?


@timh​ The schema includes a list attribute with the geometry and another with all the attributes:

  • fme_geometry{0} fme_point
  • attribute{7}.name SCAMAX
  • attribute{7}.native_data_type range_domain(ScaleMaximumDomain:integer:1:999999999)

an domains, if you select resolve domains


Hi

 

I was able to extract the MDB Names succesfully..

 

I want to write dynamically the features in MDB to GDB similar name

  • MDB name to GDB Name
  • MDB FC to GDB FC
  • All attributes of that Feature class of MDB to the NEW FC of GDB

Any Guidance and workaround Please

I have attached the template

 

Thank U


Hi

 

I was able to extract the MDB Names succesfully..

 

I want to write dynamically the features in MDB to GDB similar name

  • MDB name to GDB Name
  • MDB FC to GDB FC
  • All attributes of that Feature class of MDB to the NEW FC of GDB

Any Guidance and workaround Please

I have attached the template

 

Thank U

You are looking for a dynamic workflow. Please see Tutorial: Dynamic Workflows

 

Steps to get what you need:

  • Before the FeatureReader, use a FilenamePartExtractor to get the mdb name from the path_windows attribute.
  • Connect FeatureReaders Schema and Generic outputports to one FeatureWriters inputport.
  • In the FeatureWriter
    • Set the Format to GDB.
    • Set the Dataset to an outputfolder, use the MDB filename attribute in the path.
    • Enable the "Dynamic Schema Definition" checkbox.
    • In the tab User Attributes, radiobutton Dynamic and remove all attributes.

Thanks for your guidance

 

I followed your steps

Its didnt create any GDB in the output i provided

Set the Dataset to an outputfolder, use the MDB filename attribute in the path

 

Can you please have a look

 

Thanks

 

 


Thanks for your guidance

 

I followed your steps

Its didnt create any GDB in the output i provided

Set the Dataset to an outputfolder, use the MDB filename attribute in the path

 

Can you please have a look

 

Thanks

 

 

  • Remove the AttributeExposer and the Sorter, you do not need those.
  • Connect the Schema outputport from the FeatureReader to the same inputport in the FeatureWriter. The schema feature carries the schema, column names and types, geometry type.
  • In the FeatureWriter, update the path to something like
C:\TMP\New folder (32)\output\@Value(path_rootname).gdb

 


  • Remove the AttributeExposer and the Sorter, you do not need those.
  • Connect the Schema outputport from the FeatureReader to the same inputport in the FeatureWriter. The schema feature carries the schema, column names and types, geometry type.
  • In the FeatureWriter, update the path to something like
C:\TMP\New folder (32)\output\@Value(path_rootname).gdb

 

Can you send me screenshot for 2nd point please

 

Didnt get exactly

 

Apologies


Followed the steps and did the changes and got the results in different way

feature classes were not created instead a schema layer created and asking spatial relation

 

image.png


Followed the steps and did the changes and got the results in different way

feature classes were not created instead a schema layer created and asking spatial relation

 

image.png

Ah now I see, the sample you used was to get the schema's. You want to do the data. So you need to change the FeatureReader's format from Schema (Any Format) to Esri Geodatabase (Personal Geodb).

 

2023-11-08_13h35_01


I received following after the changes as

and didnt great any GDB


Log file attached..

 

Apologies for to many queries


Log file attached..

 

Apologies for to many queries

Pretty please with sugar on top, also connect the schema output port to the featurewriter inputport, as printscreened in my previous answer.


Pretty please with sugar on top, also connect the schema output port to the featurewriter inputport, as printscreened in my previous answer.

I read mail directly and worked on it and didnt notice the screenshot

Apologies @nielsgerrits​ 

 

By the way, I received the error and it doesnt write all feature class of first MDB and gave an error..

 

Your kind suggestion is required

 

Thank U

 

image.png


Sorry forget to attach log file

Log file attached

 


I surrender 😕 this should just work, and I run out of time.


I surrender 😕 this should just work, and I run out of time.

No Problem..

 

I'm trying to figure it out .

 

Thank U


No Problem..

 

I'm trying to figure it out .

 

Thank U

Here I am again. 🙂 Created a new sample workspace for you. You should only have to change the input, the output and the FeatureReader to personal geodatabase mdb, I do not have 32 bit FME installed so I can't select that one now.

 

I added AttributeCreators and a Sorter to sort the data and schema files, to force the schema features arrive at the FeatureWriter before the data features. This is what your log is complaining about.

 

Let me know if it works.


No Problem..

 

I'm trying to figure it out .

 

Thank U

Thanks @nielsgerrits​  for the support..

 

I just want to know as even in my Machine , I too have latest edition of FME 2023.1.1.1 which is 64 Bit..

 

As 32bit is stopped since 2021 , In this case we dont have any other possibility or I need to Setup older version and then migrate it..

 

Please can you Guide me

 

Thanks Again

 


No Problem..

 

I'm trying to figure it out .

 

Thank U

Thank you for the Workspace

 

Its Working


No Problem..

 

I'm trying to figure it out .

 

Thank U

Great 🙂 thanks for the feedback. I assume you installed a a 32 bit 2021 fme?


Yes. You are right

 

But with Higher version , Need to figure out


Reply