Skip to main content
Solved

"Feature reader - dynamic" question


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

Best answer by jkr_wrk

Here it is:

View original
Did this help you find an answer to your question?

6 replies

david_r
Celebrity
  • July 6, 2021

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")

jkr_wrk
Influencer
Forum|alt.badge.img+29
  • Best Answer
  • July 6, 2021

Here it is:


  • Author
  • July 16, 2021

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


  • Author
  • July 16, 2021

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

 

 


david_r
Celebrity
  • July 16, 2021
josephjose wrote:

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.


  • Author
  • July 17, 2021
david_r wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings