GeoPackage Writer: Feature Type Parameters
Table Settings: General
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.
- 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.
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.
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 and/or geometries. | The writer creates a new row using input feature attributes and/or geometries. |
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 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 and/or geometries. A selection method must be specified in the Row Selection group. |
The writer rejects the input feature or logs an error if it is unable to continue. | Changes only values of the existing row(s) corresponding to the input feature that differ from the input feature. |
Delete |
The writer deletes an existing row(s) in a table. A selection method must be specified in the Row Selection group. |
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_ operation |
The feature operation will be determined by the attribute fme_db_operation on each input feature. A selection method must be specified in the Row Selection group. The value of fme_db_operation will be processed as follows, depending on available options:
Note about earlier FME versions: To use fme_db_operation, you must set Feature Operation to this option. In previous versions of FME, you could set fme_db_operation when the destination feature type was set to Insert, Update, or Delete. Doing this now will cause feature rejection. |
The action depends on the operation; however, in general, if nothing is specified, the value is treated as Insert. | The value is treated as Insert. |
Controls how the feature type handles destination tables or lists. These options are available:
- Use Existing: If destination table/list does not exist, the translation will fail.
- Create If Needed: Create destination table/list if it does not exist.
- Drop and Create: Drop destination table/list if it exists, and then create it.
- Truncate Existing: (This option is not available for all formats.) If destination table/list does not exist, the translation will fail. Otherwise, delete all rows from existing table or list.
Row Selection
When Feature Operation is set to Insert, this parameter is ignored.
When Feature Operation is set to Update or Delete, the value of the selected ID Attribute will be matched to the value of the _id row of an existing table. This attribute uniquely identifies the row.
Table Creation Parameters
The parameters in this section take effect only when FME creates a table.
If a table is being created, a primary index column is created with this name.
Table Creation Parameters: Spatial
The parameters in this section take effect only when FME creates a spatial table (a GeoPackage features table). If this section is disabled, FME will create an aspatial table (a GeoPackage attributes table).
If a table is being created, this parameter allows you to specify the name of the geometry column.
Indicates whether or not a spatial index is to be created as part of the data writing.
Valid choices are Yes or No.