Skip to main content
Solved

Converting multiple files to GDB with a dynamic schema and fanout


elzbietalekve
Contributor
Forum|alt.badge.img+8

I use Fme Form 2024.2.2. If I remember correctly, I used to convert multiple files in one process with an earlier versjon of Fme Form.

I have attached a file showing how I structured the fmw for to separate files and for multiple files.

I need to convert more than 100 files from Quadri format used in Norway to the GDB format.

When I convert two files separately, everything is OK.

The sise of gdb files are: 

Rp2 5,90 Mb

Kdp3 2,62 MB

But when I convert to files in one process something is going wrong. 

The size of files are:

Rp2 – 5,90 MB

Kdp3 – 154 kB

I have tried different combinations of the order of files and numbers of files.

It seems to me the first file is always Ok, but it fails from the second one onward.

I appreciate all kind of help

Ela

 

Best answer by nielsgerrits

I’m sorry but I do not understand what your issue is, but please see my example workspace. I would change it to your preferences and you’re good to go.

 

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

13 replies

crutledge
Enthusiast
Forum|alt.badge.img+29
  • Enthusiast
  • March 5, 2025

Hi There, I wonder if you need to use the fanout option. It is early in the morning here so I might need a coffee before replying :D but if you used the fme_basename in the destination path you should achieve your desired result. I hope this helps and good luck!
 

 


elzbietalekve
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 5, 2025

Hi,

I have tried your method, and as a result, I got just one file named @Value(fme_basename).gdb, which contains objects from two files (the size is 8.48 MB).

What I need as a result is 100 different files, each named according to fme_basename.

So, I still need help:)

 


crutledge
Enthusiast
Forum|alt.badge.img+29
  • Enthusiast
  • March 5, 2025

Gotcha. Well I wonder. If I remember correctly, File Geodatabases do not like to start with Numbers. If your file names start with something like 1234FileName I think that will give issues. That’s an ESRI thing. Let me know if that helps.


liamfez
Influencer
Forum|alt.badge.img+34
  • Influencer
  • March 5, 2025

@elzbietalekve Have you tried using the Fanout Dataset option? If you set the folder path in the main destination spot you can then use the fanout dataset option to control file creation using attribute values.

 


elzbietalekve
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 5, 2025

Hi,

It did not help. I used StringReplace to remove the numbers from the file names, but one file still converts incorrectly.

regards

Ela


elzbietalekve
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 5, 2025

Yes, I did. 

liamfez wrote:

@elzbietalekve Have you tried using the Fanout Dataset option? If you set the folder path in the main destination spot you can then use the fanout dataset option to control file creation using attribute values.

 

 

 


liamfez
Influencer
Forum|alt.badge.img+34
  • Influencer
  • March 5, 2025

Perhaps try using a SchemaScanner grouped by the fme_basename before sending to the writer (and make sure the schema is output first). Then use the created schema features for the dynamic writer.

If that does not help, do you have a copy of the log file that you can share, it could be helpful to see what it is saying.


nielsgerrits
VIP

If I needed this, I would create a user parameter from the inputfile and use a workspacerunner in a parent workspace and fire this child workspace for each sourcefile found.


elzbietalekve
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 7, 2025
nielsgerrits wrote:

If I needed this, I would create a user parameter from the inputfile and use a workspacerunner in a parent workspace and fire this child workspace for each sourcefile found.

I tried your suggestion. I created a child workspace where everything functions well. Then I defined a parent workspace with a workspace runner. I think I’m making a mistake somewhere because depending on the definition of parameters in the workspace runner, I get two different results, but neither of these solutions is what I’m looking for.

As a result, I want to obtain two different files with their own names but also with their own data.

Input for WorkRun is two quadri files

When I use just one filename in WorkRun as Source Gdm Files, I get two different files with data from both files

When I use two filnames in WorkRun as Source Gdm Files, I get the first file with its own data, and the second one contains data from the first one.

Parameter for File Geodatabase in WorkRun is: <destinasjon_catalog\@Value(path_rootname)

 

 


nielsgerrits
VIP
  • Best Answer
  • March 7, 2025

I’m sorry but I do not understand what your issue is, but please see my example workspace. I would change it to your preferences and you’re good to go.

 


elzbietalekve
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 7, 2025
nielsgerrits wrote:

I’m sorry but I do not understand what your issue is, but please see my example workspace. I would change it to your preferences and you’re good to go.

 

Thank you very much for zip file:). I will try to figure everything out based on your zip file. I quickly noticed that you use all files from a given directory. In my directory, there are about 300 files, and I need to convert over 100. Could I ask you, only if you have time, to explain why my fmw does not work? My thought process is incorrect as it seems, and I really care about why it does not work. I am attaching a zip fil with two fmw, input and output.


nielsgerrits
VIP

I’ll be mostly offline coming week but will try to remember to check.


elzbietalekve
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 7, 2025
nielsgerrits wrote:

I’ll be mostly offline coming week but will try to remember to check.

Thank you so much:). I modifiied your fmw, and everything works correctly. I added TestFilter to get the files I needed.


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