Skip to navigationSkip to main contentSkip to footerScaleway Docs HomepageAsk our AI
Ask our AI

Create a workflow using Data Orchestrator

Note

Data Orchestrator is currently in Public Beta. During this Beta period:

  • Graph view supports the visualization of the logic tasks fork and try-catch.
  • Workflows run Scaleway Serverless Jobs, Serverless Functions, Serverless Containers, and HTTP calls.

Before you start

To complete the following actions, you must have:

Create a Data Orchestrator workflow using the Scaleway console

Note

In the current Beta, the Graph view of the Scaleway console only supports the creation of Serverless Job tasks and simple connectors. Other tasks must be created using a workflow definition file.

The following section explains how to create a workflow using the Scaleway console in Graph view. If you want to create a workflow using a workflow definition file, skip to Create a workflow using a workflow definition.

Create the workflow

  1. In the Scaleway console (External link) side menu, go to Data & Analytics > Data Orchestrator. The list of your workflows appears.
  2. Click Create workflow. The Data Orchestrator workflow creation wizard opens.
  3. Select the region for your workflow.
  4. Enter a name or use the automatically generated one.
  5. (Optional) Enter a description.
  6. Click Create workflow only to finish, or click Create workflow and add tasks to add tasks or upload a workflow definition file next.

Add tasks to the workflow

After creating a workflow, you can use the Scaleway console to create tasks manually or upload a workflow definition file.

The following procedure explains how to create a sequential workflow with 3 Serverless Jobs using the Scaleway console in Graph view.

  1. Click Create workflow and add tasks at the end of the workflow creation, or click Edit in the Overview tab of an existing workflow.
  2. Click Choose a job to create the first task. The Graph view opens with an empty job task created.
  3. Click the empty job task, then:
    1. Select the region of the job.
    2. Select the job you want to use.
      If the job does not exist yet, click Create job to open the Serverless Jobs creation wizard in a new tab. After you have created the job, click Refresh list to make it appear.
  4. In the tasks menu on the left, click Serverless Jobs to create a new empty job task. Note that a new task always appears to the right of all other tasks.
  5. Click the new task and select the second job.
  6. Repeat the previous step to create a third Serverless Job.
  7. Drag the connector on the right side of the first task to the connector on the left side of the second task to link them.
  8. Repeat the previous step to link the second and third tasks.
  9. Click Save changes to finish, or click Save and run to save the workflow and run it immediately.

Graph view validation rules

The Graph view is designed to run tasks from left to right. Drag and drop the tasks to arrange them in the order that suits you best. Graph view is a visual representation of the code view, thus it is still limited by the rules of the Open Workflow Specification.

You can save a workflow when:

  • All created tasks have a corresponding Serverless Job. An empty task is not valid.
  • All created tasks are linked together in a sequential flow. A workflow with an unused or isolated task is not valid.
  • The workflow has one first task and one final task. A loop is not valid.

Create a workflow using a workflow definition

You can upload a YAML file to use more complex workflows in Data Orchestrator.

Create a workflow definition YAML file

This is a basic example of a sequential workflow using 3 Serverless Jobs. For information on other tasks and concepts, see Action tasks, Logic tasks, or the full Data Orchestrator DSL Reference.

See Workflow schema to download the Data Orchestrator workflow schema to help you create your workflow definition file.

  1. Create a YAML file, copy and paste the following content into the file.
    Replace the placeholders with the appropriate values. The namespace and name fields are required, and can be used as metadata to help organize YAML files. Copy Serverless Job IDs from the Serverless Jobs page (External link) of the console.

    document:
      dsl: 1.0.3
      namespace: <NAMESPACE_NAME>
      name: <WORKFLOW_NAME>
      version: 1.0.0
    do:
    - task1:
        call: "serverless_job"
        metadata:
          description: "The first job"
        with:
          id: "<SERVERLESS_JOB1_ID>"
          region: "<REGION>"
    - task2:
        call: "serverless_job"
        metadata:
          description: "The second job"
        with:
          id: "<SERVERLESS_JOB2_ID>"
          region: "<REGION>"
    - task3:
        call: "serverless_job"
        metadata:
          description: "The third job"
        with:
          id: "<SERVERLESS_JOB3_ID>"
          region: "<REGION>"
  2. Save the YAML file.

Create the workflow

  1. In the Scaleway console (External link) side menu, go to Data & Analytics > Data Orchestrator. The list of your workflows appears.
  2. Click Create workflow. The Data Orchestrator workflow creation wizard opens.
  3. Select the region for your workflow.
  4. Enter a name or use the automatically generated one.
  5. (Optional) Enter a description.
  6. Click Create workflow only to finish, or click Create workflow and add tasks to add tasks or upload a workflow definition file next.

Upload the workflow definition

The workflow upload window opens when you finish creating a workflow, or when you click Edit in the Overview tab of an existing workflow.

  1. Click Upload.
  2. Select the YAML file to use as the workflow definition.
  3. Click Save changes to finish, or click Save and run if you want to save and run the workflow.

Run a workflow

  1. In the Scaleway console (External link) side menu, go to Data & Analytics > Data Orchestrator. The list of your workflows appears.
  2. Click the name of the workflow you want to run. The workflow Overview tab opens.
  3. Click the Actions button, then click Run in the drop-down menu. Your workflow starts, and a new entry appears in the Runs tab.
Tip

On the Data Orchestrator page, you can also click the run icon next to the workflow you want to run.

Still need help?

Create a support ticket
No Results