A data destination outputs data from Chioro. It writes or sends the data to a downloadable file or an external endpoint and converts it to the desired target format when executed.
Data destinations effectively represent the endpoints of a flow. In order to continue using the data, after Chioro has processed it, each flow contains at least one data destination.
The configuration of a data source includes two main aspects:
- Where should the data be exported to?
- In what format should the data be exported?
Type of the data destination
Currently there are three basic ways to export product data to Chioro:
- Downloading a file via the browser. Mainly intended for testing and playing.
- Remote file. Direct (push) access to data via a number of protocols. SFTP, S3 and Azure among others.
- API Push. Using the Push API, it is possible to actively send data to a destination. See below for more details.
File to download
If this type is selected, after clicking Export, a link in blue will appear to fetch the file to the local computer.
- Note that downloading is only useful for smaller files up to about 100 MB.
Remote file
For direct access to a remote file, an endpoint is selected in the Storage
field.
The Path
field then specifies the path of the file(all the directories) to be used relative to the Storage root. In case the Storage is AWS, the
path always start with the bucket name follows by the directory structure inside the storage. Please note that all the directories specified should
exist prior to execution, otherwise Chioro will refuse to write the file.
File Name
field is mandatory and denotes the name of the generated file, if not specified the file name will be similar to the name of the Data Destination.
Endpoints represent a kind of “base URL”. Since they usually contain confidential information like passwords or API keys, their configuration is done in the admin area. Admin rights are required for this. Please contact your Chioro administrator or our Support if you do not have the appropriate rights.
Data formats
Currently Chioro supports the following export formats:
- JSON
- Excel (xlsx)
- CSV
- Commerce Tools
- SAP hybris
- Template, here any data can be inserted into templates and output. Exact explanation see below.
- as well as user specific formats, if they are activated.
For other, e.g. user-specific data formats, please contact our Support.
Templates
Basically any files can be created:
The template: ‘Good evening Mr. {{Lastname}}’ creates a file in which, interrupted by the separator, a line is created for each record in the attribute ‘Lastname’.
So the result could look like this:
Good evening Mr. Miller, Good evening Mr. Smith, Good evening Mr. Johnson
This is comparable with the mail merge generation from known Office packages.
In Chioro templates for header, body and footer can be stored:
- Header, this template will be executed once
- Body, this template is executed once for each record of an attribute, i.e. repeated for all rows
- Footer, this template is appended once to the end of the file.
- The separator is inserted after each record.
See also: Handlebars
DynamoDB
By the usage of a DynamoDB as data destination it is important to write the name of the table correctly, Type of Destination must be File Download and in the fields of the export, the keys defined in the table schema have to be set and unique (in the context of the flow/export step).
Entries with keys that are already used in the table will replace the entries fully in the DB.