Skip to main content

I have a py script. It takes in 3 parameter,

  1. Input file gdb
  2. FeatureClass name
  3. Output file gdb

What it does, is to copy the contends of the featureclass to the outputfile gdb and I would like to convert it to FME

 

Can some help me with this conversion? Please remember it may be configured for any filegdb and any featureclass name so a static linking won't work. My initial findings is the use of "Generic" option of FeatureReader

I would avoid using the Generic reader. Starting with an empty workspace:

  • Add a File Geodatabase reader and make sure to specify "single merged feature type" to enable dynamic schema.
  • Add a File Geodatabase writer and make sure to specify "Feature class or table definition" = "Dynamic (advanced)"
  • Connect the reader to the writer

You now have a workspace with three published parameters, which should do what you want:

  1. Input file gdb ("SourceDataset_GEODATABASE_FILE")
  2. Feature class name ("FEATURE_TYPES"). This can also be a list of several feature class names.
  3. Output file gdb ("DestDataset_GEODATABASE_FILE")

Here it is:


Oh damn. I broke my head trying to get this. Thanks David and jkr


One more question, suppose I have to do a transalation say filter certain records, what are the options?

 

 


One more question, suppose I have to do a transalation say filter certain records, what are the options?

 

 

You can insert a Tester or a TestFilter between the reader and the writer. If you want to filter by feature class, make sure you expose fme_feature_type on the reader, it will contain the feature class name.


You can insert a Tester or a TestFilter between the reader and the writer. If you want to filter by feature class, make sure you expose fme_feature_type on the reader, it will contain the feature class name.

I am looking at the workspace by jkr_da. if you downloaded that, I feel you can get the problem I am facing.

He is using a featureReader and exposes the schema and data. How do I handle that situation? Does FME have an InMemory-Table transformer?

 


Reply