Skip to main content

My question is about the following: I want to create Geopackages from about 20 Oracle spatial datasets. Each dataset must be stored in a separate geopackage.

For Example: Oracle dataset 1 must become Geopackage 1, Oracle dataset 2 must become Geopackage 2.  The names from the Oracle dataset must also be copied into the Geopackage.In addition, each Geopackage must be zipped.

Is there a way to automate this in FME? I was already thinking about the AttributeExposer, but I can't get it to work.

Thank you in advance.

Hi @fme_dr22_forum,

Thank you for the question! Appreciate it!

If you're looking for a way to automate converting oracle datasets to different geopackages there is a number of ways of doing this.

The best way to go about this would be to use an AttributeExposer (used to make the 'fme_feature_type' attribute visible), then use a AttributeManager (create a new attribute 'output_path', this will define the output file path for each GeoPackage. e.g. /geoPacakge/@Value(fme_feature_type).

Finally implementing a Dataset Fanout (using 'FeatureTypeFanout' on the 'output_path'it instructs FME to create a separate GeoPackage for each unique value of 'output_path').

This article may also be of use to you - Setting Dataset Fanout
Hope this helps! 

Donal.


Adding the documentation for zipping to go along with the documentation for dataset fanout already provided.

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/Workbench/zip_files_writing.htm


Thank you for your answers. I'm busy with some other things now. When I'm ready, I'll try out your tips.


Hi @fme_dr22_forum,

Thank you for the question! Appreciate it!

If you're looking for a way to automate converting oracle datasets to different geopackages there is a number of ways of doing this.

The best way to go about this would be to use an AttributeExposer (used to make the 'fme_feature_type' attribute visible), then use a AttributeManager (create a new attribute 'output_path', this will define the output file path for each GeoPackage. e.g. /geoPacakge/@Value(fme_feature_type).

Finally implementing a Dataset Fanout (using 'FeatureTypeFanout' on the 'output_path'it instructs FME to create a separate GeoPackage for each unique value of 'output_path').

This article may also be of use to you - Setting Dataset Fanout
Hope this helps! 

Donal.

 

Good afternoon @donalmateer,Your solution works fine. Unfortunately I get the following error message. FME indicates that the id has an unsupported type 'int'. The Primary key must have type 'int,Primarykey. 
Now I also came across this topic and I read that it may have to do with a BUG (https://community.safe.com/data-7/ogcgeopackage-writer-primary-key-attribute-id-has- unsupported-type-mediumint-18679) .Do you have any idea how I can get around this problem? If I remove the ID in the writer (manually), everything works fine. The point is, I need the ID. I tried making the ID the data type mediumint. Unfortunately this didn't help either.
Kind regards, Wim 

 

I also have the following general question. It would also be nice if I received the appropriate attribute tables for each Geopackage. Now I receive all attribute tables of all datasets. The attribute tables that do not belong to the specific dataset are then not filled.

 

Is there a way to make this neater so that you only see the attribute tables that belong to the specific dataset?

 

 


Reply