Question

Fanout Feature Classes to existing GDB using FC name

  • 27 January 2020
  • 1 reply
  • 4 views

Badge

I'm have a workspace whereby I get constantly new and updated data from the client.

Based on what the data is I'd like it to fan out to it's correct GDB.

The GDB's from the client come with all the data in one.

E.g.

ENV_Badgers

ENV_GCNs

HIS_Monuments

PRP_LandAcess

These need to be moved into their corresponding GDB's

E.g.

REF_ENV

REF_HIS

REF_PRP

My current Method is just to move them based on GDB, and I also use the Insert, Create If Needed function, then the Insert, Truncate Existing.

I've found if I used Drop and Create the workbench will break if there is new data (nothing to 'Drop'), same stands for Truncate Existing.

So two problems:

Fanout data into existing GDB based on name

Import new and updated data without having to run twice for Create and Truncate.


1 reply

Badge +3
Fanout data into existing GDB

 

Within the Writer parameters, you have the option to set the fanout. Assuming that the Geodatabases are in the same folder, you can create a parameter that will ask for the folder and use that parameter to set the fanout definition. You will need to create an attribute with the database name and can set it e.g. to 
REF_@Left(@Value(fme_feature_type),3).gdb
This way you'll have the database name in an attribute that you can use to built the Fanout expression. 

 

Import new and update

I would suggest to set the table handling to 'Create if needed'. You'll still need to set the database action, but you can use the attribute 'fme_db_operation' for that. It will be necessary to define this attribute, the ChangeDetector is a transformer that can be very helpful with that and it will already set the fme_db_operation attribute. 

 

Hope this helps for you.

Reply