FME Transformers: 2025.1
FME Transformers: 2025.1
CKANConnector
Connects to a CKAN open data portal to manage datasets and resources.
Typical Uses
- Browsing and downloading public datasets hosted on a CKAN portal
- Creating or updating metadata and file-based Resources
How does it work?
The CKANConnector connects to a CKAN open data portal using the CKAN Action REST API to perform various tasks on datasets and their associated resources:
Action | Task |
---|---|
Create Dataset |
Create a new CKAN dataset. |
Create Resource |
Create a new CKAN resource associated with an existing dataset by uploading content from a file or attribute, or providing a URL. |
Delete Dataset |
Delete a CKAN dataset and its resources. |
Delete Resource |
Delete a specific resource. |
Download Resource |
Download a resource to a file or attribute. |
List Datasets |
List the details of all datasets on a CKAN portal. |
List Resources |
List the details of all resources of a specific CKAN dataset. |
Update Dataset |
Update the details (metadata) of a specific CKAN dataset. |
Update Resource |
Update the content of a specific resource. |
Configuration
Input Ports

This transformer accepts any feature.
Output Ports

Features with added attributes, as specified in parameters and according to Action:
Action | Output |
---|---|
Create Dataset |
Input feature with a JSON representation of the new dataset. |
Create Resource |
Input feature with a JSON representation of the new resource. |
Delete Dataset |
Input feature unchanged. |
Delete Resource |
Input feature unchanged. |
Download Resource |
Input feature with details about the downloaded item. |
List Datasets |
Multiple features, one for each dataset in the specified location, with details about the items and JSON representation. |
List Resources |
Multiple features, one for each resource in the specified dataset, with details about the items and JSON representation. |
Update Dataset |
Input feature with a JSON representation of the updated dataset. |
Update Resource |
Input feature with a JSON representation of the updated resource. |

Input features are output here unmodified, in addition to any other output locations (Output or <Rejected>).

Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter.
Parameters

CKAN Connection |
Select or create a Web Connection, connecting to the CKAN Web Service. |

Action |
Select an operation to perform. Choices include:
|

Create Dataset
Name |
Specify the name of the new CKAN dataset. Names must be unique on the CKAN portal and be alphanumeric with no spaces. |
Title |
(Optional) Specify a title for the new dataset. |
Private |
Select a privacy setting:
|
Author |
(Optional) Provide an author name. |
Author Email |
(Optional) Provide an author email address. |
Maintainer |
(Optional) Provide the name of the dataset maintainer. |
Maintainer Email |
(Optional) Provide the email address of the maintainer. |
License |
(Optional) Specify a dataset license, which may be selected from the options available on the CKAN portal. |
Notes |
(Optional) Provide any notes, comments, or description for the dataset. |
Source |
(Optional) Specify any applicable URL regarding the data source. |
Version |
(Optional) Specify any version information for the dataset. |
Tags |
(Optional) Specify any tags for the dataset, which may be selected from the options available on the CKAN portal. Tags that do not already exist will be created. |
Groups |
(Optional) Specify any groups to assign the dataset to, which may be selected from the options available on the CKAN portal. |
Organization |
Specify the organization that controls the dataset, which may be selected from the options available on the CKAN portal. |
Output Attributes
JSON Response Attribute |
Name the attribute to contain the JSON object representing the dataset. |

Data Source
Data Source |
Select the source type:
Note that folder-based formats and datasets with multiple files can be zipped and uploaded as one File. |
File to Upload |
When Data Source is File, specify the file to be uploaded. |
Attribute to Upload as File |
When Data Source is Attribute, specify the attribute containing the content for upload. |
Upload with File Name |
When Data Source is Attribute, specify the filename, including extension, to contain the uploaded content. |
URL |
When Data Source is URL, provide the URL of the resource. |
Resource Metadata
Dataset |
Specify the ID of the dataset to contain the new resource. |
Name |
(Optional) Provide a name for the resource. If not specified, the filename or URL basename is used. |
Description |
(Optional) Provide a description of the resource. |
Format |
(Optional) Specify the file format of the resource. |
MIME Type |
(Optional) Specify the MIME type of the uploaded file or resource URL. If not specified, the type is inferred from the filename or URL. |
Output Attributes
JSON Response Attribute |
Name the attribute to contain the JSON object representing the resource. |

