Configuring Dataflows and Components

Objective

After completing this lesson, you will be able to configure Dataflows to enable bulk data transfer between platforms.

Dataflows

Dataflows are a robust ETL (Extract, Transform, Load) solution that provides efficient bulk data transfer between platforms. By allowing you to efficiently move data into and out of SAP Customer Data Cloud, they help ensure that your customer identity information is synchronized across your ecosystem.

A Dataflow is an ETL solution used to transfer data in bulk between platforms. It can be used to transfer user data to a third party or from one Customer Data Cloud database to another. Key use cases include Channeling all permission-based information to another platform or importing third-party platform data into Customer Data Cloud.

Each dataflow is a series of steps that define the transfer process between Customer Data Cloud an a thirt-party system. These steps are carried out on a schedule, which can be configured to run any number of times, depending on your synchronization needs.

With Dataflows, you can achieve the following:

  • Export Data – Extract permission-based social and profile identity information stored in SAP Customer Data Cloud and channel it into other platforms, such as Email Service Providers (ESPs), Customer Relationship Management (CRM) systems, or marketing automation platforms. This ensures that your marketing and sales efforts are based on the most up-to-date customer data.
  • Import Data – Gather up-to-date data from third-party platforms, such as user newsletter subscription statuses, survey responses, or account balances, then synchronize this information with either an existing SAP Customer Data Cloud customer profiles or newly-created profiles. Enrichment from external sources can provide valuable insight.
  • Transfer Users – Transfer users from one SAP Customer Data Cloud site to another, which is useful for managing multiple sites or consolidating customer data.

Key Use Cases for Dataflows:

  • Centralized Data Distribution – Channel all permission-based social and profile identity information into other platforms, creating a unified view of your customers across your organization.
  • Data Enrichment – Import up-to-date data from third-party platforms, such as newsletter subscription statuses, survey responses, or account balances, to enrich customer profiles in SAP Customer Data Cloud.

Dataflow jobs can be executed on a one-time basis, such as during data migration, or scheduled to run regularly to maintain synchronization between platforms. New parameters in datasource.read.gigya.audit allow using Dataflows to export audit log items from a different SAP Customer Data Cloud site. A new notifyLastRecord parameter has been added to the record.evaluate script, which is used for creating custom scripts, indicating that the last record in the batch has been handled.

For Dataflow APIs, use the idx namespace. See Using IDX REST for details.

For more information, refer to the Dataflows (IdentitySync) documentation in the SAP Help Portal.

Dataflow Structure and Components

An example dataflow that begins with “Retrieve Accounts from Identity Store”, then “Rename Target Fields”, then “Remove Profile Fields”. A fork has “Send to External API” on one side, and the following sequence on the other: “Format to dev”, “gzip”, “upload to SFTP”, and finally “fallback to S3”.

A dataflow is a series of steps that define the complete process for transferring information between SAP Customer Data Cloud and a third-party platform. A dataflow schedule is assigned and can be executed once or repeatedly.

The building blocks of a dataflow are steps, calls to components that perform specific tasks, such as extracting account data from SAP Customer Data Cloud, o compressing a file to gzip format. The output of each dataflow step is passed on to the next step (or steps).

Each step in a dataflow includes the following attributes:

  • id – The unique identifier of the step within a given dataflow (e.g., Read from SAP Customer Data Cloud).
  • type – The component used in this step (see Component Repository) (for instance, datasource.read.gigya.account).
  • params – A set of parameters for this step.
  • next – An array containing one or more IDs of the next steps to be carried out.
  • error – The next step to perform if there is an error in the current step (such as writing errors in a log).

Dataflow Configuration

Three steps: 1. Create a dataflow using dataflow templates. 2. Edit the dataflow by setting system access credentials, adding or editing components, and handling failed records. 3. Schedule the dataflow, using UTC notation.

To create an integration based on Dataflows, complete the following process:

  1. Create the Dataflow – Define the overall flow and purpose.
  2. Edit the Dataflow – Configure the individual steps and components.
  3. Schedule the Dataflow – Set the execution frequency and timing.

For more information, refer to the Dataflows (IdentitySync) documentation in the SAP Help Portal.

Dataflow Components

The hierarchy of Dataflow components includes field, file, record, and datasource. Datasource is further divided into read, write, lookup, and delete.

A Dataflow component is a pre-configured unit used to perform a specific data integration operation. The components include readers, writers, transformers, and lookups.

  • Datasource components perform actions on a data platform, by either extracting data from it or uploading data to it.
    • datasource.read components extract data from a platform
    • datasource.write components upload data to a target platform
    • datasource.lookup components extract data from a platform based on a field from another data source
    • datasource.delete components delete information from the target platform
  • Field components modify the dataset in various ways after it is extracted from the source platform.
  • File components determine the format, file compression, and other properties of the dataflow output before it is uploaded to the target platform.
  • Record components run on all records. These are used to create custom components that run JavaScript code.

Component Registry

Dataflows are incredibly flexible and support many technologies, source and target platforms, and data transformation. For complete, up-to-date service capabilities details, see the Component Repository documentation in the SAP Help Portal. The detailed documentation describes the components available for use in a Dataflow job.

The data flows you create are composed of the required steps for data transfer between SAP Customer Data Cloud and the selected vendor. Use the Component Repository to understand the structure and parameters required in each step.

Two useful components are shown here: external.generic, and record.evaluate

