OGC GeoPackage Writer Feature Type Parameters
General
Table Name
The name of the table to be written. If a table with the specified name exists, it will be overwritten if the Table Handling parameter is set to Drop and Create. Otherwise the table will be appended.
Valid values for table names include any character string devoid of SQL-offensive characters and less than 255 characters in length.
Dynamic Schema Definition
Table: General
This parameter specifies how features will be written into the destination table. Supported feature operations are described below. Note that the described behavior can be dependent on the selected options, as well as the underlying table properties.
- More information about Feature Operations.
- More information about the PrimaryKey user attribute.
-
When you create a Geopackage, the update/delete/fme_db_operations Feature Operation uses a primary key that is automatically created by FME. The attribute is usually id.
Option |
Description |
If the Row Does Not Exist |
If the Row Exists |
Insert |
The writer appends a new row to a table using input feature attributes. |
The writer creates a new row using input feature attributes. |
Not always applicable: if the table does not have a unique key or it has an automatically generated unique key, insertion is always possible. The database cannot violate its key constraints; therefore, errors can occur on row insertion. For example, if there is a unique key and a user specifies the value with the feature, and the feature already exists, then FME Workbench logs an error. This error might be in the form of a rejected feature, or the database may stop processing altogether. |
Update |
The writer updates existing row(s) in a table using input feature attributes. |
The writer rejects the input feature or logs an error if it is unable to continue. |
The writer only changes values of the existing row(s) corresponding to the input feature that differ from the input feature. |
Upsert |
The writer appends a new row or updates an existing row(s) using input feature attributes and/or geometries. |
The writer creates a new row using input feature attributes and/or geometries. |
The writer changes values of the existing row(s) corresponding to the input feature that differ from the input feature. It leaves other attributes untouched. |
Delete |
The writer deletes an existing row(s) in a table. |
The writer rejects the input feature or logs an error if it is unable to continue. |
The writer deletes existing row(s) corresponding to the input feature. |
fme_db_ |
The feature operation will be determined by the attribute fme_db_operation on each input feature. The value of fme_db_operation will be processed according to the steps below. Note: The processing steps listed below depend on a format's available Feature Operation options.
|
The action depends on the operation; however, in general, if nothing is specified, the value is treated as an Insert. | The value is treated as an Insert. |
Table Handling
This parameter controls how the feature type handles destination tables. These options are available:
- Create If Needed – Create destination table if it does not exist. The GeoPackage writer uses the information within the FME workspace to automatically create Vector Feature tables as required. All tables will be created when the first input feature is processed. If no features are sent to a feature type, then the corresponding table will not be created.
- Use Existing – Write to an existing table or list. If the destination table/list does not exist, the translation will fail.
- Drop and Create – Drop destination table if it exists, then create it. The writer will drop and re-create the table before writing any features to it. Tables will be overwritten when the first input feature is processed. If no features are sent to a feature type, then the corresponding table will not be overwritten.
Table Creation
The parameters in this section take effect only when FME creates a table.
Spatial
The parameters in this section take effect only when FME creates a spatial table (a GeoPackage features table).
If the geometry type of the feature type is geopackage_none, FME will create an aspatial table (a GeoPackage attributes table), and the parameters in this group will be ignored.
Spatial Column
If a table is being created, this parameter allows you to specify the name of the geometry column.
The default name is geom.
Indicates whether or not a spatial index is to be created as part of the data writing.
Valid choices: Yes (default), or No.
Z
Indicates whether geometries written to the table can have a third dimension.
- Optional (default) – The writer will write Z values if they exist.
- Not Allowed – The writer will drop Z values from geometries before writing.
- Required – The writer will add a Z value of 0 to geometries if they do not already have a Z value.
M
Indicates whether geometries written to the table can have measures.
- Optional (default) – The writer will write default measure values if they exist.
- Not Allowed – The writer will drop default measure values from geometries before writing.
- Required – The writer will fail to write geometries if they do not already have a default measure value.