MongoDB Writer: Format Parameters
To access format parameters, open the Feature Type Properties dialog by clicking the properties button on a feature type in the workspace. These parameters are applicable only to the selected feature type.
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 controls how the feature type handles destination tables. These options are available:
- Create If Needed: Create destination table if it does not exist. The 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.
Collection Creation Parameters
Specifies the name of the geometry field to be created.
This parameter is only relevant if the collection is being created.
If set to Yes, Workbench will create a 2dsphere spatial index on the collection.
This parameter is only relevant if the collection is being created.
Advanced
The source of JSON documents to write to the database.
- Feature: Documents will be created from features sent to the 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.
Value: 24-character hexadecimal string
Any features that contain that attribute will use its value as the JSON Document ID.
This parameter is enabled when the Document Source is JSON Attribute. It can be used to specify an attribute to use directly as the document JSON. Any features that contain the JSON attribute will be written using the JSON attribute value. Other features will be written as usual.
This parameter is enabled when the Document Source is JSON Attribute. It can be used to specify an attribute to use directly as the JSON document. Any features that contain the JSON attribute will be written using the JSON attribute value. Other features will be written as usual.