Microsoft SQL Server和SQL Azure数据库Spatial (JDBC) Writer: Format Parameters
To access feature type parameters, click the gear iconon a feature type in the workspace to open theFeature Type Parameter Editor. To always display the editor in Workbench, you can select View > Windows > Parameter Editor.
All feature types share similar General Parameters. This includes Name and Writer Name. From here, you can also controlDynamic Properties.
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
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
This parameter lets the user specify how features will be written into the destination table. Supported feature operations are:
- Insert:Append rows onto the destination table using attributes on features.
- Update:Update existing table columns using attributes on features. A selection method must be specified in the Row Selection group.
- 删除:删除existing table rows. A selection method must be specified in the Row Selection group.
- fme_db_operation:The feature operation will be determined by the attributefme_db_operationon each input feature. A selection method must be specified in the Row Selection group. The value offme_db_operationwill 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, Update, 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, thefme_db_operationattribute will now cause feature rejection when Feature Operation is set toInsert,Update, or删除. This behavior differs from previous versions of FME.
More information onFeature Operations.
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
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 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.
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
This parameter tells the writer whether to update or skip spatial column(s) when updating features:
- Yes:The spatial column(s) specified by the user will be updated. IFMENulls will be written as null values and replace existing spatial values.
- No:No spatial columns will be updated.
Row Selection
When inserting into a table, Row Selection is ignored. When updating and deleting from a table, a condition needs to be specified for selecting which rows to operate on. This parameter group offers two methods to construct the selection condition:
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
The columns specified in the corresponding column picker dialog will be used for matching destination rows. All matching rows will be selected for update or delete. If any feature attributes corresponding to the specified match columns contain null or missing values, the feature will be rejected.
![Closed](http://www.baooytra.com/docs/fme/2017.0/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
This parameter opens aWHERE Clause Builder. You can also type a WHERE clause inline, without launching the Builder. It is optional to start the clause with the wordWHERE.
The WHERE Clause Builder makes it easy for users to reference feature attribute values, destination table columns, and invoke FME functions. The WHERE clause is first evaluated as an FME expression, before being passed onto the destination database.
If the WHERE clause is incorrect or if its evaluation results in failure, the translation will fail. Otherwise, if the WHERE clause passes FME evaluation but it is SQL invalid, the feature will be rejected or the translation will fail.
For advanced users, conditional FME expressions created through the Conditional Value editor can be used to create WHERE clauses.
Tip:You can set the WHERE Clause to an attribute. This supports workspace migration and existing workflows involvingfme_where. (Direct support forfme_wherehas been deprecated.) To advanced users who are accustomed to usingfme_where, if Feature Operation is set to Update, Delete, orfme_db_operation, anfme_where属性冲突with Match Columns or WHERE Clause will result in feature rejection.