Logo DWBI.org Login / Sign Up
Sign Up
Have Login?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Login
New Account?
Recovery
Go to Login
By continuing you indicate that you agree to Terms of Service and Privacy Policy of the site.
SAP Data Services

Handling XML source files in SAP Data Services

Updated on Oct 01, 2020

This article will demonstrate how to read data from XML based source files using SAP Data Services. Here our objective is to load employee and department information respectively from the source XML based file.

The implementation Dataflow looks like below.

Sample Dataflow to read XML source file
Sample Dataflow to read XML source file

We have the Source XML based file. The XML format is imported from the XSD file. Next we have a Query Transform which is used for the purpose to UNNEST the Nested Data Structure, to Denormalize the data set. Next we have two Query Transforms to handle the Employee and Department information separately. Since the data is denormalized we will have to use the DISTINCT clause when loading the employee and department information to target tables respectively.

Select the top-most Schema, Right-Click and select Unnest with sub-schemas

Query Transform- UNNEST with sub-schemas
Query Transform- UNNEST with sub-schemas

Next to get the Department information select the columns from the Schema In and Map to Output. Next go to SELECT tab and check the selection criteria of Distinct rows.

Query Transform- DISTINCT DEPARTMENT Schema
Query Transform- DISTINCT DEPARTMENT Schema

We follow the same steps to gather the Employee information from the source.

Query Transform- DISTINCT EMPLOYEE Schema
Query Transform- DISTINCT EMPLOYEE Schema

Lastly we have the corresponding Target tables to gather Employee and Department information. Finally we View Data of the Target Tables.

Target Tables- Data Preview
Target Tables- Data Preview