Question

Data download service with multiple readers

  • 18 June 2013
  • 6 replies
  • 3 views

Badge
What is the best way to read multiple feature types, from multiple different data sources for data download service? I expect there will be 75+ feature types, mostly coming from one or two different SDE databases, but there will also be file-based (likely file geodatabases and/or shapefiles) coming from different sources via http/ftp.

 

 

All the examples I've seen for data download have the feature types coming from one reader and use the Feature Types to Read parameter to give the user the ability to choose which feature types to download.

 

 

Based on what I've found I'm thinking I need to use a FeatureReader(s) but I couldn't find examples on how to implement it for multiple data sources. I hope that's clear and I apologize if the answer is already out there, I just couldn't find it.

 

 

Thanks,

 

Michael

6 replies

Userlevel 4
Badge +13
Hi Michael,

 

 

Although I have never tried it myself, my first try would be to connect all feature types to read parameters from all of your readers (or feature readers) into one general feature types to read parameter that is published to the user.

 

Could it be that simpel? I sure hope so :)

 

 

Itay.

 

 

 

Badge
Itay,

 

 

Thanks for your reply.

 

 

I think I've tried what you suggest and if I understand and I'm doing it correctly, it doesn't work. I currently have four different readers set up for testing and have the Feature Types to Read parameter published on one of them (the first reader). I then added the feature types from the other three readers to first reader's Feature Types to Read parameter (the one that is published) by editing the Definition and adding to the feature types list from another dataset. I can download all the feature types but the workspace only seems to respect my choice of feature types to read from the first reader (the one with the Feature Types to Read parameter published). In other words, the other three readers I added are always downloaded, whether or not they are selected in the published Feature Types to Read parameter when the workspace is run.

 

 

My next attempt was to link the other three reader's Feature Types to Read parameter to the published parameter but then the parameter only lists the feature types from the last reader I linked to.

 

 

So, if I'm doing it correctly, it seems like a published parameter (Feature Type to Read, in this case) can only be associated with a single reader?

 

 

Thanks,

 

Michael
Userlevel 4
Badge +13
Hi Michael,

 

 

What happens if you link all the feature to read parameters into one parameter and then add all the features types?

 

 

Itay
Badge +11
I'm not sure I understand exactly what you're trying to do but I've had success in using the FeatureReader transformer for this type of thing.

 

You need some kind of trigger feature for each reader, which can specify details of feature types to read. You would have one FeatureReader for each potential data source that you need to read from.

 

If you need extra customisation of parameters of each FeatureReader source data type you can do that by adding a "Reader as a Resource". (More information on this capability can be found at: http://docs.safe.com/fme/html/FME_Workbench/Default.htm#add_reader_as_resource.htm)

 

Nic
Each FeatureReader will only support one reader or source dataset. If you want to allow the users to select which feature types to read from multiple readers then I think you should be using a scripted parameters to build the Feature types to read for each reader OR use the scripted parameters approach to build the feature type list for each FeatureReader. This article has a section on Scripted Parameters. There's another article on scripted parameters for some additioanl ideas

 

 

 

Badge
Thanks everyone! I ended up using scripted parameters with FeatureReaders.

Reply