Delete Dataset
Dataset |
Specify the ID of the CKAN dataset to delete, along with its resources. |
Purge |
Select a deletion method:
|
Output Attributes
No attributes are added for this Action.

Delete Resource
Dataset |
Specify the ID of the dataset containing the resource to delete. |
Resource |
Specify the ID of the resource to delete. |
Output Attributes
No attributes are added for this Action.

Content Source
Dataset |
Specify the ID of the dataset containing the resource to download. |
Resource |
Specify the ID of the resource to download. |
Destination
Download As |
Select a destination type for downloaded items:
|
Download to Attribute |
When Download as is Attribute, specify the attribute to contain the contents of the downloaded item. |
Download to Folder |
When Download as is File, specify the path to the folder that will store the downloaded item. |
If File Exists |
When Download as is File, select a method for handling existing files:
|
Output Attributes
Attributes to Add |
Select any available attributes to be included on the output features:
|

Output Attributes
Attributes to Add |
Select any available attributes to be included on the output features:
|
||||||||||||||||||||||||||||||||||||||||||||||
JSON Response Attribute |
Name the attribute to contain the JSON object representing the dataset. |

List Resources
Dataset |
Specify the ID of the dataset to list the resources of. |
Output Attributes
Attributes to Add |
Select any available attributes to be included on the output features:
|
||||||||||||||||||||||||||||||||||||||||||
JSON Response Attribute |
Name the attribute to contain the JSON object representing the resource. |

Update Dataset
Current metadata values are preserved unless a new value is provided. To clear an existing value, set it to null.
Dataset ID |
Specify the ID of the dataset to update. |
Name |
(Optional) Specify the name of the new CKAN dataset. Names must be unique on the CKAN portal and be alphanumeric with no spaces. |
Title |
(Optional) Specify a title for the new dataset. |
Private |
(Optional) Select a privacy setting:
|
Author |
(Optional) Provide an author name. |
Author Email |
(Optional) Provide an author email address. |
Maintainer |
(Optional) Provide the name of the dataset maintainer. |
Maintainer Email |
(Optional) Provide the email address of the maintainer. |
License |
(Optional) Specify a dataset license, which may be selected from the options available on the CKAN portal. |
Notes |
(Optional) Provide any notes, comments, or description for the dataset. |
Source |
(Optional) Specify any applicable URL regarding the data source. |
Tags |
(Optional) Specify any tags for the dataset, which may be selected from the options available on the CKAN portal. Tags that do not already exist will be created. |
Groups |
(Optional) Specify any groups to assign the dataset to, which may be selected from the options available on the CKAN portal. |
Organization |
(Optional) Specify the organization that controls the dataset, which may be selected from the options available on the CKAN portal. |
Output Attributes
JSON Response Attribute |
Name the attribute to contain the JSON object representing the dataset. |

Data Source
Data Source |
Select the source type:
Note that folder-based formats and datasets with multiple files can be zipped and uploaded as one File. |
File to Upload |
When Data Source is File, specify the file to be uploaded. |
Attribute to Upload as File |
When Data Source is Attribute, specify the attribute containing the content for upload. |
Upload with File Name |
When Data Source is Attribute, specify the filename, including extension, to contain the uploaded content. |
URL |
When Data Source is URL, provide the URL of the resource. |
Resource Metadata
Current metadata values are preserved unless a new value is provided. To clear an existing value, set it to null.
Dataset |
Specify the ID of the dataset containing the resource. |
Resource |
Specify the ID of the resource to update. |
Name |
(Optional) Provide a name for the resource. |
Description |
(Optional) Provide a description of the resource. |
Format |
(Optional) Specify the file format of the resource. |
MIME Type |
(Optional) Specify the MIME type of the uploaded file or resource URL. |
Output Attributes
JSON Response Attribute |
Name the attribute to contain the JSON object representing the resource. |
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.

These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |

Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | |
Aliases | |
History |
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the CKANConnector on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.