CKAN DataStore Writer Feature Type Parameters

To access feature type parameters, click the gear icon Tip To always display the editor in FME Workbench, you can select View > Window Layout > Parameter Editor.
General All feature types share similar General parameters, which may include Feature Type Name, Reader or Writer information, and Geometry. In most Writer Feature Type parameter dialogs, you can also control Dynamic Schema Definitions. Some database formats accept Table or Index Qualifier prefixes on the output table feature type. |
Dataset
Feature Operation
This parameter lets the user specify how features will be written into the destination table. Supported feature operations are:
- Insert – Insert rows to a CKAN table.
- Upsert – Upsert rows to a CKAN table. Rows will be matched against rows in the existing table by a primary key and an update/insert operation will be performed. Can only be used on tables where an explicit primary key was specified during table creation.
- Update – Replace the contents of rows. Every feature must correspond to a row in the existing table. Can only be used on tables where an explicit primary key was specified during table creation.
- Delete – Remove rows from a CKAN DataStore table. A Delete Match Column attribute must be specified. Any rows in that DataStore table column which match the attribute values on the incoming feature will be removed.
- fme_db_operation: The feature operation will be determined by the attribute fme_db_operation on each input feature. Features will be matched by the primary key defined in the table. 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, Update, Upsert, 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.
If no value is specified in the Delete Match Column parameter, the writer will attempt to perform delete operations by matching the ckandatastore_row_id attribute on incoming features.
Table Handling
This parameter lets the user specify how the feature type handles destination CKAN DataStore tables. Supported modes are:
- Create If Needed (default) – If a DataStore table exists for a resource, it will be used. If a resource exists with no DataStore table, then a table will be created. Otherwise, a resource and table will be created, with the resource named after the feature type.
- Use Existing – Use the existing DataStore table for the resource in CKAN. Note that even if a CKAN resource exists, if it does not have a corresponding DataStore table, the write will fail.
- Drop and Create – Drop the corresponding DataStore table, if one exists, before recreating one. This mode can also be used to create an entirely new resource and table, but it will not delete existing resources.
- Truncate Existing – Truncate the existing table before performing write operations. The Data Dictionary will be preserved. If the table does not exist, the translation will fail.
Row Selection
Delete Match Column
This is an attribute on the incoming features. The attribute name should match an existing column in the CKAN table. The values on incoming features for this attribute will be compared against the CKAN table as a deletion filter – any matching rows will be deleted. When not performing a delete operation, the values in this column will be ignored; upsert and update operations will match records by the primary key of the tables.
The incoming features for this attribute should not contain any null/missing attribute values.
Convert to DataStore Resource
Some resources in CKAN, such as resources which were uploaded to FileStore, are marked as read-only.
Set this option to Yes to convert these resources to DataStore-only resources. The existing data already in DataStore will be preserved, but the reference to the original file will be lost.
The default is No.