Now, we can configure the steps of creating a data source. The steps can also be configured per version as each provider version might require different information.

The steps are configured using the template property.

"template": {
    "$schema": "https://schema.dawiso.com/provider-schema.json",
    "providerName": "",
    "steps": [
        {
            "centerArea": {
                "data": []
            }
        }
    ]
}
PropertyDescription
schemaDawiso schema. Adding it to the template enables helpful tooltips and validation for the data ingestion steps.
providerNameShould be the same provider as the one we selected when defining our data source.
stepsThe steps property allows us to define the UI of the pages needed for creating the data source. Let’s take a closer look at what our application needs.

Template Steps

For this provider, we will need fields to input the following information:

  • Page 1: Name and description of the data source (in Dawiso)
  • Page 2: Databases (input names of databases you want to ingest data from)
  • Page 3:
    • Select destination space and workflow
    • Set schedule
    • Optional setting and additional settings

Each page will be one step.

Each step consists of a centerArea, which contains data properties. This is where we define what fields and sections the page should have. There are multiple field types that can be used.

Visual Components

First, we have visual components. These either show static text, titles at the top of the page, or puts multiple elements in the same section.

  • text: Displays static text on the page, such as subtitles or descriptions.
  • title: Displays the page title, usually used at the top of the page.
  • section: Creates a container for grouping multiple components.

Data Components

Then, we have the components containing data. These are extremely important as they allow you to successfully create a functioning data source from which we can ingest data.

  • checkbox: Allows users to toggle an option on or off.
  • json_input: Accepts custom JSON configurations, such as filters or advanced settings.
  • input: Provides a text box for user input (e.g., data source name).
  • schedule: Expands additional scheduling options when selected.
  • space_select: Enables users to select a space from available options.
  • workflow_select: Provides a dropdown to assign a workflow state to an object.

For our example, our fields will be the following component types:

PageComponentComponent Type
Page 1Name in Dawisoinput
Descriptioninput
Page 2Databases names inputinput
Page 3Select destination spacespace_select
Select workflowworkflow_select
Set scheduleschedule
Optional settingjson_input
Additional settingsjson_input

Creating a Step Template

Let’s take a look at step (or page) 3 which has the most elements. This is how the complete page looks like in Dawiso.

Now let’s take a look at the configuration in packages.

Page Title

Let’s start with the title, which has:

  • An icon
  • The title is how we named the source (@name)
  • A subtitle

In this package, we used Dawiso translations (can be modified in the Settings > Configuration > Translations settings page). You can also use the translations asset to hard-code the text.

{
    "type": "title",
    "titleKey": "@name",
    "subtitleKey": "di.provider.template.data_source.core_sql_server.subtitle",
    "showAppIcon": true
},

Section 1

The first section has three components:

  • Text
    • For a text component, you can configure its heading level (variant) and what it displays (valueKey). Here, we chose a Heading 5 and the value is provided centrally using an existing translation key.
  • Space selector
  • Workflow selector

Both selector types can have:

  • Label: Name of the component.
  • Tooltip: Text displayed upon hovering over the question mark.
  • Placeholder: Placeholder text in the selection field.
  • Mandatory: Decide whether it is a mandatory field.

In the JSON package, the section will be configured like the following:

{
    "type": "section",
    "data": [
        {
            "type": "text",
            "variant": "h5",
            "valueKey": "di.provider.template.data_source.section.destination.label"
        },
        {
            "key": "spaceId",
            "type": "space_select",
            "labelKey": "di.provider.template.common.space.label",
            "tooltipKey": "di.provider.template.common.space.tooltip",
            "placeholderKey": "",
            "required": true
        },
        {
            "key": "workflowId",
            "type": "workflow_select",
            "labelKey": "di.provider.template.common.workflow.label",
            "tooltipKey": "di.provider.template.common.workflow.tooltip",
            "placeholderKey": "",
            "required": true
        }
    ]
},

Section 2

When a user checks the Scheduling box, the exact time selector will be expanded. For this component, you can configure the following:

  • Label and its heading level: Name of the component.
  • Tooltip: Text displayed upon hovering over the question mark.
  • Mandatory: Decide whether it is a mandatory field.

Here is how we can configure it:

{
    "type": "section",
    "data": [
        {
            "key": "schedule",
            "type": "schedule",
            "variant": "h5",
            "labelKey": "di.provider.template.common.section.schedule.label",
            "tooltipKey": "di.provider.template.common.section.schedule.tooltip",
            "placeholderKey": "",
            "required": false
        }
    ]
},
Tip

Keep in mind that the section component is simply a visual one. It allows us to visually organize elements and has no impact on the type of information used to create the data source.

Section 3 and 4

Section 3 and 4 are both mandatory to have in the package as they are fields where you can input JSON strings with settings.  Unlike the previous components, for the json_input component (text variant), we can also configure how many lines the field should have when it’s empty.

This is how we can define the Optional Settings section in the package:

{
    "type": "section",
    "data": [
        {
            "key": "OptionalSettings",
            "type": "json_input",
            "multiline": 5,
            "variant": "text",
            "labelKey": "di.provider.template.common.section.optional_settings.label",
            "tooltipKey": "di.provider.template.data_source.section.optional_settings.tooltip",
            "placeholderKey": "",
            "required": false
        }
    ]
},
Tip

Section 4 (Additional Settings) is configured in the same way. For more information, see the example package.