I am using a SchemaScanner to prepare a dataset for dynamic writing to a PostGISWriter. How do I write to the columns for PrimaryKey and Geometry in an dynamic environment?
Solved
Write to 'Primary Key' and 'geometry_column' in a Dynamic PostgisWriter?
Best answer by nielsgerrits
If you configured the FeatureWriter to be dynamic, you can add attributes in the tab User Attributes. Add a row with Name = pkey, Type = serial and Index = PrimaryKey and it will add this to all tables.
The geometrytype is an issue. The mapping in the PostGIS writer is always to generic geometry type, no matter what input geometry. So it will become...
geom geometry(Geometry,28992)
...and not...
geom geometry(Point,28992)
...which you probably need.
If I needed this now, I would use the SchemaFeature from the SchemaScanner to create the table using a SQLExecutor before the data features enter the FeatureWriter.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.