Kendraio DDEX XML integration

Kendraio offers a low-code solution for working with data. “Flows” can be built and shared to work with a range of data sources, including REST APIs, GraphQL, and local data such as XML, JSON, and database systems. DDEX is a set of data standards for the music industry, developed with the aim of making the exchange of data and information across the industry more efficient. We created a set of Flows within the Kendraio ecosystem that work with DDEX data.

Darren Mothersele
Kendraio
6 min readMay 28, 2021

--

https://app.kendra.io/ddex/contributorsDev

These flows include importing, authoring, and exporting DDEX ERN compatible data. In the following, we will introduce the Flows for working with DDEX ERN3 data. It highlights features of the Kendraio App Flow system that have been used in each case and hopefully demonstrates where these could be extended to create a more fully-featured system, or configured differently to work with alternative data schemes.

Step 1: Import batch

In this Flow, we have a ‘Form’ to capture the batch name, and then use the actions block to embed three actions for the different types of batch. Two of these (DDEX ERN3 and ERN4) allow the import of an XML file. This demonstrates one method for the composition of Flows, as the Actions block here selectively embeds another separate Flow depending on which action is selected.

https://app.kendra.io/ddex/addBatch

The embedded Flow for importing DDEX ERN3 looks like this:

https://app.kendra.io/ddex/ernImportSub

The parse-data block can be configured with XML parser settings. This may not be required if the default behaviour is adequate. But it can be useful as the behaviour of XML to JS conversion may require some settings to function correctly. For example, it is not always clear if XML tags should be converted to JSON objects or arrays. The settings in this block allow you to specify this, should the default behaviour not be correct.

Step 2: List batches of content

This Flow lists the batches of content that have been imported or created. It uses the DB block to work with the local database abstraction provided by the App. When running as a PWA, the App uses IndexedDB to store data in the browser locally.

The data grid component (created using the “grid” block) allows for an operations column, by using embedded Flow blocks added to the configuration of the grid block. In this case, an “actions” block is embedded, which launches separate flows for each operation, passing in the row data as “contextual” data for use by the embedded Flow.

https://app.kendra.io/ddex/batches

Using the cog in the top right, the configuration for this Flow is accessed:

Step 3: Extract entities from the data

From the List batches Flow, clicking the “Entities” link takes you to a separate Flow for extracting data from the source batch. The unique ID of the batch is passed as contextual information using URL query parameters, which is then read by the target Flow when it loads, in order to access the correct batch of data from the local DB. This Flow uses a “switch” block to embed multiple alternative Flows that can be accessed by pressing one of the action buttons at the top. The embedded “Contributors (Dev)” Flow demonstrates an example mapping to extract all the contributor information from the source data:

https://app.kendra.io/ddex/mappings

The embedded Flow includes a JMESPath mapping that extracts the data. This is shown below within the main Flow editor, but an alternative “Query Builder” is provided within the Kendraio App for working with JMESPath expressions. This Flow config shows the JMESPath being edited within the mapping block:

https://app.kendra.io/ddex/contributorsDev

The same config can also be edited within the query builder:

https://app.kendra.io/query

The image above shows the mapping open in the Kendraio App Query Builder. This is an interactive tool for creating JMESPath expressions. It allows you to load data and a mapping from any step within a Flow. The mapping can be edited, and the results visualised directly in the app as a tree of data that represents the JSON.

Step 4: Export data via transformation to alternative schema

From the Flow that lists all batches, the “Export” link launches an embedded flow within a dialogue prompt, allowing you to export the data in various formats. This process can be achieved by providing a JMESPath expression that defines the mapping from the source format to the target data schema. It is possible to chain multiple mappings, simplify the mapping process, or map to a required output format from an existing known set of mappings.

Step 5: Edit data

Kendraio App includes a schema-driven form builder that will automatically create forms. The structure of the required data is described in JSONSchema, and the created form can be used to author or edit data that conforms to this schema. The form is built programmatically from the schema definition, but it can also be customised using UISchema. This is useful for specifying alternative widgets, which improve upon the usability of the default form widgets. For example, in this form, used to author DDEX data, the lists of entities within the data are shown in tabs and tables. This is preferable to having huge long lists of input fields. It makes the form easier to navigate when displaying large batches of data.

https://app.kendra.io/ddex/editBatch

The Flow config below shows a small sample of the JSONSchema used to configure the form:

Step 6: Generate batch, add items from DB or manually

An alternative to importing DDEX from XML is to author a batch from scratch. This can be achieved by creating a new batch and then adding items to it. A Flow can be used to select existing items, from other batches, to add. Or new items can be authored using the form in the Edit Batch Flow. Here is an example demonstrating adding existing items:

Step 7: Export DDEX XML

Export of DDEX XML is available on both the batch list and the edit batch screen. This maps the data back into the XML format, as a reverse process to the import batch process. The edit batch Flow has the export option as a button at the bottom:

This exports DDEX-compatible XML that includes any updates or additions to the batch:

Conclusion

The Kendraio App offers a lot of potential for working with multiple data formats like DDEX ERN. The provided tools in the Flow engine and Query builder can be used to import, author, manipulate, and export data.

--

--