Question

Read multiple Table and conbine them by feature type


Badge +10

Hello there

we have an ESRI geoDB with 244 table there named based on the dataset type, City name and Zone as you see on the attached excel we want to combine them based on the dataset and Zone then use the reproject them in one coordinate system, in order to get all those tables only by dataset name

I did manage to extract the table name and build the excel in order to make groups

Any idea


4 replies

Userlevel 3
Badge +17

Hi @boubcher, I think it's a typical case to which Dynamic Workflow can be applied effectively.

  1. Add an Excel reader to read the table which defines mapping rule between source feature type name and destination feature type name.
  2. Add a Geodatabase reader using the Single Merged Feature Type option, in order to read all the features from every table in the source dataset with a single reader feature type <All>. Expose "fme_feature_type" if it wasn't exposed automatically.
  3. Merge destination table name (Table_zone) to all features with a FeatureMerger using source feature type name as the join key. Alternatively the DatabaseJoiner could also be used here.
  4. Reproject the coordinate system for every feature.
  5. Write the features into a destination dataset with a dynamic writer feature type.

Just be aware the source feature types which would be combined into the same destination feature type should have the same schema definition (i.e. structure of user attributes and geometry type).

See also this article and some related articles to learn more about Dynamic Workflows.

Badge +10

Thanks Takashi

How can I combine in this process all the table with the same table name ?

Userlevel 3
Badge +17

Thanks Takashi

How can I combine in this process all the table with the same table name ?

Do you need to combine all the source tables into a single destination table?

 

I thought the destination table for each source table should be determined by the Excel table. For example, "AdminBoundaries_MadZ37/Governorates_MadZ37", "AdminBoundaries_tabZ37/Governorates_tabZ37", ... should be combined into "Governorates_37", and so on.

 

The dynamic workflow I posted does that automatically. That is, for each feature, the destination table would be determined by the value of "Table_zone", and the schema of each destination table would be configured according to the schema of a source feature type which would be determined by the value of "fme_feature_type".

 

Am I wrong?

 

Badge +10

@takashi

we are writing to Post GIS , and even when we specify the schema, it still writing to the public schema

I have gone through posted articles, but still the same problem

https://knowledge.safe.com/questions/55645/dynamic-output-to-sql-server-no-table-qualifierdat.html?&childToView;=71254#answer-71254

https://knowledge.safe.com/questions/71221/postgis-writer-fanout-for-feature-type-failed-to-f.html

Reply