Skip to main content

Hi guys,

I am trying to automate a process which requires to write into a new file-geodatabase everytime I run a translastion. Essentially I am reading data from 1 database trying to stage it in a new geodatabase and then moving it to its final destination. I am using FeatureWriter to continue the translation but i am getting a geodatabase is locked error. That is why I am trying to create a new file geodatabase for the staging part of the process as this is where the error keeps on occurring. Is there a way that FME workbench can create a new file geodatabase for my feature classes in a same workbench?

Thanks!

I’m not sure what you’re requirements are for naming, however, you can configure the filename of the geodatabase from attribtues, for example an id ur uuid. 

 

In the case above I’ve created an attribute called “id”, this will be used to build the filename.

I’m not sure if this answers your question here though.

Another option could be to create a temporary location, there is a transformer called “TempPathnameCreator”. This creates a folder in your system temp folder, you can output your temp data there. The geodatabase will automatically get deleted when the workspace finishes running. 


Hi virtualcitymatt

I'm moving about 13 feature classes so I'm not sure where you have created this attribute called “id”. 


When I need this I use a scripted parameter (Navigator, User Parameters) to generate a datetimestamp which I use for the filename of the featureclass.

import datetime return datetime.datetime.now().strftime("%Y_%m_%d__%H_%M_%S")


Hi virtualcitymatt

I'm moving about 13 feature classes so I'm not sure where you have created this attribute called “id”. 

In this case I just used an AttributeCreator transformer just to show the example for the screenshot. You need to figure out a method you like. I think using the scripted parameter that @nielsgerrits suggested could is nice because it will just always create a new geodatabase with the timestamp on it. 
You just need to use the Parameter in the file path instead of an attribute.


Reply