CouchDB Writer: Feature Type Parameters
To access feature type parameters, click the gear icon on a feature type in the workspace to open the Feature Type Parameter Editor. To always display the editor in Workbench, you can select View > Windows > Parameter Editor.
General
All feature types share similar General parameters, which may include the Feature Type Name, Reader or Writer Name, and Geometry.
In most Writer Feature Type parameter dialogs, you can also control Dynamic Schema Definitions. Some database formats accept a Table Qualifier prefix on the output table feature type.
See Editing Writer Feature Types for more information.
These parameters apply only to a selected feature type, not to the entire writer.
Tip: If a feature type parameter listed here conflicts with a writer-level parameter, then the writer parameter will be ignored and this feature type parameter will be used.
Table Settings: General
This parameter lets the user specify how features will be written into the destination database. Supported feature operations are:
- Insert: Append documents onto the destination database using attributes on features.
- Put: Creates new documents in the destination database. If a document with the same ID already exists, the existing document is overwritten by the new document. A selection method must be specified in the Row Selection group.
- Delete: Delete existing database documents. A selection method must be specified in the Row Selection group.
- 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:
- If the value is null, empty, or missing, it will be treated as Insert.
- The value will next be matched to Insert, Put, and Delete, case insensitively.
- If there is no match, the feature will be rejected.
- If there is a match, the matched feature operation will be performed on the feature.
Tip: Unlike in previous versions of FME, the fme_db_operation attribute will now cause feature rejection when Feature Operation is set to Insert, Put, or Delete. This behavior differs from previous versions of FME.
More information on Feature Operations.
When Feature Operation is set to Insert, Row Selection is ignored. When Feature Operation is set to Put or Delete, a condition needs to be specified for selecting which documents to operate on. This parameter group offers two methods to construct the selection condition:
- ID Attribute: The value of this attribute will be matched to the value of the _id field of an existing document. This field uniquely identifies the document.
- Revision Attribute: The value of this attribute will be matched to value of the _rev field of the document identified by ID Attribute. If the value of the Revision Attribute does not match the document’s _rev value, then the feature operation will fail.
Controls how the feature type handles destination databases. These options are available:
- Use Existing: If destination database does not exist, the translation will fail.
- Create If Needed: Create destination database if it does not exist.
- Drop and Create: Drop destination database if it exists, and then create it. If no features are written to the corresponding feature type, then the table will not be deleted.
WARNING: Only server administrators can delete databases. Deleted databases cannot be recovered – all data is lost.
Database Creation
Specifies the permissions to be used for newly created databases.
- All Users (default setting): Database will be modifiable by any user who is logged in.
- Admin Users: Database will be modifiable only by administrative users.
- Public: Database will be modifiable by anyone, even those who are not logged into an account.
Determines whether or not newly created tables will be interpreted as containing valid GeoJSON.
If the new table is intended to contain data other than GeoJSON, set this parameter to No.
Advanced
The source of JSON documents to write to the database.
- Feature: Documents will be created from features sent to the Cloudant Writer (which is the usual behavior).
- JSON Attribute: Documents will be created using JSON directly from an attribute, if possible.
This parameter is enabled when the Document Source is Feature.
It can be used to specify an attribute to use as the Document ID. Any features that contain that attribute will use its value as the JSON Document ID. If not specified, the document ID will be automatically generated.