Skip to main content
Hello,

 

 

I have a complex workbench on FME Desktop 2014 that transforms a input file Geodatabase to a GML compliant with an user define schema. This workbench is working and now I would like to use it with input files in gml format (obtained from file Geodatabase, so both have the same structure).

 

 

One solution is to create a copy of the working workbench and modifying only the input conexions, but if is possible I would like to maintain only one workspace. 

 

 

My idea is to create two workspaces: one with the main ETL tool and other with the transformer that selects each format (gdb or gml). I don't know how to develop that format chooice. Could you give me any advice about how to solve this problem ?

 

 

Thanks in advance.

 

Ari
Hi Ari,

 

 

The Generic (Any Format) reader might help you.

 

 

1) Add temporarily GEODATABASE_FILE reader and GML reader to create published parameters for selecting their source datasets.

 

 

2) Create these private parameters so that the source dataset parameters will not be removed automatically when removing the temporary readers.

 

Type: Text, Name: GDB_SRC, Value: $(SourceDataset_GEODATABASE_FILE)

 

Type: Text, Name: GML_SRC, Value: $(SourceDataset_GML)

 

 

3) Remove the temporary readers.

 

 

4) Create a published parameter that will be used to choose format.

 

Type: Choice, Name: FORMAT, Configuration: GDB%GML

 

 

5) Create a private parameter to return source dataset path (*.gdb or *.gml) according to the format choice.

 

Type: Scripted (Python)

 

Name: SRC_DATASET

 

Value (script):

 

return FME_MacroValuesu'GDB_SRC'] if FME_MacroValues 'FORMAT'] == 'GDB' else FME_MacroValuesl'GML_SRC']

 

 

6) Add the Generic (Any Format) reader; link its "Source Dataset" parameter to the "SRC_DATASET".

 

 

You can then choose the format, and select GDB folder or GML file through the published parameters.

 

Hope this helps.

 

 

Takashi
Thanks a lot Takashi !

 

 

I will try the Generic Reader Transformer together with the Workspace Runner and I will give you my feedback.

 

 

Nice weekend !

 

Ari.

Reply