Skip to main content
Solved

Add to Multiple Feature Writers at once?

  • December 19, 2019
  • 3 replies
  • 73 views

I'm going from ESRI Shape Files to PostGIS and trying to add a primary key to all my tables so that Mapserver and other queries are happier with the unique Primary Key. I see from https://knowledge.safe.com/idea/74374/postgres-writer-add-unique-primary-option-for-inde.html that I can add a Serial and that works well but I'd like to add that to 20, 30, or even 50 shape files at a time. Is it possible to do this as a batch?

Thanks!

Best answer by markatsafe

@andrewteg I'm not sure if you're asking if you can create a primary key or type serial: yes you can, Use Data type: Serial and Index: Primary Key

Or if you're asking about a dynamic workspace - see this recent post: https://knowledge.safe.com/questions/104765/append-multiple-esri-geodatabases-into-one.html?childToView=104770#answer-104770 File Geodb, but same steps.

For a dynamic workflow, you can append the shape files to the same PostGIS table or have separate tables for each Shape file.

But... if you want to add an attribute to a dynamic workflow, then add an attribute to the writer feature type, then that attribute will get added to all the output tables that the dynamic workflow creates

I've attached a workspace that illustrates how this works: serialprimarykey.fmwt

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

Forum|alt.badge.img+2
  • Best Answer
  • December 19, 2019

@andrewteg I'm not sure if you're asking if you can create a primary key or type serial: yes you can, Use Data type: Serial and Index: Primary Key

Or if you're asking about a dynamic workspace - see this recent post: https://knowledge.safe.com/questions/104765/append-multiple-esri-geodatabases-into-one.html?childToView=104770#answer-104770 File Geodb, but same steps.

For a dynamic workflow, you can append the shape files to the same PostGIS table or have separate tables for each Shape file.

But... if you want to add an attribute to a dynamic workflow, then add an attribute to the writer feature type, then that attribute will get added to all the output tables that the dynamic workflow creates

I've attached a workspace that illustrates how this works: serialprimarykey.fmwt


  • Author
  • December 20, 2019

Thanks, I did see that Serial and Primary Key would create what I needed, but I was using Manual over dynamic. I'll have to give dynamic a shot and see how that works as I'm hoping to convert a few hundred shape files overall and looking for any shortcuts I can find!


Forum|alt.badge.img

Thanks, I did see that Serial and Primary Key would create what I needed, but I was using Manual over dynamic. I'll have to give dynamic a shot and see how that works as I'm hoping to convert a few hundred shape files overall and looking for any shortcuts I can find!

Did this work for you?