Skip to main content

I am new to FME desktop, so i understand that this question may be already answered or that i have missed the right transformer due to my unfamiliarity/noobiness.

Context: I am in the final stages of converting a combination of arcgis model builder, python and SQL processes that result in 15 "_new" datasets being produced and outputted into an SDE database (a weekly process - In FME i am working with full file replacements and not merged/replaced data.). The final step is to have the 'new' datasets become the 'current' datasets, and what is known as the 'current' data to become the '_old dataset (i.e. back up).

Currently the update (renaming) of these datasets into production is done manually (not ideal), so i am aiming to speed up the renaming and reduce the chances of human error.

In essence each of the 15 datasets in the database has a total of 3 datasets related;

  • '_old' = previous weeks data kept as back up
  • current data which has no _suffix, and
  • '_NEW' = updated/new data (that needs to replace the 'current' data)

 

Question: is their a way that i can bulk update/replace/rename the datasets (not their attributes) in FME so that;

1) all '_old' gets deleted (e.g. 'address_old.shp')

2) all '<current>' get renamed to '_old' (e.g. 'address.shp becomes 'address_old)

3) all '_NEW' get renamed to '<current>' (e.g. 'address_NEW.shp)

 

I can use python caller and write a script to do the renaming, but i was hoping to keep everything within FME. Does anyone have any suggestions 🙂

@courtknee82 I think a combination of the Directory and File Pathnames Reader and the File Copy Writer should do the trick. There's an example workspace here.


@courtknee82 I think a combination of the Directory and File Pathnames Reader and the File Copy Writer should do the trick. There's an example workspace here.

The shape files i am trying to rename as well as the output location are within an SDE database. I didn't think either of the Directory and File Pathnames Reader and the File Copy would work as when i go to connect neither recognise the path location of the sde (assumed this was because it wasn't a 'folder/file' format.


The shape files i am trying to rename as well as the output location are within an SDE database. I didn't think either of the Directory and File Pathnames Reader and the File Copy would work as when i go to connect neither recognise the path location of the sde (assumed this was because it wasn't a 'folder/file' format.

@courtknee82 someone with more SDE experience will have to help. I'm not sure how SHAPE files can be stored in an SDE database


@courtknee82 someone with more SDE experience will have to help. I'm not sure how SHAPE files can be stored in an SDE database

That's ok. Thank you for your help in any case.


Reply