CKAN DataStore Writer Feature Type Parameters
To access feature type parameters, click the gear icon on a feature type in the workspace. This opens the Feature Type Parameter Editor.
Tip: 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 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 ‘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.
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
Match Column
This is an attribute on the incoming features. The 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. 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.