Skip to main content
Solved

Reading multiple .shp files with the FeatureReader and dynamically exposing all attributes


robert_d

I made a workspace to automatically download spatial information from an API using the HTTPCaller. The API replies with a .zip file, with .shp files within these .zip files. In this workspace I want to unzip the API’s response and import the shapefiles into my PostGIS database.

I use the unzipper to unzip the shapefiles and the tester to filter the .shp files. I use the AttributeKeeper to filter all the unused attributes. Then I want to use the “windows_path” attribute as a data source for the FeatureReader (in this case its 23 different .shp files).

My goal is to write each shapefile into my database dynamically using the fme_feature_type as Table Name. It has to be dynamical since I want to use this workspace to download different datasets from the API.

My workspace doesn't work no matter what I try, and i don't know what I'm doing wrong.

When I open the FeatureReader, it looks like this:

When I run this it shows no attributes, since I still have to expose them all.

I tried to solve this by using the Schema from the FeatureReader in the Dynamic Writer.

My Schema looks like, the attributes seem to be listed:

Any idea what i'm doing wrong? Or have suggestions to help me?

 

 

Best answer by lau

The best option (if the problem comes from the table qualifier) is to set the parameter "Schema Definition Name" to fme_feature_type. By default it is set to "Default from Table name above" and I suspect that this default setting takes the table qualifier into account.

Keep us inform!

View original
Did this help you find an answer to your question?

6 replies

lau
Forum|alt.badge.img+3
  • April 26, 2019

Hi Robert,

Could you provide your log file?


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • April 26, 2019

I think the table qualifier might be the issue here. Are you able to try without?


lau
Forum|alt.badge.img+3
  • April 26, 2019
ebygomm wrote:

I think the table qualifier might be the issue here. Are you able to try without?

Yes, I think it too. That's why I ask for the log file. If the problem is due to the table qualifier, you should have some warnings saying the schemas are not existing...


lau
Forum|alt.badge.img+3
  • Best Answer
  • April 26, 2019

The best option (if the problem comes from the table qualifier) is to set the parameter "Schema Definition Name" to fme_feature_type. By default it is set to "Default from Table name above" and I suspect that this default setting takes the table qualifier into account.

Keep us inform!


robert_d
  • Author
  • April 26, 2019
lau wrote:

The best option (if the problem comes from the table qualifier) is to set the parameter "Schema Definition Name" to fme_feature_type. By default it is set to "Default from Table name above" and I suspect that this default setting takes the table qualifier into account.

Keep us inform!

Thanks for the tip,

Problem solved!

I added a attributeCreator to create newname with the <mytablequalifier>.fme_feature_type as table name and then i used fme_feature_type as Schema definition name.


robert_d
  • Author
  • April 26, 2019
ebygomm wrote:

I think the table qualifier might be the issue here. Are you able to try without?

Thanks for your help


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings