Skip to main content

Hi Team,

I need assistance in optimizing the FME package. I am new to FME. I have a workbench with reader as OGC Geopackage and writers as csv,shp, json (same data but created different output). I have 5 geopackages . I need to update the reader everytime in order to create the output files. I cannot join or merge these files. Is there any way, after one reader reads 1.gpkg and completed the flow, it pick 2.gpkg and continue execution till last available package. Also I want to update the writer dynamically based on the input files. In SSIS, we have a for each loop container. Is there any way to loop through the files and creates output files.

 

Currently, I am changing the readers and writer to execute one gpkg. So if I have 5 inputs, I am changing reader and writer everytime. This is manual process and high chances of human error.

Hi @nivini​ ,

 

if I understand correctly your case, you can develop a "master" workspace to:

  • read the filenames with a Directory and File Pathnames Reader;
  • run a "secondary" workspace with a WorkspaceRunner, once for each file do the job.

 This may work as long as the input datasets for the "secondary" workspace have the same schema.

 

Hope that helps!


@nivini​  There are two aspects here I think. The first reading different Geopagakages and writing out the results. It's hard to tell from your question, but if you need to add a new reader and writer for each Geopackage then I have to assume that each of the five datasets has different schemas (data model) - otherwise you can just change the file name (Source Dataset). The second is automating the process so you only have to run one job to complete all five data conversions.

For the first you have two options:

  • create five different workspaces. this is the easiest and works well provided your five source Geopackage schemas (data models) don't change from day to day.
  • the other approach is to use a dynamic workflow. This allows FME to read any Geopakage data model. Good if you're not doing a lot of data manipulation. This tutorial will led you through dynamic workflows.

For the automating part you have a few options;


Reply