Consider the following useful components:

  • external.generic – writes data to an external HTTP or HTTPS service endpoint. Before deploying a dataflow that uses this component, please open a support ticket providing details on the URL to which data is written for internal allowlisting. The URL you provide can be a base domain or an IP address.
  • record.evaluate – inserts custom dataflow steps. In the script parameter, insert a Base64 encoding of your custom script.
  • gigya.generic – a generic component that can call any CDC APIs, including those that write data to a CDC database.
The JSON code passed to gigya.generic to call any SAP CDC’s REST API for reading or writing.

The following three parameters are required when copying site accounts: apiKey, userKey, and secret.

For more information, refer to the Reader Components (Steps) documentation in the SAP Help Portal.

Scheduling Dataflows

Under Orchestrate>Dataflows, each dataflow has a dropdown allowing you to edit it, run it, or schedule it. Scheduling can be set for any date in the future and can run once or may times.

You can create a schedule for your dataflow through the SAP Customer Data Cloud Console or through the API.

Creating a Schedule using the Console:

  1. Under Actions, choose the three dots, then choose Scheduler.
  2. Now choose Create Schedule.
  3. To configure the schedule:
    • Enter a schedule name
    • Change the start time as needed
    • Choose whether to run once or at scheduled intervals
    • The Pull all records checkbox should normally be selected only during the first run when migrating records from one database to the other. It should always be used with caution. If the checkbox is not selected, and this is the first time this dataflow is run, records will be pulled according to the following logic:
      • If the dataflow is set to run once, all records from the last 24 hours will be pulled.
      • If the dataflow is on a recurring schedule, records will be pulled according to the defined frequency. For example, if the dataflow is set to run once a week, the first time it is run, it will pull all records from the previous week.
    • Optionally, enter the email address(es) for dataflow success and failure notifications.
    • Optionally, limit the run to a specific number of records. This is usually used for test runs. When running a test from the dashboard, a one-time schedule is created, which runs immediately for ten records.
  4. Choose Create, and upon returning to the Schedule dashboard, choose the Refresh button.

The status of the scheduling is indicated in the Status column.

You can stop a job mid-run by clicking the Stop icon under Actions.

Creating a Schedule using the API:

Use the idx.createScheduling REST method to schedule a dataflow for execution. The scheduling object defines the date, time, and frequency of the dataflow run.

For more information, refer to the following documentation link:

http[s]://idx.<data_center_id>.gigya.com/idx.createScheduling

Also, take a look at the request payload in the Scheduling Objectdocumentation in the SAP Help Portal.

Handling Errors

The source view shows the element’s JSON representation: ‘id’ is ‘remove’, ‘type’ is ‘field.remove’, ‘params’ is an array named ‘fields’ that contains ‘profile’ and ‘data’, ‘next’ is a single-element array containing ‘mailchimp’, and ‘error’ is a single-element array containing ‘sftp’. The graph view shows the ‘remove’ step in the workflow, following the ‘rename’ step and before the ‘mailchimp’ step, with an optional link to ‘sftp’.

Dataflows include a built-in error handling capabilities. You can separate failed records and write them to a file for review and correction.

Adding error handling to the workflow:

  • After a writer step, add a step that writes the records that did not complete the flow successfully into a separate file for review.
  • Under Connector Type, select the Error path connector.
  • Connect the original write ro the error-handling step.

For a code sample of a flow that writes failed records to SFTP, refer to the Connectors documentation in the SAP Help Portal.

Shared Variables

Screenshot of the Shared Variables tab of the Dataflows page in the Console. Variables can be shared within the same site, the same data center, or across all partner sites.

Shared variables allow you to create and manage variables that can be reused across different dataflows within the same site, data center, or across all partner sites. This is particularly useful for managing credentials or other frequently used values.

Setting up a Shared Variable:

  1. In Dataflows, select the Shared Variables tab
  2. Name the variable
  3. Set a value for the variable
  4. Select the Scope: Site (all sites in a given data center), Partner Account (a global variable, available to all data centers used by that account), or Data Center (a variable local to a single site).\
  5. Choose the plus icon
  6. Choose Save

For more information, refer to the Creating and Working with Dataflows documentation in the SAP Help Portal.

Using Shared Variables

In this examples, Ftp Properties specifies the shared variable <$ftp_server$> as the host value.

Reference shared variables in any configuration screen by wraping the variable name with <$$> , for instance: <$VARIABLE_NAME$>.

The field value may contain one or more shared variables, for example: test_<$USERNAME$>_< $ID$>.

For more information, refer to the Dataflows (IdentitySync) documentation in the SAP Help Portal.

Dataflow Demo

In this video, you will learn how to create and test a batch data flow in SAP Customer Data Cloud. We will explore a real-world scenario focused on exporting customer data to an external loyalty program system.

Summary

In this lesson, you learned that:

  • Dataflows provide an ETL solution for bulk data transfer between SAP Customer Data Cloud and external systems.
  • Key use cases include exporting data to ESPs and CRMs, importing data from third-party platforms, and transferring users between SAP Customer Data Cloud sites.
  • Dataflows are configured through a series of steps, each using components from the Component Repository.
  • Scheduling can be managed through the SAP Customer Data Cloud Console or via the API, and error handling is built-in to manage failed records.
  • Shared variables allow for the reuse of values across multiple dataflows, simplifying configuration and maintenance.